        /* ===== RESET & BASE STYLES ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Restaurant Color Palette - Refined */
            --primary: #E63946;
            --primary-dark: #C1121F;
            --primary-light: #FF6B6B;
            --primary-50: #FFE5E7;
            --primary-10: rgba(230, 57, 70, 0.1);
            
            --secondary: #F4A261;
            --secondary-dark: #E76F51;
            --secondary-light: #FFD166;
            --secondary-50: #FFEDDC;
            
            /* Neutral Colors - Enhanced */
            --neutral-950: #0A0A0A;
            --neutral-900: #1A1A1A;
            --neutral-800: #2A2A2A;
            --neutral-700: #3D3D3D;
            --neutral-600: #5A5A5A;
            --neutral-500: #7A7A7A;
            --neutral-400: #A0A0A0;
            --neutral-300: #D1D1D1;
            --neutral-200: #E5E5E5;
            --neutral-100: #F5F5F5;
            --neutral-50: #FAFAFA;
            --neutral-0: #FFFFFF;
            
            /* Status Colors */
            --success: #007bff; /* Changed from #10B981 */
            --success-dark: #0056b3; /* Changed from #059669 */
            --success-light: #e7f1ff; /* Changed from #D1FAE5 */
            
            --warning: #F59E0B;
            --warning-dark: #D97706;
            --warning-light: #FEF3C7;
            
            --danger: #EF4444;
            --danger-dark: #DC2626;
            --danger-light: #FEE2E2;
            
            --info: #3B82F6;
            --info-dark: #2563EB;
            --info-light: #DBEAFE;
            
            /* UI Colors */
            --text-primary: var(--neutral-900);
            --text-secondary: var(--neutral-700);
            --text-muted: var(--neutral-500);
            
            --border-color: var(--neutral-200);
            --border-light: var(--neutral-100);
            --border-dark: var(--neutral-300);
            
            --background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            --surface: var(--neutral-0);
            --surface-alt: var(--neutral-50);
            --surface-elevated: var(--neutral-0);
            
            /* Effects */
            --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
            --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            --shadow-primary: 0 4px 20px rgba(230, 57, 70, 0.15);
            
            --radius-xs: 2px;
            --radius-sm: 4px;
            --radius: 8px;
            --radius-lg: 12px;
            --radius-xl: 16px;
            --radius-2xl: 20px;
            --radius-full: 9999px;
            
            --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
            
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
        }

        html {
            font-size: 16px;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            font-family: var(--font-sans);
            background: var(--background);
            color: var(--text-primary);
            line-height: 1.5;
            min-height: 100vh;
        }

        /* ===== TYPOGRAPHY SCALE ===== */
        h1 { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: 700; line-height: 1.2; }
        h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 600; line-height: 1.3; }
        h3 { font-size: clamp(1.25rem, 3.5vw, 1.5rem); font-weight: 600; line-height: 1.4; }
        h4 { font-size: clamp(1.125rem, 3vw, 1.25rem); font-weight: 600; line-height: 1.4; }
        .text-lg { font-size: clamp(1.125rem, 2.5vw, 1.25rem); }
        .text-base { font-size: clamp(1rem, 2vw, 1.125rem); }
        .text-sm { font-size: clamp(0.875rem, 1.5vw, 0.9375rem); }
        .text-xs { font-size: clamp(0.75rem, 1vw, 0.8125rem); }

        /* ===== LAYOUT ===== */
        .page-container {
            min-height: 100vh;
            padding: clamp(1rem, 3vw, 2rem);
            display: flex;
            flex-direction: column;
        }

        .main-content {
            
            width: 100%;
            margin: 0 auto;
            flex: 1;
        }

        /* ===== HEADER ===== */
        .header {
            margin-bottom: clamp(1.5rem, 4vw, 2rem);
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-light);
        }

        .header h1 {
            color: var(--neutral-900);
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }

        .header h1 i {
            color: var(--primary);
            font-size: clamp(2rem, 4vw, 2.5rem);
        }

        .header p {
            color: var(--neutral-600);
            font-size: clamp(1rem, 2vw, 1.125rem);
            max-width: 600px;
        }

        /* ===== CARDS ===== */
        .card {
            background: var(--surface);
            border-radius: var(--radius-xl);
            border: 1px solid var(--border-color);
            box-shadow: var(--shadow-md);
            padding: clamp(1.25rem, 3vw, 1.5rem);
            margin-bottom: clamp(1rem, 3vw, 1.5rem);
            transition: var(--transition);
        }

        .card:hover {
            box-shadow: var(--shadow-lg);
        }

        .card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--border-light);
        }

        .card-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: clamp(1.125rem, 2.5vw, 1.25rem);
            font-weight: 600;
            color: var(--neutral-900);
        }

        .card-title i {
            color: var(--primary);
            font-size: 1.25em;
        }

        /* ===== GRID SYSTEM ===== */
        .grid-2, .grid-3 {
            display: grid;
            gap: clamp(1rem, 2vw, 1.5rem);
        }

        .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
        .grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

        /* ===== INPUT GROUPS ===== */
        .input-group {
            margin-bottom: clamp(1rem, 2vw, 1.25rem);
        }

        .input-group label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--text-secondary);
            font-size: clamp(0.9375rem, 1.5vw, 1rem);
        }

        .input-group label i {
            color: var(--primary);
            width: 1.25em;
        }

        .form-control {
            width: 100%;
            padding: clamp(0.75rem, 1.5vw, 0.875rem);
            font-size: clamp(0.9375rem, 1.5vw, 1rem);
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            background: var(--neutral-50);
            color: var(--text-primary);
            transition: var(--transition-fast);
            font-family: var(--font-sans);
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: var(--shadow-primary);
            background: var(--neutral-0);
        }

        .form-control::placeholder {
            color: var(--neutral-400);
        }

        select.form-control {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%237A7A7A'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1.25em;
            padding-right: 2.5rem;
        }

        /* ===== BUTTONS ===== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: clamp(0.625rem, 1.5vw, 0.75rem) clamp(1.25rem, 2vw, 1.5rem);
            font-size: clamp(0.9375rem, 1.5vw, 1rem);
            font-weight: 500;
            border-radius: var(--radius);
            border: 2px solid transparent;
            cursor: pointer;
            transition: var(--transition-fast);
            font-family: var(--font-sans);
            text-decoration: none;
            white-space: nowrap;
        }

        .btn i {
            font-size: 1.125em;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-1px);
            box-shadow: var(--shadow-primary);
        }

        .btn-success {
            background: var(--success); /* Now #007bff */
            color: white;
        }

        .btn-success:hover {
            background: var(--success-dark); /* Now #0056b3 */
            transform: translateY(-1px);
        }

        .btn-secondary {
            background: var(--neutral-100);
            color: var(--neutral-700);
            border-color: var(--border-color);
        }

        .btn-secondary:hover {
            background: var(--neutral-200);
            border-color: var(--neutral-300);
        }

        .btn-outline {
            background: transparent;
            color: var(--neutral-700);
            border-color: var(--border-color);
        }

        .btn-outline:hover {
            background: var(--neutral-50);
            border-color: var(--neutral-300);
        }

        .btn-lg {
            padding: clamp(0.875rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
            font-size: clamp(1rem, 2vw, 1.125rem);
        }

        /* ===== SWITCH TOGGLE ===== */
        .switch-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem;
            background: var(--neutral-50);
            border-radius: var(--radius);
            margin-bottom: 1.5rem;
        }

        .switch-label {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-weight: 500;
            color: var(--text-secondary);
            font-size: clamp(0.9375rem, 1.5vw, 1rem);
        }

        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 32px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--neutral-300);
            transition: var(--transition);
            border-radius: 34px;
        }

        .switch-slider:before {
            position: absolute;
            content: "";
            height: 24px;
            width: 24px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: var(--transition);
            border-radius: 50%;
        }

        input:checked + .switch-slider {
            background-color: var(--primary);
        }

        input:checked + .switch-slider:before {
            transform: translateX(28px);
        }

        /* ===== SECTION TITLES ===== */
        .section-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            font-size: clamp(1.125rem, 2.5vw, 1.25rem);
            font-weight: 600;
            color: var(--neutral-900);
        }

        .section-title i {
            color: var(--primary);
            font-size: 1.25em;
        }

        /* ===== TABLES ===== */
        .table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            margin: 1rem 0;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
            background: var(--surface);
        }

        .products-table {
            width: 100%;
            min-width: 800px;
            border-collapse: collapse;
        }

        .products-table th {
            background: var(--neutral-50);
            padding: clamp(0.75rem, 1.5vw, 1rem);
            text-align: left;
            font-weight: 600;
            color: var(--neutral-700);
            border-bottom: 2px solid var(--border-color);
            font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
            white-space: nowrap;
        }

        .products-table td {
            padding: clamp(0.75rem, 1.5vw, 1rem);
            border-bottom: 1px solid var(--border-light);
            vertical-align: middle;
            font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
        }

        .products-table tbody tr:hover {
            background: var(--neutral-50);
        }

        .empty-table-message {
            text-align: center;
            padding: 3rem 1rem;
            color: var(--neutral-500);
        }

        .empty-table-message i {
            font-size: 3rem;
            margin-bottom: 1rem;
            color: var(--neutral-300);
        }

        /* ===== PAYMENT SECTION ===== */
        .payment-section {
            background: var(--neutral-50);
            border-left: 4px solid var(--primary);
        }

        .payment-options {
            background: var(--neutral-0);
            border-radius: var(--radius);
            padding: 1.5rem;
            margin-top: 1rem;
            border: 1px solid var(--border-color);
        }

        .payment-details {
            background: var(--success-light); /* Now #e7f1ff */
            border: 1px solid var(--success); /* Now #007bff */
            border-radius: var(--radius);
            padding: 1.25rem;
            margin-top: 1rem;
        }

        .payment-account-info {
            background: var(--info-light);
            padding: 0.75rem 1rem;
            border-radius: var(--radius-sm);
            margin-top: 0.5rem;
            font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
        }

        /* ===== STATUS BADGES ===== */
        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.75rem;
            border-radius: var(--radius-full);
            font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
            font-weight: 500;
            white-space: nowrap;
        }

        .status-paid {
            background: var(--success-light); /* Now #e7f1ff */
            color: var(--success-dark); /* Now #0056b3 */
        }

        .status-partial {
            background: var(--warning-light);
            color: var(--warning-dark);
        }

        .status-pending {
            background: var(--danger-light);
            color: var(--danger-dark);
        }

        /* ===== MODALS ===== */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.75);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: clamp(1rem, 3vw, 1.5rem);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal {
            background: var(--surface);
            border-radius: var(--radius-xl);
            width: 100%;
            max-width: min(800px, 95vw);
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-2xl);
            transform: translateY(20px);
            transition: var(--transition);
        }

        .modal-overlay.active .modal {
            transform: translateY(0);
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: clamp(1.25rem, 3vw, 1.5rem);
            border-bottom: 1px solid var(--border-light);
        }

        .modal-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: clamp(1.25rem, 3vw, 1.5rem);
            font-weight: 600;
            color: var(--neutral-900);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--neutral-500);
            cursor: pointer;
            padding: 0.25rem;
            line-height: 1;
        }

        .modal-body {
            padding: clamp(1.25rem, 3vw, 1.5rem);
        }

        .modal-footer {
            display: flex;
            gap: 1rem;
            padding: clamp(1.25rem, 3vw, 1.5rem);
            border-top: 1px solid var(--border-light);
            justify-content: flex-end;
        }

        /* ===== FILE UPLOAD ===== */
        .file-input-wrapper {
            border: 2px dashed var(--border-color);
            border-radius: var(--radius);
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
            background: var(--neutral-50);
        }

        .file-input-wrapper:hover {
            border-color: var(--primary);
            background: var(--primary-10);
        }

        .file-input-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
        }

        .file-input-content i {
            font-size: 2rem;
            color: var(--primary);
        }

        .image-preview-container {
            margin-top: 1rem;
            text-align: center;
        }

        .image-preview {
            max-width: 150px;
            max-height: 150px;
            border-radius: var(--radius);
            border: 1px solid var(--border-color);
        }

        /* ===== UTILITY CLASSES ===== */
        .hidden { display: none !important; }
        .text-center { text-align: center; }
        .text-muted { color: var(--neutral-500); }
        .mb-4 { margin-bottom: 1.5rem; }
        .mt-1 { margin-top: 0.25rem; }
        .mt-2 { margin-top: 0.5rem; }
        .mt-3 { margin-top: 0.75rem; }
        .mt-4 { margin-top: 1rem; }
        .mt-5 { margin-top: 1.5rem; }
        .mt-6 { margin-top: 2rem; }

        /* ===== RESPONSIVE ADJUSTMENTS ===== */
        @media (max-width: 768px) {
            .page-container {
                padding: 1rem;
            }
            
            .card {
                padding: 1.25rem;
            }
            
            .modal-body .grid-3,
            .modal-body .grid-2 {
                grid-template-columns: 1fr;
            }
            
            .products-table th,
            .products-table td {
                padding: 0.75rem 0.5rem;
                font-size: 0.8125rem;
            }
            
            .btn {
                width: 100%;
                justify-content: center;
            }
            
            .modal-footer {
                flex-direction: column;
            }
            
            .modal-footer .btn {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .header h1 {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }
            
            .switch-container {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
            
            .grid-2, .grid-3 {
                grid-template-columns: 1fr;
            }
            
            .section-title {
                flex-wrap: wrap;
            }
            
            .payment-details .grid-3 {
                grid-template-columns: 1fr;
                gap: 0.5rem;
            }
        }

        /* ===== SCANNER MODAL ===== */
        .scanner-modal {
            max-width: min(600px, 95vw);
        }

        .scanner-preview {
            width: 100%;
            height: 300px;
            background: var(--neutral-900);
            border-radius: var(--radius);
            overflow: hidden;
            margin-bottom: 1rem;
        }

        .scanner-preview video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .scanner-status {
            text-align: center;
            padding: 1rem;
            background: var(--neutral-50);
            border-radius: var(--radius);
            margin-bottom: 1rem;
            font-weight: 500;
        }

        /* ===== LOADER ===== */
        .loader-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .loader-spinner {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* ===== ALERTS ===== */
        .alert-container {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1001;
            max-width: 400px;
        }

        .alert {
            padding: 1rem 1.25rem;
            border-radius: var(--radius);
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            box-shadow: var(--shadow-lg);
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .alert-success {
            background: var(--success-light); /* Now #e7f1ff */
            color: var(--success-dark); /* Now #0056b3 */
            border-left: 4px solid var(--success); /* Now #007bff */
        }

        .alert-error {
            background: var(--danger-light);
            color: var(--danger-dark);
            border-left: 4px solid var(--danger);
        }

        .alert-warning {
            background: var(--warning-light);
            color: var(--warning-dark);
            border-left: 4px solid var(--warning);
        }

        /* ===== CHECKBOX STYLING ===== */
        input[type="checkbox"] {
            width: 1.25rem;
            height: 1.25rem;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* ===== SCAN ICON ===== */
        .scan-icon {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.25rem;
            color: var(--neutral-500);
            transition: var(--transition-fast);
        }

        .scan-icon:hover {
            color: var(--primary);
        }

        /* ===== TEXT SMALL ===== */
        small {
            font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
            color: var(--neutral-500);
            display: block;
            margin-top: 0.25rem;
        }