/* ==========================================
   MASHALLAH ELECTRIC - ERP SYSTEM
   Flutter-Inspired Material Design Theme
   ========================================== */

:root {
    /* Light Theme (Default) */
    --primary: #059669;
    --primary-light: #10B981;
    --primary-dark: #047857;
    --secondary: #6366F1;
    --surface: #FFFFFF;
    --surface-variant: #F1F5F9;
    --background: #F8FAFC;
    --error: #EF4444;
    --warning: #F59E0B;
    --success: #22C55E;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error-bg: rgba(239, 68, 68, 0.1);
    --on-primary: #FFFFFF;
    --on-surface: #1E293B;
    --on-surface-variant: #64748B;
    --outline: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
    --elevation-1: 0 1px 3px var(--shadow);
    --elevation-2: 0 4px 6px var(--shadow);
    --elevation-3: 0 10px 15px var(--shadow);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --surface: #1E293B;
    --surface-variant: #334155;
    --background: #0F172A;
    --on-surface: #F1F5F9;
    --on-surface-variant: #94A3B8;
    --outline: #475569;
    --shadow: rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--on-surface);
    min-height: 100vh;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
}

/* Typography */
.text-display {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.text-headline {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.text-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

.text-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

.text-caption {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--on-surface-variant);
}

.text-muted {
    color: var(--on-surface-variant);
}

.text-primary {
    color: var(--primary);
}

.text-error {
    color: var(--error);
}

.text-success {
    color: var(--success);
}

/* ==========================================
   LOGIN SCREEN
   ========================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--elevation-3);
    text-align: center;
}

.login-logo {
    width: 72px;
    height: 72px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.login-logo i {
    font-size: 32px;
    color: var(--on-primary);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--on-surface-variant);
    margin-bottom: 32px;
}

/* ==========================================
   FORM CONTROLS - Material Style
   ========================================== */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    border: 2px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--on-surface);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.form-control::placeholder {
    color: var(--on-surface-variant);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 8px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

/* ==========================================
   BUTTONS - Material Ripple Effect
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s;
}

.btn:hover::after {
    opacity: 0.1;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--surface-variant);
    color: var(--on-surface);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--outline);
    color: var(--on-surface);
}

.btn-outline:hover {
    background: var(--surface-variant);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   SIDEBAR - Navigation Rail
   ========================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--outline);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--outline);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-primary);
    font-size: 20px;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--on-surface);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--on-surface-variant);
    padding: 12px;
    margin-top: 8px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--surface-variant);
    color: var(--on-surface);
}

.nav-link.active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.nav-link i {
    width: 24px;
    font-size: 1.125rem;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--outline);
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    transition: var(--transition);
}

.page-header {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--outline);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--on-surface);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-content {
    padding: 32px;
}

.page {
    display: none;
    animation: fadeIn 0.2s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CARDS - Material Elevation
   ========================================== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--outline);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--elevation-2);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--outline);
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--outline);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-2px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.stat-icon.green {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.stat-icon.yellow {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.stat-icon.blue {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
}

/* ==========================================
   ALERT BOX
   ========================================== */
.alert-box {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    margin-bottom: 24px;
}

.alert-box.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.alert-box.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}

.alert-title {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   CATEGORY TABS - Chips
   ========================================== */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: var(--outline);
    border-radius: 2px;
}

.category-chip {
    padding: 10px 20px;
    background: var(--surface-variant);
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--on-surface-variant);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.category-chip:hover {
    background: var(--outline);
}

.category-chip.active {
    background: var(--primary);
    color: var(--on-primary);
}

/* ==========================================
   PRODUCT GRID
   ========================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--elevation-2);
    transform: translateY(-2px);
}

.product-card.low-stock {
    border-color: var(--error);
}

.product-name {
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 4px;
    font-size: 0.9375rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
    margin-bottom: 12px;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stock-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.stock-badge.ok {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stock-badge.low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ==========================================
   CART SECTION
   ========================================== */
.cart-section {
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 100px;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--outline);
}

.cart-title {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 50px;
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--outline);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--on-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.cart-qty-value {
    width: 32px;
    text-align: center;
    font-weight: 600;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--on-surface-variant);
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.cart-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--outline);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 1rem;
    font-weight: 500;
}

.cart-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==========================================
   DATA TABLE
   ========================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--surface-variant);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--on-surface);
    border-bottom: 1px solid var(--outline);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--outline);
    font-size: 0.9375rem;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--surface-variant);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action-btn.edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--secondary);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.action-btn.print {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
}

.action-btn:hover {
    transform: scale(1.1);
}

/* ==========================================
   MODAL - Material Dialog
   ========================================== */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--elevation-3);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--outline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface-variant);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface-variant);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--outline);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--outline);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================
   SEARCH BOX
   ========================================== */
.search-box {
    position: relative;
    max-width: 320px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface-variant);
    color: var(--on-surface);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
}

/* ==========================================
   THEME TOGGLE
   ========================================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--outline);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--on-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--surface-variant);
}

/* ==========================================
   PAYMENT OPTIONS
   ========================================== */
.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-option {
    padding: 20px;
    border: 2px solid var(--outline);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--primary);
}

.payment-option.selected {
    border-color: var(--primary);
    background: rgba(5, 150, 105, 0.05);
}

.payment-option i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.payment-option span {
    display: block;
    font-weight: 500;
}

/* ==========================================
   BOTTOM NAV (Mobile)
   ========================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--outline);
    padding: 8px 0;
    z-index: 1000;
}

.bottom-nav-items {
    display: flex;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    color: var(--on-surface-variant);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* ==========================================
   GRID UTILITIES
   ========================================== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        padding-bottom: 70px;
    }

    .bottom-nav {
        display: block;
    }

    .page-content {
        padding: 20px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--outline);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================
   QUICK ACTIONS FAB
   ========================================== */
.fab {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--elevation-3);
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 900;
}

.fab:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

@media (min-width: 769px) {
    .fab {
        bottom: 32px;
    }
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--on-surface-variant);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--on-surface);
}

/* ==========================================
   KEYBOARD SHORTCUT HINTS
   ========================================== */
.kbd {
    display: inline-flex;
    padding: 4px 8px;
    background: var(--surface-variant);
    border: 1px solid var(--outline);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--on-surface-variant);
}

/* ==========================================
   PAYMENT OPTIONS - Checkout Modal
   ========================================== */
.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 0 20px;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--surface-variant);
    border: 2px solid var(--outline);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.payment-option i {
    font-size: 1.5rem;
    color: var(--on-surface-variant);
    transition: var(--transition);
}

.payment-option span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--primary);
    background: rgba(5, 150, 105, 0.05);
}

.payment-option:hover i,
.payment-option:hover span {
    color: var(--primary);
}

/* Selected Payment States */
.payment-option.selected {
    border-color: var(--primary);
    background: rgba(5, 150, 105, 0.1);
}

.payment-option.selected i,
.payment-option.selected span {
    color: var(--primary);
}

/* Payment Method Colors */
.payment-option[data-method="cash"].selected {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.payment-option[data-method="cash"].selected i,
.payment-option[data-method="cash"].selected span {
    color: #16a34a;
}

.payment-option[data-method="card"].selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.payment-option[data-method="card"].selected i,
.payment-option[data-method="card"].selected span {
    color: #3b82f6;
}

.payment-option[data-method="jazzcash"].selected {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.payment-option[data-method="jazzcash"].selected i,
.payment-option[data-method="jazzcash"].selected span {
    color: #dc2626;
}

.payment-option[data-method="easypaisa"].selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.payment-option[data-method="easypaisa"].selected i,
.payment-option[data-method="easypaisa"].selected span {
    color: #22c55e;
}

.payment-option[data-method="credit"].selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.payment-option[data-method="credit"].selected i,
.payment-option[data-method="credit"].selected span {
    color: #f59e0b;
}

.payment-option[data-method="bank"].selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.payment-option[data-method="bank"].selected i,
.payment-option[data-method="bank"].selected span {
    color: #6366f1;
}

/* Checkout Total Card */
.checkout-total-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 16px 0;
}

.checkout-total-card .label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.checkout-total-card .value {
    font-size: 2rem;
    font-weight: 700;
}

/* Change Display Box */
.change-display {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.change-display .label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.change-display .value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Grid helpers */
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .payment-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .payment-option {
        padding: 12px 6px;
    }

    .payment-option i {
        font-size: 1.25rem;
    }

    .payment-option span {
        font-size: 0.65rem;
    }
}

/* ==========================================
   SWEETALERT OVERRIDE - Higher Z-Index
   ========================================== */
.swal2-container {
    z-index: 9999 !important;
}

.swal2-popup {
    z-index: 9999 !important;
}

/* Loading Spinner Enhancement */
.swal2-popup.swal2-loading .swal2-title {
    margin-top: 16px;
}

.swal2-loading .swal2-loader {
    border-color: var(--primary) transparent var(--primary) transparent !important;
}