/* =============================================
   POS Digital - Restaurant Management System
   Responsive CSS for Phone, iPad, Computer
   ============================================= */

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #64748b;
    --success: #22c55e;
    --success-light: #dcfce7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #06b6d4;
    --info-light: #cffafe;

    --bg: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    --text: #1e293b;
    --text-light: #64748b;
    --text-white: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --topbar-height: 60px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    font-family: 'Inter', 'Kantumruy Pro', -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========== LOGIN SCREEN ========== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(-45deg, #0f172a, #1e293b, #312e81, #1e1b4b);
    background-size: 400% 400%;
    animation: loginGradient 12s ease infinite;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

@keyframes loginGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating particles */
.login-bg-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.login-bg-particles .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(129, 140, 248, 0.3);
    border-radius: 50%;
    animation: floatParticle 15s infinite linear;
}
.login-bg-particles .particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 18s; width: 8px; height: 8px; }
.login-bg-particles .particle:nth-child(2) { left: 30%; top: 60%; animation-delay: 2s; animation-duration: 14s; }
.login-bg-particles .particle:nth-child(3) { left: 55%; top: 15%; animation-delay: 4s; animation-duration: 20s; width: 10px; height: 10px; }
.login-bg-particles .particle:nth-child(4) { left: 70%; top: 75%; animation-delay: 1s; animation-duration: 16s; }
.login-bg-particles .particle:nth-child(5) { left: 85%; top: 40%; animation-delay: 3s; animation-duration: 22s; width: 5px; height: 5px; }
.login-bg-particles .particle:nth-child(6) { left: 45%; top: 85%; animation-delay: 5s; animation-duration: 17s; width: 7px; height: 7px; }

@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translateY(-200px) translateX(40px) scale(1.4); opacity: 0.3; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-400px) translateX(-20px) scale(0.8); opacity: 0; }
}

/* Container — split layout */
.login-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 560px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
    animation: loginSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left panel — branding */
.login-left {
    flex: 0 0 360px;
    background: linear-gradient(160deg, var(--primary-dark) 0%, #1e1b4b 100%);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.15);
    top: -80px;
    right: -80px;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(129, 140, 248, 0.1);
    bottom: -60px;
    left: -40px;
}

.login-brand {
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    animation: brandPulse 3s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4); }
    50% { box-shadow: 0 8px 40px rgba(79, 70, 229, 0.6); }
}

.login-brand-icon i {
    font-size: 36px;
    color: #fff;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.login-tagline {
    color: rgba(255,255,255,0.8);
    font-size: 15px;
    font-family: 'Kantumruy Pro', sans-serif;
}

.login-tagline-en {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    margin-top: 4px;
}

.login-clock {
    margin-top: 36px;
    text-align: center;
    color: rgba(255,255,255,0.9);
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    font-variant-numeric: tabular-nums;
}

.login-features {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.login-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.login-feature-item i {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary-light);
}

/* Right panel — form */
.login-right {
    flex: 1;
    background: var(--bg-card);
    padding: 40px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 320px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    font-family: 'Kantumruy Pro', sans-serif;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 28px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-icon-wrapper input {
    padding-left: 42px;
    padding-right: 42px;
    height: 48px;
    border-radius: 12px;
    font-size: 14px;
}

.input-icon-wrapper input:focus + .input-icon,
.input-icon-wrapper input:focus ~ .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--primary);
}

.login-field {
    margin-bottom: 16px;
}

.btn-login {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Kantumruy Pro', 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-divider {
    text-align: center;
    margin: 24px 0 20px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 16px;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PIN Section */
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pin-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    transition: all 0.2s;
}

.pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

.pin-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 240px;
    margin: 0 auto;
}

.pin-key {
    width: 100%;
    aspect-ratio: 1.6;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-key:hover {
    background: var(--primary-light);
    color: #fff;
    border-color: var(--primary-light);
}

.pin-key:active {
    transform: scale(0.93);
}

.pin-key-clear {
    background: var(--danger-light);
    color: var(--danger);
    border-color: transparent;
}

.pin-key-clear:hover {
    background: var(--danger);
    color: #fff;
}

.pin-key-enter {
    background: var(--success-light);
    color: var(--success);
    border-color: transparent;
}

.pin-key-enter:hover {
    background: var(--success);
    color: #fff;
}

.login-error {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--danger-light);
    color: var(--danger);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    animation: shakeError 0.4s ease;
}

/* Login Blocked / Lockout UI */
.login-blocked {
    margin-top: 16px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 14px;
    text-align: center;
    animation: fadeInBlock 0.3s ease;
}

.blocked-icon {
    font-size: 32px;
    color: #dc2626;
    margin-bottom: 8px;
    animation: pulseBlock 2s ease-in-out infinite;
}

.blocked-title {
    font-size: 16px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 6px;
}

.blocked-desc {
    font-size: 13px;
    color: #b91c1c;
    margin-bottom: 12px;
    line-height: 1.5;
}

.blocked-countdown {
    font-size: 36px;
    font-weight: 800;
    color: #dc2626;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.blocked-hint {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

@keyframes pulseBlock {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes fadeInBlock {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ========== LOGIN METHOD TABS ========== */
.login-method-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.login-method-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Kantumruy Pro', 'Inter', sans-serif;
}

.login-method-tab:hover {
    color: var(--primary);
}

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

.login-section {
    transition: opacity 0.2s;
}

.login-section.hidden {
    display: none;
}

.pin-user-label {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

.login-divider {
    text-align: center;
    margin: 24px 0 20px;
    position: relative;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    position: relative;
    background: var(--bg-card);
    padding: 0 16px;
    color: var(--text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
}

.form-group label i {
    width: 18px;
    color: var(--text-light);
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-card);
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #475569; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: transparent; color: var(--text-light); }
.btn-icon:hover { background: var(--bg); color: var(--text); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== APP LAYOUT ========== */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header i {
    font-size: 24px;
    color: var(--primary-light);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
}

.sidebar-menu {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.menu-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.menu-item.active {
    background: var(--primary);
    color: white;
}

.menu-item i {
    width: 22px;
    text-align: center;
    font-size: 16px;
}

.menu-item .badge {
    position: absolute;
    right: 12px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: var(--text-white);
}

.user-info i { font-size: 24px; color: var(--primary-light); }
.user-info span { font-size: 13px; font-weight: 500; }
.user-info small { font-size: 11px; color: #94a3b8; width: 100%; padding-left: 34px; margin-top: -6px; }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-time {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* ========== NOTIFICATION SYSTEM ========== */
.notif-wrapper {
    position: relative;
}

.notif-bell {
    position: relative;
    font-size: 18px;
}

.notif-bell i.fa-shake {
    animation: fa-shake 1.5s ease-in-out infinite;
    color: var(--warning);
}

@keyframes fa-shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate(12deg); }
    50% { transform: rotate(0deg); }
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 10px;
    padding: 0 4px;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(239,68,68,0.4);
}

.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 460px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.18), 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-light, #f8fafc);
}

.notif-header h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.notif-header h4 i {
    color: var(--primary);
    margin-right: 6px;
}

.notif-header .btn-ghost {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.notif-header .btn-ghost:hover {
    background: var(--primary-light);
}

.notif-list {
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.notif-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    color: var(--success);
    opacity: 0.5;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.15s;
    position: relative;
}

.notif-item:hover {
    background: var(--bg-light, #f8fafc);
}

.notif-item.unread {
    background: rgba(99, 102, 241, 0.04);
    border-left: 3px solid var(--primary);
}

.notif-item.unread:hover {
    background: rgba(99, 102, 241, 0.08);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.04);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notif-status-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.notif-status-tag.preparing {
    background: var(--warning-light);
    color: #92400e;
}

.notif-status-tag.ready {
    background: var(--success-light);
    color: #166534;
}

.notif-order {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
}

.notif-time i {
    margin-right: 2px;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ========== ORDER NOTIFICATION IN MODAL ========== */
.order-status-banner {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.order-status-banner.ready {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.3);
    animation: bannerGlow 2s ease-in-out infinite;
}

.order-status-banner.partial-ready {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.order-status-banner.preparing {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    color: #9a3412;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.order-status-banner i {
    font-size: 18px;
}

@keyframes bannerGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
    50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
}

.order-row-ready {
    background: rgba(34, 197, 94, 0.06) !important;
}

.order-row-preparing {
    background: rgba(245, 158, 11, 0.06) !important;
}

.order-notif-section {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.order-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-light, #f8fafc);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.order-notif-header i {
    color: var(--warning);
    margin-right: 6px;
}

.order-notif-count {
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    margin-left: 6px;
}

.order-notif-timeline {
    padding: 8px 0;
    max-height: 200px;
    overflow-y: auto;
}

.order-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 14px;
    position: relative;
}

.order-notif-item.unread {
    background: rgba(99, 102, 241, 0.04);
}

.order-notif-item::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 26px;
    bottom: -6px;
    width: 2px;
    background: var(--border);
}

.order-notif-item:last-child::before {
    display: none;
}

.order-notif-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    color: white;
    z-index: 1;
}

.order-notif-dot.ready {
    background: var(--success);
}

.order-notif-dot.preparing {
    background: var(--warning);
}

.order-notif-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.order-notif-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.order-notif-time {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    white-space: nowrap;
}

.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

/* ========== DASHBOARD STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #eef2ff; color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }

.stat-info h4 {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-top: 4px;
}

/* ========== TABLE MAP ========== */
.table-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px;
}

.table-card-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.table-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-legend-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 8px 16px;
    background: var(--bg-light, #f8fafc);
    border-bottom: 1px solid var(--border);
}

.table-zone-header {
    padding: 10px 16px 4px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-badge {
    position: absolute;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    line-height: 1.2;
}
.table-badge-order {
    top: 6px;
    left: 6px;
    background: var(--danger);
}
.table-badge-phone {
    top: 6px;
    right: 6px;
    background: var(--warning);
}
.table-badge-notif {
    bottom: 6px;
    right: 6px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    animation: notifPulse 2s ease-in-out infinite;
}
.table-badge-notif.preparing {
    background: var(--warning);
}
.table-badge-notif.ready {
    background: var(--success);
}

/* ===== Table Notification Indicator ===== */
.table-customer-pending {
    border: 2px solid #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25), 0 0 12px rgba(245, 158, 11, 0.1);
    animation: tableNotifGlowOrange 2s ease-in-out infinite;
}

.table-notif-ready {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3), 0 0 12px rgba(34, 197, 94, 0.15);
    animation: tableNotifGlowGreen 2s ease-in-out infinite;
}

.table-notif-preparing {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3), 0 0 12px rgba(245, 158, 11, 0.15);
    animation: tableNotifGlowOrange 2s ease-in-out infinite;
}

@keyframes tableNotifGlowGreen {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2), 0 0 8px rgba(34, 197, 94, 0.1); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.35), 0 0 20px rgba(34, 197, 94, 0.2); }
}

@keyframes tableNotifGlowOrange {
    0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2), 0 0 8px rgba(245, 158, 11, 0.1); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.35), 0 0 20px rgba(245, 158, 11, 0.2); }
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.table-notif-indicator {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.table-notif-indicator.ready {
    background: var(--success);
    color: white;
}

.table-notif-indicator.preparing {
    background: var(--warning);
    color: white;
}

.table-notif-indicator i {
    font-size: 10px;
}

.legend-dot.notif-preparing {
    background: var(--warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.legend-dot.notif-ready {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.table-item {
    aspect-ratio: 1;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
    padding: 12px;
    position: relative;
}

.table-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.table-item.available {
    background: var(--success-light);
    border-color: var(--success);
    color: #166534;
}

.table-item.occupied {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #991b1b;
}

.table-item.reserved {
    background: var(--warning-light);
    border-color: var(--warning);
    color: #92400e;
}

.table-item.dirty {
    background: #f1f5f9;
    border-color: var(--secondary);
    color: var(--secondary);
}

.table-item .table-number {
    font-size: 22px;
    font-weight: 700;
}

.table-item .table-capacity {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.8;
}

.table-item .table-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
}

.table-item .table-zone {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.table-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.available { background: var(--success); }
.legend-dot.occupied { background: var(--danger); }
.legend-dot.reserved { background: var(--warning); }
.legend-dot.dirty { background: var(--secondary); }

/* ========== POS LAYOUT ========== */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    height: calc(100vh - var(--topbar-height) - 48px);
}

.pos-menu-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.category-tabs {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

.category-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-tab:hover:not(.active) {
    border-color: var(--primary-light);
    color: var(--primary);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
}

.menu-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
    box-shadow: var(--shadow);
}

.menu-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.menu-card:active {
    transform: scale(0.95);
}

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

.menu-card .menu-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
    color: var(--primary);
}

.menu-card .menu-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.menu-card .menu-name-kh {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.menu-card .menu-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Menu Item Image in POS */
.menu-card.has-image {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.menu-card .menu-item-img {
    width: 100%;
    flex: 1;
    min-height: 20px;
    overflow: hidden;
}

.menu-card .menu-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.menu-card:hover .menu-item-img img {
    transform: scale(1.05);
}

.menu-card.has-image .menu-name,
.menu-card.has-image .menu-name-kh,
.menu-card.has-image .menu-price {
    padding: 0 8px;
}

.menu-card.has-image .menu-name {
    margin-top: 6px;
}

.menu-card.has-image .menu-price {
    padding-bottom: 8px;
}

/* pic-mode without image: no icon, just text */
.menu-card.pic-mode:not(.has-image) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ========== CART / ORDER PANEL ========== */
.cart-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-header {
    padding: 6px 6px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.cart-header h3 {
    font-size: 32px;
    font-weight: 700;
}

.cart-header h3 i {
    font-size: 32px;
}

.cart-table-info {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    background: #eef2ff;
    padding: 8px 20px;
    border-radius: 14px;
}

.cart-table-info i {
    font-size: 24px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 12px;
    color: var(--text-light);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text);
    transition: var(--transition);
}

.cart-item-qty button:hover { background: var(--primary); color: white; border-color: var(--primary); }

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-item-total {
    font-weight: 600;
    font-size: 14px;
    min-width: 60px;
    text-align: right;
}

.cart-item .remove-item {
    color: var(--danger);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.cart-empty i { font-size: 40px; margin-bottom: 12px; color: #cbd5e1; }

.cart-summary {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 8px;
    border-top: 2px solid var(--border);
    margin-top: 4px;
}

.cart-actions {
    padding: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.cart-actions .btn { flex: 1; min-width: 0; }

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

.kitchen-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border-left: 5px solid var(--warning);
}

.kitchen-card.alert {
    border-left-color: var(--danger);
    animation: pulse-border 1.5s infinite;
}

.kitchen-card.ready {
    border-left-color: var(--success);
    opacity: 0.7;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

.kitchen-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.kitchen-order-num {
    font-weight: 700;
    font-size: 15px;
}

.kitchen-table {
    font-size: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.kitchen-timer {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kitchen-timer.warning { color: var(--warning); }
.kitchen-timer.alert { color: var(--danger); }

.kitchen-items {
    padding: 12px 16px;
}

.kitchen-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.kitchen-item:last-child { border-bottom: none; }

.kitchen-item-info {
    flex: 1;
}

.kitchen-item-name {
    font-weight: 500;
    font-size: 14px;
}

.kitchen-item-note {
    font-size: 13px;
    color: #dc2626;
    font-weight: 600;
    font-style: italic;
    margin-top: 2px;
}

.kitchen-item-qty {
    background: var(--primary);
    color: white;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    margin-right: 10px;
}

.kitchen-card-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.kitchen-card-actions .btn { flex: 0 0 auto; font-size: 13px; white-space: nowrap; }

/* ========== ORDER LIST ========== */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-row {
    display: grid;
    grid-template-columns: 120px 80px 1fr 100px 110px 100px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.order-row:hover { box-shadow: var(--shadow-lg); }

/* ========== INVENTORY TABLE ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table tr:hover td { background: #f8fafc; }

.data-table .low-stock {
    color: var(--danger);
    font-weight: 600;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.pending { background: var(--warning-light); color: #92400e; }
.status-badge.preparing { background: var(--info-light); color: #0e7490; }
.status-badge.ready { background: var(--success-light); color: #166534; }
.status-badge.served { background: #eef2ff; color: var(--primary); }
.status-badge.completed { background: var(--success-light); color: #166534; }
.status-badge.cancelled { background: var(--danger-light); color: #991b1b; }

/* ========== REPORTS / CHARTS ========== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.chart-container {
    position: relative;
    height: 280px;
    padding: 16px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 0 8px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bar {
    width: 100%;
    max-width: 50px;
    border-radius: 6px 6px 0 0;
    background: var(--primary);
    transition: height 0.5s ease;
    min-height: 4px;
}

.bar-label {
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
    white-space: nowrap;
}

.bar-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
}

/* Top items list */
.top-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.top-item:last-child { border-bottom: none; }

.top-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.top-rank:nth-child(1) { background: #f59e0b; }

.top-item-info { flex: 1; }
.top-item-name { font-weight: 500; font-size: 13px; }
.top-item-qty { font-size: 12px; color: var(--text-light); }
.top-item-amount { font-weight: 700; font-size: 14px; color: var(--primary); }

/* Progress bar */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.blue { background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.orange { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* ========== STAFF CARDS ========== */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.staff-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.staff-card:hover { box-shadow: var(--shadow-lg); }

.staff-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 12px;
}

.staff-name { font-size: 16px; font-weight: 600; }
.staff-role { font-size: 12px; color: var(--text-light); text-transform: uppercase; margin-top: 4px; }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    min-height: 60px;
    max-height: 60px;
}

.modal-footer .btn {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: toastIn 0.3s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========== PRINT RECEIPT (THERMAL ROLL PAPER 80mm) ========== */
.print-area {
    display: none;
}

/* Receipt Preview (in modal) */
.receipt-preview {
    background: #fff;
    width: 280px;
    margin: 0 auto;
    padding: 16px 12px;
    font-family: 'Courier New', 'Kantumruy Pro', monospace;
    font-size: 12px;
    color: #000;
    line-height: 1.4;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.receipt-preview .receipt-logo {
    text-align: center;
    margin-bottom: 8px;
}

.receipt-preview .receipt-logo i {
    font-size: 28px;
    color: var(--primary);
}

.receipt-preview .receipt-header {
    text-align: center;
    margin-bottom: 6px;
}

.receipt-preview .receipt-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.receipt-preview .receipt-header p {
    margin: 1px 0;
    font-size: 11px;
    color: #444;
}

.receipt-preview .receipt-divider {
    border: none;
    border-top: 1px dashed #000;
    margin: 6px 0;
}

.receipt-preview .receipt-info {
    font-size: 11px;
    margin-bottom: 2px;
}

.receipt-preview .receipt-info span {
    display: inline-block;
}

.receipt-preview .receipt-items-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 11px;
    border-bottom: 1px solid #000;
    padding-bottom: 3px;
    margin-bottom: 4px;
}

.receipt-preview .receipt-item {
    margin-bottom: 3px;
}

.receipt-preview .receipt-item-name {
    font-size: 12px;
    font-weight: 500;
}

.receipt-preview .receipt-item-detail {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding-left: 8px;
    color: #333;
}

.receipt-preview .receipt-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 1px 0;
}

.receipt-preview .receipt-row.total {
    font-weight: 700;
    font-size: 15px;
    padding: 4px 0;
}

.receipt-preview .receipt-row.paid {
    font-weight: 600;
    color: #166534;
}

.receipt-preview .receipt-footer {
    text-align: center;
    margin-top: 8px;
    font-size: 11px;
    color: #444;
}

.receipt-preview .receipt-footer p {
    margin: 2px 0;
}

.receipt-preview .receipt-barcode {
    text-align: center;
    margin: 8px 0 4px;
    font-family: 'Libre Barcode 39', cursive;
    font-size: 36px;
    letter-spacing: 2px;
}

.receipt-preview .receipt-cut {
    text-align: center;
    font-size: 10px;
    color: #999;
    margin-top: 8px;
    letter-spacing: 3px;
}

/* Print styles for thermal roll paper */
@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    html, body {
        width: 80mm;
        margin: 0;
        padding: 0;
        overflow: visible;
        height: auto;
    }

    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }

    .print-area {
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 72mm;
        padding: 2mm 4mm;
        font-family: 'Courier New', monospace;
        font-size: 11px;
        color: #000;
        line-height: 1.35;
        background: #fff;
    }

    .print-area .receipt-logo {
        text-align: center;
        margin-bottom: 2mm;
    }

    .print-area .receipt-logo i {
        font-size: 24px;
    }

    .print-area .receipt-header {
        text-align: center;
        margin-bottom: 2mm;
    }

    .print-area .receipt-header h2 {
        font-size: 14px;
        font-weight: 700;
        margin: 0;
    }

    .print-area .receipt-header p {
        margin: 0;
        font-size: 10px;
    }

    .print-area .receipt-divider {
        border: none;
        border-top: 1px dashed #000;
        margin: 1.5mm 0;
    }

    .print-area .receipt-info {
        font-size: 10px;
        margin-bottom: 1px;
    }

    .print-area .receipt-items-header {
        display: flex;
        justify-content: space-between;
        font-weight: 700;
        font-size: 10px;
        border-bottom: 1px solid #000;
        padding-bottom: 1mm;
        margin-bottom: 1mm;
    }

    .print-area .receipt-item {
        margin-bottom: 1mm;
    }

    .print-area .receipt-item-name {
        font-size: 11px;
        font-weight: 600;
    }

    .print-area .receipt-item-detail {
        display: flex;
        justify-content: space-between;
        font-size: 10px;
        padding-left: 2mm;
    }

    .print-area .receipt-row {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        padding: 0.5mm 0;
    }

    .print-area .receipt-row.total {
        font-size: 14px;
        font-weight: 700;
        padding: 1mm 0;
    }

    .print-area .receipt-row.paid {
        font-weight: 600;
    }

    .print-area .receipt-footer {
        text-align: center;
        margin-top: 2mm;
        font-size: 10px;
    }

    .print-area .receipt-footer p {
        margin: 1px 0;
    }

    .print-area .receipt-barcode {
        text-align: center;
        margin: 2mm 0 1mm;
        font-size: 28px;
        letter-spacing: 2px;
    }

    .print-area .receipt-cut {
        text-align: center;
        font-size: 9px;
        color: #999;
        margin-top: 3mm;
        letter-spacing: 2px;
    }

    /* Hide everything else */
    .app, .modal-overlay, .sidebar, .topbar, .toast-container {
        display: none !important;
    }
}

/* ========== HELPER CLASSES ========== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar input, .filter-bar select {
    max-width: 200px;
}

.search-input {
    position: relative;
}

.search-input i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-input input {
    padding-left: 38px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .cart-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60vh;
        z-index: 200;
        transform: translateY(calc(100% - 60px));
        transition: var(--transition);
        border-radius: var(--radius) var(--radius) 0 0;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    }

    .cart-panel.expanded {
        transform: translateY(0);
    }

    .cart-panel .cart-header {
        cursor: pointer;
        padding: 6px 6px;
        gap: 4px;
        flex-wrap: nowrap;
        min-height: 44px;
    }

    .cart-panel .cart-header h3 {
        font-size: 18px;
        white-space: nowrap;
        line-height: 1.2;
    }

    .cart-panel .cart-header h3 i {
        font-size: 18px;
    }

    .cart-panel .cart-table-info {
        font-size: 15px;
        padding: 3px 10px;
        border-radius: 8px;
        white-space: nowrap;
    }

    .cart-panel .cart-table-info i {
        font-size: 15px;
    }

    .cart-pull-indicator {
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
        margin: 8px auto;
        display: block;
    }

    .order-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 500;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 499;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .page-container {
        padding: 12px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

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

    .stat-card {
        padding: 14px;
    }

    .stat-info .stat-value {
        font-size: 18px;
    }

    .table-map {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .table-item {
        aspect-ratio: auto;
        padding: 14px 10px;
        min-height: 90px;
    }

    .table-item .table-number {
        font-size: 18px;
    }

    .table-item .table-zone {
        display: none;
    }

    .table-item > i.fas {
        display: none !important;
    }

    .table-edit-btn {
        opacity: 1;
        width: 22px;
        height: 22px;
        font-size: 9px;
    }

    .table-notif-indicator {
        top: -6px;
        padding: 2px 8px;
        font-size: 10px;
    }
    .table-notif-indicator i {
        font-size: 9px;
    }
    .table-badge-notif {
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 10px;
    }

    .table-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-legend-bar {
        gap: 10px;
        padding: 8px 12px;
        justify-content: center;
    }

    .table-legend-bar .legend-item {
        font-size: 11px;
    }

    .table-legend-bar .legend-dot {
        width: 10px;
        height: 10px;
    }

    .table-zone-header {
        padding: 8px 12px 2px;
        font-size: 12px;
    }

    .table-badge {
        font-size: 9px;
        padding: 1px 5px;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .kitchen-grid {
        grid-template-columns: 1fr;
    }

    .kitchen-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    .kitchen-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th, .data-table td {
        padding: 8px;
        white-space: nowrap;
    }

    .modal-content {
        max-width: 98%;
        max-height: 95vh;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 8px 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 5px;
        min-height: 56px;
        max-height: 56px;
    }

    .modal-footer .btn {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 12px;
        padding: 7px 10px;
    }

    .topbar {
        padding: 0 16px;
    }

    .page-title {
        font-size: 15px;
    }

    /* Notification panel mobile */
    .notif-panel {
        position: fixed;
        top: var(--topbar-height);
        right: 0;
        left: 0;
        width: 100%;
        max-height: calc(100vh - var(--topbar-height) - 20px);
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .notif-bell {
        font-size: 16px;
    }

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

    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-header .btn-group {
        width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .menu-card {
        padding: 10px;
    }

    .menu-card.has-image {
        padding: 0;
    }

    .menu-name {
        font-size: 12px;
    }

    .staff-grid {
        grid-template-columns: 1fr;
    }

    .table-map {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .table-item {
        aspect-ratio: auto;
        padding: 12px 6px;
        min-height: 80px;
        border-width: 2px;
    }

    .table-item .table-number {
        font-size: 16px;
    }

    .table-item .table-capacity {
        font-size: 10px;
        margin-top: 2px;
    }

    .table-item .table-status {
        font-size: 9px;
        padding: 1px 6px;
        margin-top: 4px;
    }

    .table-item .table-zone {
        display: none;
    }

    .table-item > i.fas {
        display: none !important;
    }

    .table-item span[style*="position:absolute"] {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }

    .table-edit-btn {
        opacity: 1;
        width: 20px;
        height: 20px;
        font-size: 8px;
    }

    .table-notif-indicator {
        top: -5px;
        padding: 2px 6px;
        font-size: 9px;
        gap: 3px;
    }
    .table-notif-indicator i {
        font-size: 8px;
    }
    .table-badge-notif {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 9px;
        bottom: 4px;
        right: 4px;
    }

    .table-legend {
        gap: 10px;
    }

    .legend-item {
        font-size: 11px;
    }

    .table-legend-bar {
        gap: 8px;
        padding: 6px 10px;
    }

    .table-legend-bar .legend-item {
        font-size: 10px;
        gap: 4px;
    }

    .table-legend-bar .legend-dot {
        width: 8px;
        height: 8px;
    }

    .table-zone-header {
        padding: 6px 10px 2px;
        font-size: 11px;
    }

    .table-badge {
        font-size: 8px;
        padding: 1px 4px;
    }

    .login-container {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }
    .login-left {
        flex: 0 0 auto;
        padding: 20px 24px 12px;
    }
    .login-clock { margin-top: 8px; font-size: 22px; }
    .login-features { display: none; }
    .login-right { padding: 20px 20px 28px; }
    .login-brand-icon { width: 48px; height: 48px; border-radius: 14px; }
    .login-brand-icon i { font-size: 22px; }
    .login-brand h1 { font-size: 20px; }
    .login-title { font-size: 20px; }
    .login-subtitle { margin-bottom: 16px; font-size: 12px; }
    
    /* Phone PIN optimization */
    .login-method-tabs {
        margin-bottom: 16px;
    }
    .login-method-tab {
        padding: 10px 8px;
        font-size: 13px;
    }
    .pin-user-label {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .pin-dots {
        gap: 8px;
        margin-bottom: 14px;
    }
    .pin-dot {
        width: 12px;
        height: 12px;
    }
    .pin-keypad {
        max-width: 280px;
        gap: 10px;
    }
    .pin-key {
        aspect-ratio: 1.4;
        font-size: 22px;
        border-radius: 14px;
        -webkit-tap-highlight-color: transparent;
    }
    .pin-key:active {
        transform: scale(0.9);
        background: var(--primary);
        color: white;
    }

    .btn-group {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 4px;
    }

    .btn-group .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .modal-content {
        max-width: 100%;
        max-height: 98vh;
        border-radius: var(--radius-sm);
    }

    .modal-overlay {
        padding: 4px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-header h3 {
        font-size: 15px;
    }

    .modal-body {
        padding: 12px;
    }

    .modal-footer {
        padding: 6px 10px;
        gap: 4px;
        min-height: 50px;
        max-height: 50px;
    }

    .modal-footer .btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .cart-summary {
        padding: 12px;
    }

    .cart-actions {
        padding: 10px;
        gap: 6px;
    }

    .cart-actions .btn {
        font-size: 13px;
        padding: 10px 8px;
    }

    .kitchen-card-actions .btn {
        font-size: 11px;
        padding: 6px 10px;
    }

    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .category-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 12px;
    }

    .data-table {
        font-size: 11px;
    }

    .data-table th, .data-table td {
        padding: 6px;
    }

    .topbar {
        padding: 0 10px;
        gap: 8px;
    }

    #current-time {
        font-size: 11px;
    }

    .page-title {
        font-size: 13px;
    }

    .toast {
        padding: 10px 14px;
        font-size: 12px;
        max-width: 90vw;
    }

    .cart-panel {
        height: 70vh;
    }

    .summary-row {
        font-size: 13px;
    }

    .summary-row.total {
        font-size: 15px;
    }
}

/* ========== LOADING SPINNER ========== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

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

.page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.page-loading .spinner {
    width: 40px;
    height: 40px;
    border-color: var(--border);
    border-top-color: var(--primary);
}

/* ========== DATE FILTER ========== */
.date-range-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-range-filter label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}

.date-range-filter input[type="date"] {
    max-width: 160px;
    padding: 8px 12px;
}

/* ========== MENU CARD BADGES (POS) ========== */
.menu-card {
    position: relative;
}

.menu-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 2;
}

.menu-stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 2;
}

.menu-stock-badge.out {
    background: var(--danger);
    color: white;
}

.menu-stock-badge.low {
    background: var(--warning);
    color: white;
}

.menu-trending-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 3px;
    animation: trendingPulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    letter-spacing: 0.5px;
}

.menu-trending-badge i {
    font-size: 10px;
    color: #ffe066;
}

.menu-card.trending {
    border: 2px solid #ff6b3540;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.12);
}

.menu-card.trending:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
}

/* Trending badge + stock badge positioning: shift stock down when trending */
.menu-card.trending .menu-stock-badge {
    top: 32px;
}

@keyframes trendingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========== LANGUAGE TOGGLE ========== */
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ========== BTN WARNING ========== */
.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    opacity: 0.85;
}

/* ========== CARD MT-24 ========== */
.mt-24 {
    margin-top: 24px !important;
}

/* ========== REPORT HEADER BAR & TABS ========== */
.report-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.report-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 12px;
}

.report-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.report-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

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

.report-actions-bar {
    display: flex;
    gap: 8px;
}

.report-mode-label {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 6px;
}

/* ========== TABLE EDIT BUTTON ========== */
.table-edit-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s;
}

.table-item:hover .table-edit-btn {
    opacity: 1;
}

.table-edit-btn:hover {
    background: var(--primary-dark, #4f46e5);
    transform: scale(1.1);
}

/* ========== RESPONSIVE REPORT ========== */
@media (max-width: 768px) {
    .report-header-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .report-tabs {
        overflow-x: auto;
        justify-content: center;
    }
    .report-tab {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    .report-actions-bar {
        justify-content: center;
    }
    .report-mode-label {
        font-size: 11px;
    }
}

/* ========== EXTRA SMALL PHONE (< 380px) ========== */
@media (max-width: 380px) {
    .login-left {
        padding: 14px 16px 8px;
    }
    .login-right {
        padding: 16px 16px 20px;
    }
    .login-brand h1 { font-size: 18px; }
    .login-clock { font-size: 20px; }
    .login-title { font-size: 18px; }
    .pin-keypad {
        max-width: 240px;
        gap: 8px;
    }
    .pin-key {
        font-size: 20px;
        border-radius: 12px;
    }
    .login-method-tab {
        font-size: 12px;
        padding: 8px 6px;
    }

    /* Table map 2 columns on very small phones */
    .table-map {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 6px;
    }
    .table-item {
        min-height: 72px;
        padding: 10px 4px;
    }
    .table-item .table-number {
        font-size: 15px;
    }
    .table-item .table-capacity {
        font-size: 9px;
    }
    .table-item .table-status {
        font-size: 8px;
        padding: 1px 5px;
    }
    .table-legend-bar {
        gap: 6px;
        padding: 4px 8px;
    }
    .table-legend-bar .legend-item {
        font-size: 9px;
    }
    .table-zone-header {
        padding: 4px 8px 2px;
        font-size: 10px;
    }
    .table-badge {
        font-size: 7px;
        padding: 1px 3px;
    }
}

/* ========================================
   SETTINGS PAGE
   ======================================== */
.settings-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.settings-section-header {
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section-header i {
    color: var(--primary);
    font-size: 16px;
}

.settings-section-body {
    padding: 20px;
}

/* Logo Section */
.settings-logo-section {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.settings-logo-box {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gray-50);
    flex-shrink: 0;
}

.settings-logo-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.settings-logo-empty {
    text-align: center;
    color: var(--gray-400);
}

.settings-logo-empty i {
    font-size: 32px;
    margin-bottom: 6px;
    display: block;
}

.settings-logo-empty span {
    font-size: 11px;
}

.settings-logo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-logo-actions .btn {
    font-size: 13px;
    padding: 8px 16px;
}

.settings-logo-info {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Form Grid */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid-2 .form-group.full-width {
    grid-column: 1 / -1;
}

/* Settings Actions */
.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 8px;
}

.settings-actions .btn {
    min-width: 160px;
    font-size: 14px;
    padding: 12px 24px;
}

/* Receipt Preview in Settings */
.settings-receipt-preview {
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .settings-logo-section {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .settings-actions {
        justify-content: stretch;
    }
    .settings-actions .btn {
        flex: 1;
        min-width: unset;
    }
}

/* Role Permissions Table */
.role-perm-info {
    padding: 10px 14px;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}
.role-perm-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.role-perm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.role-perm-table th,
.role-perm-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.role-perm-table thead th {
    background: var(--bg);
    font-weight: 700;
    font-size: 12px;
    color: var(--text-light);
    position: sticky;
    top: 0;
}
.role-perm-menu-col {
    text-align: left !important;
    min-width: 200px;
}
.role-perm-menu-cell {
    text-align: left !important;
    font-weight: 500;
    white-space: nowrap;
}
.role-perm-menu-cell i {
    width: 20px;
    color: var(--primary);
}
.role-perm-role-col {
    min-width: 80px;
}
.role-perm-check-cell {
    vertical-align: middle;
}
.role-perm-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    cursor: pointer;
}
.role-perm-toggle.locked {
    opacity: 0.6;
    cursor: not-allowed;
}
.role-perm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.role-perm-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 22px;
    transition: 0.2s;
}
.role-perm-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.role-perm-toggle input:checked + .role-perm-slider {
    background: var(--success);
}
.role-perm-toggle input:checked + .role-perm-slider::before {
    transform: translateX(16px);
}
.role-perm-actions {
    margin-top: 16px;
    text-align: right;
}
.role-perm-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}
.role-perm-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== BIOMETRIC / FACE ID ===== */
.biometric-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 20px;
    text-align: center;
}
.biometric-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: bioPulse 2s ease-in-out infinite;
}
.biometric-icon-large {
    font-size: 40px;
    color: #fff;
}
@keyframes bioPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
}
.biometric-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
}
.biometric-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}
.biometric-subtitle-en {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 20px;
}
.btn-biometric-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    font-family: inherit;
}
.btn-biometric-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}
.btn-biometric-login:active {
    transform: translateY(0);
}
.btn-biometric-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
.btn-biometric-login i {
    font-size: 22px;
}
.btn-biometric-remove {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    margin-top: 16px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-biometric-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* Biometric Settings Section */
.biometric-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}
.biometric-status-info.biometric-registered {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.biometric-devices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.biometric-device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* Biometric tab icon styling */
.login-method-tab[data-method="biometric"] i {
    color: inherit;
}
.login-method-tab[data-method="biometric"].active {
    color: #7c3aed;
    border-bottom-color: #7c3aed;
}

