@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* === Color Palette === */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #6366f1;
    --accent-primary-hover: #818cf8;
    --accent-primary-glow: rgba(99, 102, 241, 0.3);
    --accent-success: #10b981;
    --accent-success-glow: rgba(16, 185, 129, 0.3);
    --accent-warning: #f59e0b;
    --accent-warning-glow: rgba(245, 158, 11, 0.3);
    --accent-danger: #ef4444;
    --accent-danger-glow: rgba(239, 68, 68, 0.3);
    --accent-info: #06b6d4;

    /* === Spacing === */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* === Radius === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* === Shadows === */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-primary: 0 0 20px var(--accent-primary-glow);
    --shadow-glow-success: 0 0 20px var(--accent-success-glow);

    /* === Sidebar === */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
}

/* === THEME: Matcha Forest 🍵 === */
[data-theme="matcha"] {
    --bg-primary: #0a1a14;
    --bg-secondary: #0f2318;
    --bg-card: rgba(15, 35, 24, 0.8);
    --bg-glass: rgba(16, 185, 129, 0.06);
    --bg-glass-hover: rgba(16, 185, 129, 0.10);
    --border-glass: rgba(16, 185, 129, 0.12);
    --border-glass-hover: rgba(16, 185, 129, 0.22);
    --text-primary: #e8f5f0;
    --text-secondary: #8cb8a4;
    --text-muted: #5a8f78;
    --accent-primary: #10b981;
    --accent-primary-hover: #34d399;
    --accent-primary-glow: rgba(16, 185, 129, 0.3);
    --accent-success: #22c55e;
    --accent-success-glow: rgba(34, 197, 94, 0.3);
    --accent-warning: #eab308;
    --accent-warning-glow: rgba(234, 179, 8, 0.3);
    --accent-danger: #f43f5e;
    --accent-danger-glow: rgba(244, 63, 94, 0.3);
    --accent-info: #2dd4bf;
}

/* === THEME: Caramel Latte 🍞 === */
[data-theme="caramel"] {
    --bg-primary: #1a1612;
    --bg-secondary: #231e18;
    --bg-card: rgba(35, 30, 24, 0.8);
    --bg-glass: rgba(217, 119, 6, 0.06);
    --bg-glass-hover: rgba(217, 119, 6, 0.10);
    --border-glass: rgba(217, 119, 6, 0.12);
    --border-glass-hover: rgba(217, 119, 6, 0.22);
    --text-primary: #fef3e2;
    --text-secondary: #c4a882;
    --text-muted: #8b7355;
    --accent-primary: #d97706;
    --accent-primary-hover: #f59e0b;
    --accent-primary-glow: rgba(217, 119, 6, 0.3);
    --accent-success: #16a34a;
    --accent-success-glow: rgba(22, 163, 74, 0.3);
    --accent-warning: #ea580c;
    --accent-warning-glow: rgba(234, 88, 12, 0.3);
    --accent-danger: #dc2626;
    --accent-danger-glow: rgba(220, 38, 38, 0.3);
    --accent-info: #0ea5e9;
}

/* === THEME: Berry Smoothie 🫐 === */
[data-theme="berry"] {
    --bg-primary: #170a1a;
    --bg-secondary: #1f1023;
    --bg-card: rgba(31, 16, 35, 0.8);
    --bg-glass: rgba(225, 29, 72, 0.06);
    --bg-glass-hover: rgba(225, 29, 72, 0.10);
    --border-glass: rgba(225, 29, 72, 0.12);
    --border-glass-hover: rgba(225, 29, 72, 0.22);
    --text-primary: #fce7f3;
    --text-secondary: #c084a8;
    --text-muted: #8b5c78;
    --accent-primary: #e11d48;
    --accent-primary-hover: #fb7185;
    --accent-primary-glow: rgba(225, 29, 72, 0.3);
    --accent-success: #a3e635;
    --accent-success-glow: rgba(163, 230, 53, 0.3);
    --accent-warning: #fbbf24;
    --accent-warning-glow: rgba(251, 191, 36, 0.3);
    --accent-danger: #f43f5e;
    --accent-danger-glow: rgba(244, 63, 94, 0.3);
    --accent-info: #c084fc;
}

/* === THEME: Ocean Breeze 🌊 === */
[data-theme="ocean"] {
    --bg-primary: #0a141a;
    --bg-secondary: #0f1e27;
    --bg-card: rgba(15, 30, 39, 0.8);
    --bg-glass: rgba(6, 182, 212, 0.06);
    --bg-glass-hover: rgba(6, 182, 212, 0.10);
    --border-glass: rgba(6, 182, 212, 0.12);
    --border-glass-hover: rgba(6, 182, 212, 0.22);
    --text-primary: #e0f7fa;
    --text-secondary: #80c8d4;
    --text-muted: #4d8d9a;
    --accent-primary: #06b6d4;
    --accent-primary-hover: #22d3ee;
    --accent-primary-glow: rgba(6, 182, 212, 0.3);
    --accent-success: #10b981;
    --accent-success-glow: rgba(16, 185, 129, 0.3);
    --accent-warning: #f59e0b;
    --accent-warning-glow: rgba(245, 158, 11, 0.3);
    --accent-danger: #ef4444;
    --accent-danger-glow: rgba(239, 68, 68, 0.3);
    --accent-info: #38bdf8;
}

/* === THEME: Vanilla Cream 🍦 (Light Mode) === */
[data-theme="vanilla"] {
    --bg-primary: #faf7f2;
    --bg-secondary: #f0ebe3;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(124, 58, 237, 0.05);
    --bg-glass-hover: rgba(124, 58, 237, 0.09);
    --border-glass: rgba(124, 58, 237, 0.12);
    --border-glass-hover: rgba(124, 58, 237, 0.22);
    --bg-surface: #f5f1eb;
    --text-primary: #1e1b2e;
    --text-secondary: #5b5675;
    --text-muted: #8a84a0;
    --accent-primary: #7c3aed;
    --accent-primary-hover: #8b5cf6;
    --accent-primary-glow: rgba(124, 58, 237, 0.25);
    --accent-success: #059669;
    --accent-success-glow: rgba(5, 150, 105, 0.25);
    --accent-warning: #d97706;
    --accent-warning-glow: rgba(217, 119, 6, 0.25);
    --accent-danger: #dc2626;
    --accent-danger-glow: rgba(220, 38, 38, 0.25);
    --accent-info: #0284c7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Light theme overrides for elements using hardcoded dark rgba */
[data-theme="vanilla"] .sidebar {
    background: #ede8e0;
    border-color: rgba(124, 58, 237, 0.1);
}

[data-theme="vanilla"] .glass-card,
[data-theme="vanilla"] .glass-card-static {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="vanilla"] .data-table td {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="vanilla"] .data-table th {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="vanilla"] .modal-content {
    background: #f5f1eb;
}

[data-theme="vanilla"] .form-select option,
[data-theme="vanilla"] .form-input option {
    background: #f5f1eb;
    color: #1e1b2e;
}

[data-theme="vanilla"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="vanilla"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="vanilla"] .btn-ghost {
    border-color: rgba(0, 0, 0, 0.1);
    color: #5b5675;
}

[data-theme="vanilla"] .btn-ghost:hover {
    background: rgba(124, 58, 237, 0.08);
    color: #1e1b2e;
}

[data-theme="vanilla"] .sidebar-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

/* === THEME SWITCHER UI === */
.theme-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.25rem 0.75rem 0.5rem;
    justify-content: center;
}

.theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0;
    background: none;
}

.theme-dot .theme-dot-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.theme-dot:hover {
    transform: scale(1.2);
}

.theme-dot:hover .theme-dot-inner {
    box-shadow: 0 0 10px currentColor;
}

.theme-dot.active {
    border-color: var(--accent-primary);
    transform: scale(1.15);
}

.theme-dot.active .theme-dot-inner {
    box-shadow: 0 0 8px currentColor;
}

[data-theme] {
    animation: themeSwitch 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes themeSwitch {
    0% { filter: brightness(1.05) contrast(1.02); }
    100% { filter: brightness(1) contrast(1); }
}

/* === RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body,
#app {
    height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 5px var(--accent-primary-glow);
    }

    50% {
        box-shadow: 0 0 25px var(--accent-primary-glow);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.4s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Stagger animations */
.stagger-1 {
    animation-delay: 0.05s;
    animation-fill-mode: both;
}

.stagger-2 {
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.stagger-3 {
    animation-delay: 0.15s;
    animation-fill-mode: both;
}

.stagger-4 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.stagger-5 {
    animation-delay: 0.25s;
    animation-fill-mode: both;
}

.stagger-6 {
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

/* === GLASS CARD === */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.glass-card-static {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    color: white;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-primary);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #059669);
    color: white;
}

.btn-success:hover {
    box-shadow: var(--shadow-glow-success);
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-warning), #d97706);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 38px;
    height: 38px;
}

.btn-block {
    width: 100%;
}

/* === INPUTS === */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    cursor: pointer;
}

.form-select option, .form-input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* === EMOJI GRID PICKER === */
.emoji-grid-picker {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    scrollbar-width: thin;
}

.emoji-grid-picker::-webkit-scrollbar {
    width: 4px;
}

.emoji-grid-picker::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.emoji-grid-picker .emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    font-size: 1.4rem;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.emoji-grid-picker .emoji-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
    transform: scale(1.15);
}

.emoji-grid-picker .emoji-item.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary-glow);
    transform: scale(1.1);
}

.emoji-grid-picker .emoji-item-none {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    word-break: break-word;
    text-align: center;
    line-height: 1.1;
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-info);
}

/* === TAB NAVIGATION === */
.tab-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0;
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
    width: 100%;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-nav .tab-item {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tab-nav .tab-item:hover {
    color: var(--text-secondary);
}

.tab-nav .tab-item.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* === TABLES === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-glass);
}

.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-glass-hover);
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
    padding: var(--space-md);
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.modal-close:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

/* === STATUS INDICATORS === */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green {
    background: var(--accent-success);
    box-shadow: 0 0 6px var(--accent-success-glow);
}

.status-dot.yellow {
    background: var(--accent-warning);
    box-shadow: 0 0 6px var(--accent-warning-glow);
}

.status-dot.red {
    background: var(--accent-danger);
    box-shadow: 0 0 6px var(--accent-danger-glow);
}

/* === STAT CARDS === */
.stat-card {
    padding: var(--space-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.stat-card .stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === GRID UTILITIES === */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* === FLEX UTILITIES === */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

/* === TEXT UTILITIES === */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 2rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-success {
    color: var(--accent-success) !important;
}

.text-warning {
    color: var(--accent-warning) !important;
}

.text-danger {
    color: var(--accent-danger) !important;
}

.text-primary-accent {
    color: var(--accent-primary) !important;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === SPACING UTILITIES === */
.p-sm {
    padding: var(--space-sm);
}

.p-md {
    padding: var(--space-md);
}

.p-lg {
    padding: var(--space-lg);
}

.p-xl {
    padding: var(--space-xl);
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

/* === LAYOUT: STAFF SIDEBAR === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.sidebar-brand .brand-text {
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.sidebar-brand .brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: var(--space-md) var(--space-sm) var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.625rem var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-danger);
    color: white;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-glass);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-success));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl) var(--space-2xl);
    min-height: 100vh;
    min-width: 0; /* Critical: allows flex child to shrink below content width */
    transition: margin-left 0.3s ease;
}

/* === SIDEBAR COLLAPSED (desktop only) === */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-sub {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    padding: var(--space-md);
    justify-content: center;
}

.sidebar.collapsed .nav-section-label {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.625rem;
    gap: 0;
    position: relative;
}

.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-item:not(i) {
    font-size: 0;
}

/* Hide text nodes in nav-items when collapsed */
.sidebar.collapsed .nav-item {
    font-size: 0;
    color: transparent;
}
.sidebar.collapsed .nav-item i {
    font-size: 1.15rem;
    color: var(--text-secondary);
}
.sidebar.collapsed .nav-item.active i {
    color: var(--accent-primary);
}
.sidebar.collapsed .nav-item:hover i {
    color: var(--text-primary);
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    color: white;
}

.sidebar.collapsed .sidebar-footer {
    padding: var(--space-sm);
}

/* Theme & Language switcher in collapsed sidebar */
.sidebar.collapsed .theme-switcher {
    flex-wrap: wrap;
    gap: 4px;
    padding: 0.25rem 0 0.4rem;
    justify-content: center;
}

.sidebar.collapsed .theme-dot {
    width: 18px;
    height: 18px;
}

.sidebar.collapsed .theme-dot .theme-dot-inner {
    width: 11px;
    height: 11px;
}

.sidebar.collapsed .sidebar-footer > div:nth-child(2) {
    /* language switcher row */
    flex-direction: column;
    gap: 1px;
    padding: 0.15rem 0 0.35rem !important;
}

.sidebar.collapsed .sidebar-footer > div:nth-child(2) button {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
}

.sidebar.collapsed .user-name,
.sidebar.collapsed .user-role {
    display: none;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.sidebar.collapsed .user-info > div:not(.user-avatar) {
    display: none;
}

.sidebar.collapsed .user-info .btn-icon {
    display: none;
}

.sidebar.collapsed + .sidebar-toggle-desktop {
    left: var(--sidebar-collapsed);
}

.app-layout.sidebar-is-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Sidebar collapse toggle button (desktop only) */
.sidebar-toggle-desktop {
    display: none;
}

@media (min-width: 1025px) {
    .sidebar-toggle-desktop {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 28px;
        left: var(--sidebar-width);
        transform: translateX(-50%);
        z-index: 101;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: var(--bg-secondary);
        border: 1px solid var(--border-glass-hover);
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.75rem;
    }

    .sidebar-toggle-desktop:hover {
        background: var(--accent-primary);
        color: white;
        border-color: var(--accent-primary);
        box-shadow: var(--shadow-glow-primary);
    }

    .app-layout.sidebar-is-collapsed .sidebar-toggle-desktop {
        left: var(--sidebar-collapsed);
    }
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-xs);
}

/* === CUSTOMER LAYOUT === */
.customer-layout {
    min-height: 100vh;
    background: var(--bg-primary);
}

.customer-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    padding: var(--space-2xl) var(--space-xl) var(--space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.customer-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    border-radius: 50%;
}

.customer-hero h1 {
    font-size: 1.5rem;
    font-weight: 800;
    position: relative;
}

.customer-hero .table-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: var(--space-sm);
    position: relative;
}

.category-pills {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-glass);
}

.category-pill {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.category-pill.active,
.category-pill:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
}

.menu-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.menu-card .menu-emoji {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: rgba(99, 102, 241, 0.05);
}

.menu-card .menu-info {
    padding: var(--space-md);
}

.menu-card .menu-name {
    font-size: 0.875rem;
    font-weight: 700;
}

.menu-card .menu-price {
    font-size: 0.8rem;
    color: var(--accent-success);
    font-weight: 600;
    margin-top: var(--space-xs);
}

.menu-card .menu-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-card.sold-out {
    opacity: 0.5;
    pointer-events: none;
}

.menu-card.sold-out .menu-emoji::after {
    content: 'SOLD OUT';
    position: absolute;
    font-size: 0.75rem;
    background: var(--accent-danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Floating Cart Bar */
.floating-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-glass);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.3s ease-out;
}

.floating-cart .cart-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.floating-cart .cart-count {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* === POS LAYOUT === */
.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: var(--space-lg);
    align-items: start;
    min-height: calc(100vh - var(--topbar-height) - var(--space-xl) * 2 - 60px);
}

.pos-menu-panel {
    min-width: 0; /* prevent flex/grid overflow */
    overflow: hidden;
}

.pos-receipt-panel {
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.pos-receipt-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-glass);
}

.pos-receipt-items {
    padding: var(--space-md);
}

.pos-receipt-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-glass);
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.receipt-item .item-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.receipt-item .item-qty {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.receipt-item .item-price {
    font-size: 0.875rem;
    font-weight: 600;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 800;
    padding-top: var(--space-md);
    border-top: 2px solid var(--border-glass);
}

/* === TABLE FLOOR === */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-md);
}

.table-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.table-cell:hover {
    transform: scale(1.05);
}

.table-cell.available {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.table-cell.occupied {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.table-cell.waiting {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.table-cell.reserved {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.table-cell .table-num {
    font-size: 1.5rem;
    font-weight: 800;
}

.table-cell .table-status {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* === KITCHEN CARDS === */
.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.kitchen-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.kitchen-card.priority-green {
    border-left: 4px solid var(--accent-success);
}

.kitchen-card.priority-yellow {
    border-left: 4px solid var(--accent-warning);
}

.kitchen-card.priority-red {
    border-left: 4px solid var(--accent-danger);
}

.kitchen-card-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
}

.kitchen-card-body {
    padding: var(--space-lg);
}

.kitchen-card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-glass);
    display: flex;
    gap: var(--space-sm);
}

.kitchen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
}

.kitchen-item .item-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.kitchen-item .item-qty {
    background: var(--bg-glass);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.8rem;
}

/* === TRAFFIC LIGHT (Expiry Monitor) === */
.expiry-row.expired {
    background: rgba(239, 68, 68, 0.08);
}

.expiry-row.warning {
    background: rgba(245, 158, 11, 0.08);
}

.expiry-row.safe {
    background: transparent;
}

/* === ORDER TRACKER (Customer) === */
.order-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: var(--space-lg);
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex: 0 0 auto;
}

.tracker-step .step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 2px solid var(--border-glass);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tracker-step.active .step-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow-primary);
}

.tracker-step.completed .step-icon {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: white;
}

.tracker-step .step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tracker-step.active .step-label {
    color: var(--accent-primary);
}

.tracker-step.completed .step-label {
    color: var(--accent-success);
}

.tracker-line {
    width: 40px;
    height: 2px;
    background: var(--border-glass);
    margin-bottom: 24px;
}

.tracker-line.completed {
    background: var(--accent-success);
}

/* === PAYMENT METHODS === */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.payment-option {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.payment-option:hover {
    border-color: var(--accent-primary);
}

.payment-option.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.payment-option i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.payment-option span {
    font-size: 0.875rem;
    font-weight: 600;
}

/* === RESPONSIVE (consolidated at end of file) === */

/* === LOADING / EMPTY STATES === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

/* === MISC === */
.divider {
    height: 1px;
    background: var(--border-glass);
    margin: var(--space-md) 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.6rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tooltip {
    position: relative;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* === PUBLIC AUTH/INTRO CONTROLS === */
.customer-controls {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.customer-controls .theme-switcher {
    padding: 0;
    gap: 4px;
}

.customer-controls .theme-dot {
    width: 20px;
    height: 20px;
}

.customer-controls .theme-dot .theme-dot-inner {
    width: 12px;
    height: 12px;
}

.lang-btn {
    border: none;
    border-radius: 6px;
    padding: 0.28rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.lang-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    font-weight: 700;
}

/* Login page compact layout */
.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    max-height: 90vh;
    overflow-y: auto;
    padding: clamp(1.75rem, 5vw, 2.5rem);
    max-width: min(90vw, 420px);
    width: 100%;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-radius: var(--radius-xl);
}

.pin-display-section {
    text-align: center;
    margin-bottom: 1rem;
}

.pin-boxes {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.4rem;
    margin-top: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.pin-box {
    height: 44px;
    border-radius: 10px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    transition: all 0.2s ease;
    flex: 1;
}

.pin-box.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary-glow);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: min(95vw, 300px);
    margin: 0 auto;
    box-sizing: border-box;
}

.pin-btn {
    height: 50px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.pin-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
}

.pin-btn.pin-clear,
.pin-btn.pin-backspace {
    font-size: 0.95rem;
}

.login-controls {
    margin-top: 0.9rem;
    padding-top: var(--space-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.login-controls .theme-switcher {
    padding: 0;
    gap: 4px;
}

@media (max-width: 768px) {
    .customer-controls {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .login-container {
        min-height: 100dvh;
        padding: 1.5rem 1rem;
    }

    .login-card {
        max-height: 92vh;
        padding: 1.5rem;
        max-width: 95vw;
        margin: 0;
        border-radius: var(--radius-lg);
        box-shadow: 0 16px 32px rgba(0,0,0,0.4);
    }

    .pin-boxes {
        gap: 0.5rem;
    }

    .pin-box {
        height: 48px;
        font-size: 1.25rem;
        border-radius: 12px;
    }

    .pin-keypad {
        max-width: 280px;
        gap: 0.6rem;
        margin-top: 1rem;
    }

    .pin-btn {
        height: 56px;
        font-size: 1.4rem;
        font-weight: 800;
        border-radius: 14px;
        min-height: 56px;
    }

    .pin-btn.pin-clear,
    .pin-btn.pin-backspace {
        font-size: 1.1rem;
    }

    .login-controls {
        margin-top: 1.25rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-glass);
    }
}

@media (max-width: 480px) {
    .login-container,
    .login-card,
    .pin-display-section,
    .pin-keypad {
        max-width: 95vw !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .login-card {
        padding: 1rem !important;
    }

    .pin-boxes {
        gap: 0.2rem !important;
        max-width: 100% !important;
        margin: 0.5rem auto 0.75rem !important;
    }

    .pin-box {
        height: 52px;
        font-size: 1.4rem;
        border-radius: 14px;
    }

    .pin-keypad {
        gap: 0.25rem !important;
        max-width: 100% !important;
        margin: 0 auto 1rem !important;
        padding: 0 !important;
    }

    .pin-btn {
        height: 64px !important;
        min-height: 64px !important;
        width: 100% !important;
        font-size: 1.6rem !important;
        font-weight: 800;
        border-radius: 16px !important;
    }

    .pin-btn.pin-clear,
    .pin-btn.pin-backspace {
        font-size: 1.3rem !important;
    }

    .login-controls {
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
    }
}

.relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

/* === KDS: TABS === */
.kds-tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 4px;
}

.kds-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.kds-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.kds-tab.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.kds-tab-badge {
    background: rgba(255, 255, 255, 0.2);
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.kds-tab:not(.active) .kds-tab-badge {
    background: var(--accent-danger);
    color: white;
}

/* === KDS: CHECKBOXES === */
.kds-checkbox {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-glass-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.kds-checkbox.checked {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: white;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.kds-check-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-xs) !important;
    margin: 0 calc(-1 * var(--space-xs));
}

.kds-check-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.kds-text-done {
    text-decoration: line-through;
    opacity: 0.5;
}

.kds-item-done {
    opacity: 0.6;
}

.kds-order-done {
    border-color: rgba(16, 185, 129, 0.3) !important;
    opacity: 0.7;
}

/* === KDS: BATCH CARDS === */
.kds-batch-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border-left: 4px solid var(--accent-primary);
}

.kds-batch-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-glass);
    flex-wrap: wrap;
}

.kds-batch-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kds-batch-body {
    padding: var(--space-sm) var(--space-lg);
}

.kds-batch-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xs);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.kds-batch-row:last-child {
    border-bottom: none;
}

.kds-batch-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* === MENU CARD: CART BADGE & REMOVE === */
.menu-card-active {
    border: 2px solid var(--accent-primary) !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* Bottom control bar: [−] [qty] [+] [🗑] */
.menu-card-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.375rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    animation: fadeIn 0.2s ease-out;
}

.mcc-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mcc-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.mcc-btn.mcc-del {
    margin-left: auto;
    color: var(--accent-danger);
    font-size: 0.7rem;
}

.mcc-btn.mcc-del:hover {
    background: var(--accent-danger);
    color: white;
}

.mcc-qty {
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
    color: var(--accent-primary);
}

/* === MOBILE TOPBAR === */
.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: var(--space-md);
}

/* === SIDEBAR BACKDROP === */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99;
    animation: fadeIn 0.2s ease-out;
}

/* === RESPONSIVE (ALL BREAKPOINTS) === */

/* -- Helper: make data-tables scrollable -- */
.table-responsive,
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Auto-scroll tables inside glass cards on small screens */
.glass-card-static:has(.data-table),
.glass-card:has(.data-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .data-table {
        min-width: 500px;
    }

/* Transactions info bar */
.trx-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* -- Spinner for submit buttons -- */
.spinner-sm {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====== TABLET (≤ 1024px) ====== */
@media (max-width: 1024px) {
    /* Sidebar hidden, slide-in on open */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    /* Reset collapsed state on tablet — always full sidebar in overlay */
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .brand-sub,
    .sidebar.collapsed .nav-section-label,
    .sidebar.collapsed .user-name,
    .sidebar.collapsed .user-role {
        display: revert;
    }
    .sidebar.collapsed .nav-item {
        font-size: 0.875rem;
        color: var(--text-secondary);
        justify-content: flex-start;
        gap: var(--space-md);
    }
    .sidebar.collapsed .user-info > div:not(.user-avatar),
    .sidebar.collapsed .user-info .btn-icon {
        display: revert;
    }
    .sidebar.collapsed .sidebar-footer {
        padding: var(--space-md) var(--space-lg);
    }
    .sidebar.collapsed .sidebar-brand {
        padding: var(--space-lg) var(--space-xl);
        justify-content: flex-start;
    }

    /* Hide desktop toggle on tablet/mobile */
    .sidebar-toggle-desktop {
        display: none !important;
    }

    /* Override collapsed margin */
    .app-layout.sidebar-is-collapsed .main-content {
        margin-left: 0;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .main-content {
        margin-left: 0;
        padding: var(--space-lg);
    }

    .app-layout.sidebar-is-collapsed .main-content {
        margin-left: 0;
    }

    .mobile-topbar {
        display: flex;
    }

    .sidebar-backdrop {
        display: block;
    }

    /* Larger touch targets for theme dots on mobile */
    .theme-switcher {
        gap: 10px;
        padding: 0.5rem 0.75rem;
    }
    .theme-dot {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    .theme-dot .theme-dot-inner {
        width: 22px;
        height: 22px;
    }

    /* Grids: 4→2, keep 3 and 2 */
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); }

    /* POS layout: stack menu above receipt on tablet portrait */
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }

    .pos-receipt-panel {
        max-height: none;
    }

    .pos-receipt-items {
        max-height: none;
        overflow: visible;
    }

    /* Kitchen grid: 2-col on tablet */
    .kitchen-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Table floor: 4 cols */
    .table-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Payment grid */
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ====== MOBILE (≤ 768px) ====== */
@media (max-width: 768px) {
    /* Lock page horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 100dvh;
        overflow: hidden;
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Larger theme switcher for mobile - FIXED for sidebar */
    .theme-switcher {
        gap: 12px;
        padding: 0.5rem;
    }
    .sidebar .theme-dot {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    .sidebar.collapsed .theme-dot {
        width: 44px !important;
        height: 44px !important;
    }
    .theme-dot .theme-dot-inner {
        width: 28px;
        height: 28px;
    }

    /* Better mobile tables */
    .data-table {
        min-width: 450px;
    }
    .glass-card:has(.data-table) {
        padding: 0.5rem;
        border-radius: 12px;
    }

    /* Prevent any child from pushing page wider */
    .animate-fade-in {
        overflow: hidden;
        min-width: 0;
        max-width: 100%;
    }

    /* All grids become 1-col */
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }

    /* Transactions info bar stacks on mobile */
    .trx-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Kitchen grid stacks */
    .kitchen-grid {
        grid-template-columns: 1fr;
    }

    /* Customer menu grid: 2-col */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* === POS MOBILE PORTRAIT FIXES === */
    .pos-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        min-height: auto;
    }

    .pos-menu-panel {
        min-width: 0;
        overflow-x: hidden;
    }

    /* Receipt panel: no max-height, let content flow naturally */
    .pos-receipt-panel {
        max-height: none;
        overflow: visible;
    }

    /* No separate scroll for items — unified area */
    .pos-receipt-items {
        max-height: none;
        overflow: visible;
        padding: var(--space-sm) var(--space-md);
    }

    .pos-receipt-footer {
        padding: var(--space-md);
    }

    .pos-receipt-header {
        padding: var(--space-md);
    }

    /* Header action buttons wrap on mobile */
    .page-header .flex.gap-sm {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Payment grid 2-col on portrait phone */
    .payment-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.25rem !important;
    }

    /* Compact receipt items */
    .receipt-item .item-name {
        font-size: 0.8rem;
    }
    .receipt-item .item-qty {
        font-size: 0.7rem;
    }
    .receipt-item .item-price {
        font-size: 0.8rem;
    }
    .receipt-total {
        font-size: 1.1rem;
    }

    /* Waiting payment / incoming order cards: stack on mobile */
    .glass-card-static {
        overflow: hidden;
    }
    .glass-card-static > div[style*="justify-content:space-between"] {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Table floor: 3-col */
    .table-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-sm);
    }
    .page-header h1 {
        font-size: 1.35rem;
    }
    .page-header p {
        font-size: 0.8rem;
    }

    /* Modals: max 95vw width */
    .modal-content,
    .modifier-modal {
        max-width: 95vw;
        padding: var(--space-lg);
    }

    /* Tab nav: scrollable with smaller font */
    .tab-nav .tab-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }

    /* Stat cards: smaller values */
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    /* KDS batch header */
    .kds-batch-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Data table: compact cells */
    .data-table th {
        padding: 0.5rem 0.625rem;
        font-size: 0.65rem;
    }
    .data-table td {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
    .data-table {
        min-width: 500px;
    }

    /* === ADMIN PAGE MOBILE FIXES === */

    /* Tab nav: scroll hint with fade gradient */
    .tab-nav {
        position: relative;
        padding-bottom: 0;
        margin-bottom: var(--space-md);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }

    .tab-nav .tab-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .tab-nav .tab-item i {
        font-size: 0.8rem;
    }

    /* Admin card headers: wrap on mobile */
    .glass-card-static > .flex.items-center.justify-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Glass card padding reduced */
    .glass-card-static.p-lg {
        padding: var(--space-md) !important;
    }

    /* Printer/Settings 2-col grids: stack on mobile */
    .admin-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Payment gateway max-width removed */
    .glass-card-static[style*="max-width:700px"] {
        max-width: none !important;
    }

    /* Receipt total */
    .receipt-total {
        font-size: 1.1rem;
    }

    /* Payment grid */
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    .payment-option {
        padding: var(--space-md);
    }
    .payment-option i {
        font-size: 1.25rem;
    }
    .payment-option span {
        font-size: 0.8rem;
    }

    /* Fixed modals positioning (glass-card modals) */
    div[style*="position:fixed"][style*="transform:translate"] {
        width: 95vw !important;
        max-width: 95vw !important;
        left: 50% !important;
    }

    /* Floating cart bar compact */
    .floating-cart {
        padding: var(--space-sm) var(--space-md);
    }

    /* Order tracker wrap */
    .order-tracker {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    .tracker-line {
        width: 24px;
    }
    .tracker-step .step-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .tracker-step .step-label {
        font-size: 0.6rem;
    }
}

/* ====== SMALL MOBILE (≤ 480px) ====== */
@media (max-width: 480px) {
    .main-content {
        padding: var(--space-sm);
        padding-top: 0;
    }

    /* Menu grid: 2-col tight */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    /* Menu card compact */
    .menu-card .menu-emoji {
        height: 80px;
        font-size: 2.5rem;
    }
    .menu-card .menu-info {
        padding: var(--space-sm);
    }
    .menu-card .menu-name {
        font-size: 0.75rem;
    }
    .menu-card .menu-price {
        font-size: 0.7rem;
    }

    /* Table floor: 3-col */
    .table-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }
    .table-cell .table-num {
        font-size: 1.25rem;
    }
    .table-cell .table-status {
        font-size: 0.6rem;
    }

    /* Page header / typography */
    .page-header h1 {
        font-size: 1.2rem;
    }

    /* Full-width modals */
    .modal-content,
    .modifier-modal {
        max-width: 100%;
        margin: var(--space-xs);
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }

    .modifier-groups-container {
        max-height: 40vh;
    }

    /* Sidebar brand compact */
    .sidebar-brand {
        padding: var(--space-md) var(--space-lg);
    }
    .sidebar-brand .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    /* Stat cards smaller */
    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    /* Payment grid 1-col on very small */
    .payment-grid {
        grid-template-columns: 1fr;
    }

    /* Customer hero compact */
    .customer-hero {
        padding: var(--space-xl) var(--space-md) var(--space-md);
    }
    .customer-hero h1 {
        font-size: 1.25rem;
    }

    /* Category pills compact */
    .category-pills {
        padding: var(--space-sm) var(--space-md);
    }
    .category-pill {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
    }

    /* Buttons compact */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    /* Tab nav even smaller */
    .tab-nav .tab-item {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
    .tab-nav .tab-item i {
        display: none;
    }

    /* KDS tabs compact */
    .kds-tab {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Emoji grid: 6 cols */
    .emoji-grid-picker {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Split bill - smaller circles */
    .split-progress-bar {
        height: 6px;
    }
}

/* ====== LANDSCAPE PHONE ====== */
@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding: var(--space-sm) var(--space-md);
    }

    .page-header {
        margin-bottom: var(--space-md);
    }
    .page-header h1 {
        font-size: 1.25rem;
    }

    /* POS on landscape phone: side-by-side with scrollable receipt */
    .pos-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        height: calc(100vh - 60px);
        overflow: hidden;
    }

    .pos-menu-panel {
        overflow-y: auto;
        max-height: calc(100vh - 60px);
    }

    .pos-receipt-panel {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .pos-receipt-items {
        max-height: none;
        overflow: visible;
    }

    .pos-receipt-footer {
        padding: var(--space-sm) var(--space-md);
    }

    .pos-receipt-header {
        padding: var(--space-sm) var(--space-md);
    }

    /* Kitchen grid: 2-col landscape */
    .kitchen-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    /* Stat cards compact */
    .stat-card {
        padding: var(--space-sm);
    }
    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    /* Menu grid: more cols in landscape */
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    /* Modal smaller height */
    .modal-content {
        max-height: 95vh;
    }
}

/* === MODIFIER SYSTEM === */
.modifier-hint {
    font-size: 0.65rem;
    color: var(--accent-primary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.8;
}

.modifier-modal {
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.modifier-groups-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    max-height: 50vh;
    overflow-y: auto;
    padding-right: var(--space-xs);
}

.modifier-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.modifier-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modifier-group-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 0.9rem;
}

.modifier-items {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.modifier-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.625rem 0.75rem;
    background: var(--bg-glass);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modifier-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
}

.modifier-item.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary-glow);
}

.modifier-radio,
.modifier-check {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.modifier-item.selected .modifier-radio,
.modifier-item.selected .modifier-check {
    color: var(--accent-primary);
}

.modifier-item-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.modifier-item-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.modifier-item.selected .modifier-item-name {
    font-weight: 600;
    color: var(--text-primary);
}

.modifier-item-price {
    font-size: 0.75rem;
    color: var(--accent-success);
    font-weight: 600;
    white-space: nowrap;
    margin-left: var(--space-sm);
}

.modifier-total {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: var(--space-md);
}

/* Cart modifier tags */
.cart-modifiers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.cart-modifier-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.125rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.cart-modifier-tag .text-success {
    color: var(--accent-success) !important;
    font-weight: 600;
}

@media (max-width: 480px) {
    .modifier-modal {
        max-width: 100%;
        margin: 0.5rem;
    }

    .modifier-groups-container {
        max-height: 40vh;
    }
}

/* === RECEIPT PRINT PREVIEW === */
.receipt-print-area {
    background: var(--bg-elevated);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: 'Courier New', monospace;
}

.receipt-header-print {
    text-align: center;
    margin-bottom: 0.5rem;
}

.receipt-divider {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.375rem 0;
    text-align: center;
    letter-spacing: 0.05rem;
}

.receipt-print-item {
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

/* Kitchen Ticket */
.kitchen-ticket {
    border: 2px dashed var(--border-glass-hover);
    background: rgba(245, 158, 11, 0.03);
}

/* === SPLIT BILL === */
.split-progress-bar {
    height: 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 0.25rem;
}

.split-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-success), var(--accent-primary));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* === DISCOUNT === */
.discount-option {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.discount-option:hover {
    border-color: var(--border-glass-hover);
    background: var(--bg-glass-hover);
}

.discount-option.selected {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.08);
}

/* === BUNDLE CARD === */
.bundle-card {
    border: 1px solid rgba(16, 185, 129, 0.15);
    transition: all 0.2s ease;
}

.bundle-card:hover {
    border-color: var(--accent-success);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

/* Strikethrough text */
.text-line-through {
    text-decoration: line-through;
}

/* ML spacing */
.ml-sm { margin-left: var(--space-sm); }
.ml-xs { margin-left: var(--space-xs); }