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

:root {
    --bg-main: #0b1120;
    --bg-card: #151f32;
    --bg-card-hover: #1c2a42;
    --bg-input: #0f172a;
    --border-color: #26354d;
    --border-focus: #3b82f6;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.15);
    
    --accent-emerald: #10b981;
    --accent-emerald-light: rgba(16, 185, 129, 0.15);
    --accent-amber: #f59e0b;
    --accent-amber-light: rgba(245, 158, 11, 0.15);
    --accent-cyan: #06b6d4;
    --accent-cyan-light: rgba(6, 182, 212, 0.15);
    --accent-rose: #f43f5e;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.35);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.45);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-text-size-adjust: 100%;
}

/* Background ambient glows */
body::before {
    content: '';
    position: fixed;
    top: -100px;
    left: 20%;
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -100px;
    right: 15%;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: #38bdf8;
}

/* Responsive Container */
.container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}
@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Demo Role Switcher Quick Bar */
.demo-banner {
    background: linear-gradient(90deg, #1e1b4b, #0f172a 50%, #064e3b);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.demo-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.role-switch-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.role-switch-btn {
    padding: 5px 10px;
    min-height: 32px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    text-decoration: none;
    touch-action: manipulation;
}
.role-switch-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: #60a5fa;
    color: #fff;
}
.role-switch-btn.active-role {
    border-color: #10b981;
    color: #34d399;
    background: rgba(16, 185, 129, 0.15);
}

@media (max-width: 600px) {
    .demo-banner {
        padding: 6px 0;
    }
    .demo-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .role-switch-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
}

/* Top Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 8px;
    width: 100%;
    max-width: 1600px;
    padding: 0 1rem;
}
@media (min-width: 768px) {
    .nav-container {
        min-height: 72px;
        gap: 12px;
        padding: 0 1.25rem;
    }
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .brand {
        gap: 12px;
        font-size: 1.35rem;
    }
}
.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563eb, #10b981);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .brand-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}
.brand-text span {
    color: var(--accent-emerald);
}
.brand-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--primary-light);
    color: #60a5fa;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-left: 4px;
    display: inline-block;
}
@media (max-width: 420px) {
    .brand-badge {
        display: none;
    }
}
@media (min-width: 992px) and (max-width: 1280px) {
    .brand-badge {
        display: none;
    }
    .brand {
        font-size: 1.15rem;
        gap: 8px;
    }
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
    }
}

/* Desktop Navigation (>= 992px) */
.desktop-nav {
    display: none;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.desktop-nav::-webkit-scrollbar {
    display: none;
}

.desktop-user {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0 !important;
    margin-left: auto;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 4px;
    }
    .desktop-user {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0 !important;
        white-space: nowrap;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3px;
    list-style: none;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.81rem;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-link i {
    font-size: 0.82rem;
    opacity: 0.85;
}
.nav-link:hover {
    color: var(--text-main);
    background: var(--bg-card);
}
.nav-link.active {
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(37, 99, 235, 0.12);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}
.nav-link.active i {
    opacity: 1;
    color: #60a5fa;
}

@media (min-width: 1400px) {
    .nav-links {
        gap: 6px;
    }
    .nav-link {
        padding: 7px 11px;
        font-size: 0.86rem;
        gap: 6px;
    }
    .nav-link i {
        font-size: 0.88rem;
    }
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 38px;
    box-sizing: border-box;
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.user-chip-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.15;
}
.user-chip-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-main);
    white-space: nowrap;
}
.user-chip-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.role-pill {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.2;
}
.role-admin { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-employee { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

@media (max-width: 1279px) {
    .user-chip-sub {
        display: none !important;
    }
    .user-chip {
        padding: 4px 10px;
        gap: 6px;
        height: 36px;
    }
    .user-chip-name {
        font-size: 0.8rem;
    }
}

/* Theme Toggle Button (Desktop & Mobile) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #fbbf24;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    flex-shrink: 0;
}
.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fbbf24;
    color: #fde68a;
    transform: scale(1.05);
}
.theme-toggle-btn:focus-visible {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

/* Hamburger Toggle Button */
.nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
}
.nav-toggle-btn:hover, .nav-toggle-btn:focus {
    background: var(--bg-card-hover);
    border-color: #3b82f6;
    color: #60a5fa;
    outline: none;
}
@media (min-width: 992px) {
    .nav-toggle-btn {
        display: none;
    }
}

/* Mobile Quick Logout Button (Visible only on mobile <= 991px) */
.mobile-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #f43f5e;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    touch-action: manipulation;
}
.mobile-logout-btn:hover {
    background: rgba(244, 63, 94, 0.22);
    color: #fb7185;
    border-color: #f43f5e;
    transform: scale(1.05);
}
@media (min-width: 992px) {
    .mobile-logout-btn {
        display: none !important;
    }
}

/* Mobile Navigation Drawer */
.mobile-nav-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    background: #0f172a;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.mobile-nav-drawer.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.9);
}
.mobile-close-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}
.mobile-close-btn:hover {
    color: #fff;
    border-color: #f43f5e;
}

.mobile-nav-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.mobile-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.mobile-nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    font-weight: 700;
    margin-top: 6px;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s;
    min-height: 48px;
    touch-action: manipulation;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
    color: #fff;
    background: var(--bg-card);
    border-color: var(--border-color);
}
.mobile-nav-item.active {
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(37, 99, 235, 0.12);
}
.mobile-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #60a5fa;
}

.mobile-role-switcher {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mobile-role-switcher .role-switch-btn {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.85rem;
    justify-content: flex-start;
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    padding: 1.25rem 0 2.5rem;
}
@media (min-width: 768px) {
    .main-content {
        padding: 2rem 0 3rem;
    }
}

/* Cards & Glassmorphism */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(15, 23, 42, 0.3);
}
@media (min-width: 768px) {
    .card-header {
        padding: 1.25rem 1.5rem;
    }
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}
@media (min-width: 768px) {
    .card-title {
        font-size: 1.15rem;
    }
}

.card-body {
    padding: 1.25rem;
}
@media (min-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
}

/* Typography & Headings */
h1, h2, h3, h4, h5 {
    color: var(--text-main);
    font-weight: 700;
}
.page-title {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    margin-bottom: 0.35rem;
    line-height: 1.25;
}
.page-desc {
    color: var(--text-muted);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    line-height: 1.4;
}

/* Header Flex Layout */
.header-flex {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Responsive Grid Utility Classes */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 860px) {
    .grid-2col {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.grid-portal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 992px) {
    .grid-portal {
        grid-template-columns: 360px 1fr;
        gap: 1.5rem;
    }
}

.grid-pos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .grid-pos {
        grid-template-columns: 400px 1fr;
        gap: 1.5rem;
    }
}

.grid-form-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 600px) {
    .grid-form-2col {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-earn {
    background: var(--accent-emerald-light);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-redeem {
    background: var(--accent-amber-light);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-petrol { background: rgba(37, 99, 235, 0.15); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }
.badge-diesel { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-speed { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-cng { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Buttons & Touch Targets */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    touch-action: manipulation;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.btn-success:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background: #26354d;
    border-color: #3b82f6;
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-muted);
}
.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: #fff;
    background: rgba(6, 182, 212, 0.1);
}
.btn-sm {
    padding: 6px 12px;
    min-height: 36px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}
.btn-lg {
    padding: 13px 24px;
    min-height: 48px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

@media (max-width: 480px) {
    .btn-mobile-full {
        width: 100% !important;
    }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.15rem;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.form-control, .form-select {
    width: 100%;
    padding: 11px 14px;
    min-height: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 16px; /* Prevents auto-zoom on mobile Safari */
    transition: all 0.2s ease;
}
@media (min-width: 768px) {
    .form-control, .form-select {
        font-size: 0.95rem;
    }
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background: #111a2e;
}
.form-control::placeholder {
    color: var(--text-subtle);
}
.form-text {
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin-top: 4px;
    line-height: 1.35;
}

/* Metric / Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.25rem;
        margin-bottom: 2rem;
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
@media (min-width: 768px) {
    .stat-card {
        padding: 1.5rem;
    }
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
}
.stat-info {
    flex: 1;
    min-width: 0;
}
.stat-info .stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-info .stat-value {
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.2;
    word-break: break-word;
}
.stat-sub {
    font-size: 0.75rem;
    color: var(--accent-emerald);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .stat-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
}
.icon-blue { background: rgba(37, 99, 235, 0.15); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Tables & Mobile Scrolling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    position: relative;
}
/* Scrollbar styling for smooth mobile touch */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

.table {
    width: 100%;
    min-width: 680px; /* Ensures columns stay readable on mobile without squashing */
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}
@media (min-width: 768px) {
    .table {
        font-size: 0.92rem;
    }
}
.table th {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
@media (min-width: 768px) {
    .table th {
        padding: 12px 16px;
        font-size: 0.8rem;
    }
}
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(38, 53, 77, 0.5);
    color: var(--text-main);
    vertical-align: middle;
}
@media (min-width: 768px) {
    .table td {
        padding: 14px 16px;
    }
}
.table tr:hover td {
    background: rgba(28, 42, 66, 0.4);
}
.table-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
}



/* POS Terminal Specific Styling */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .pos-layout {
        grid-template-columns: 400px 1fr;
        gap: 1.5rem;
    }
}

/* POS Transaction Header & Inline Customer Info */
.pos-tx-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.pos-tx-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}
.pos-header-customer-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pos-header-sep {
    color: var(--text-muted);
    opacity: 0.6;
    font-size: 1.1rem;
}
.pos-header-cust-name {
    color: #38bdf8;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.pos-header-veh-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

@media (max-width: 600px) {
    .pos-tx-card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    .pos-tx-card-title {
        font-size: 1.05rem;
        gap: 6px;
    }
    .pos-header-sep {
        display: none;
    }
    .pos-header-customer-info {
        width: 100%;
        margin-top: 3px;
        gap: 6px;
    }
    .pos-header-cust-name {
        font-size: 0.95rem;
    }
    .pos-header-veh-tag {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
}

/* Section Smooth Highlight when auto-navigating like a bookmark */
.section-highlight {
    animation: bookmarkGlow 2.4s ease-out;
    position: relative;
    border-color: #10b981 !important;
}
.section-highlight::before {
    content: '▶ Active Section';
    position: absolute;
    top: -11px;
    right: 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    z-index: 100;
    pointer-events: none;
    animation: bookmarkBadgeFade 2.4s forwards;
}
@keyframes bookmarkGlow {
    0% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.6), 0 8px 22px rgba(16, 185, 129, 0.25);
        border-color: #10b981;
    }
    30% {
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.35), 0 8px 22px rgba(16, 185, 129, 0.2);
        border-color: #10b981;
    }
    100% {
        box-shadow: var(--shadow-md);
        border-color: var(--border-color);
    }
}
@keyframes bookmarkBadgeFade {
    0% { opacity: 0; transform: translateY(-4px); }
    15% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-6px); }
}

/* RFID Reader Box */
.rfid-scanner-box {
    background: linear-gradient(145deg, #162238, #0f182a);
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}
@media (min-width: 768px) {
    .rfid-scanner-box {
        padding: 2rem 1.5rem;
    }
}
.rfid-scanner-box:hover, .rfid-scanner-box.scanning {
    border-color: #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(145deg, #1a2842, #111b2f);
}

.rfid-pulse-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    position: relative;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: pulse-blue 2s infinite;
}
@media (min-width: 768px) {
    .rfid-pulse-ring {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }
}
@keyframes pulse-blue {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 18px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.rfid-input-field {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    font-size: 1rem;
    text-align: center;
    color: #38bdf8;
    text-transform: uppercase;
    min-height: 44px;
}
@media (min-width: 768px) {
    .rfid-input-field {
        font-size: 1.15rem;
        letter-spacing: 0.15em;
    }
}

.quick-rfid-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 1rem;
    justify-content: center;
}
.quick-rfid-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 12px;
    min-height: 32px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Customer POS Card Desktop Base Styles */
.customer-pos-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-bottom: 0.65rem;
}
.customer-top-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}
.customer-name-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2px 0;
    color: #fff;
    line-height: 1.25;
}
[data-theme="light"] .customer-name-heading {
    color: #0f172a;
}
.customer-vehicle-mobile {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.customer-vehicle-mobile::-webkit-scrollbar {
    display: none;
}
.c-vehicle-wrap, .c-mobile-wrap {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
#cVehicle, #cMobile {
    white-space: nowrap;
}
.c-line-sep {
    color: var(--text-subtle);
    font-size: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    /* Prevent horizontal page overflow on mobile */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Header Actions: Display My Shift History and Process Customer Redemption side by side on mobile */
    .header-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .header-actions .btn,
    .header-actions a.btn,
    .header-actions button.btn {
        width: 100% !important;
        padding: 8px 6px !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        box-sizing: border-box !important;
        min-height: 38px !important;
    }

    .pos-layout {
        gap: 0.85rem !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .rfid-scanner-box {
        padding: 0.85rem 0.65rem !important;
        border-radius: var(--radius-lg) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .rfid-pulse-ring {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.15rem !important;
        margin-bottom: 0.4rem !important;
    }
    .rfid-scanner-box h3 {
        font-size: 1rem !important;
        margin-bottom: 2px !important;
    }
    .rfid-scanner-box p {
        font-size: 0.76rem !important;
        margin-bottom: 0.5rem !important;
    }
    .rfid-input-field {
        font-size: 0.95rem !important;
        min-height: 38px !important;
        padding: 6px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .quick-rfid-chip {
        padding: 3px 8px !important;
        font-size: 0.7rem !important;
        min-height: 26px !important;
    }
    .customer-pos-card {
        padding: 8px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .customer-pos-header {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 0.35rem !important;
        box-sizing: border-box !important;
    }
    .customer-top-tags {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 2px !important;
        box-sizing: border-box !important;
    }
    .customer-name-heading {
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        margin: 1px 0 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    /* Next line: Vehicle Number • Mobile Number on single line */
    .customer-vehicle-mobile {
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        gap: 6px !important;
        font-size: 0.76rem !important;
        margin-top: 1px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: auto !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box !important;
    }
    .customer-vehicle-mobile::-webkit-scrollbar {
        display: none;
    }
    .c-vehicle-wrap, .c-mobile-wrap {
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
    }
    #cVehicle, #cMobile {
        white-space: nowrap !important;
    }
    .c-line-sep {
        display: inline !important;
        color: var(--text-subtle);
        font-size: 0.65rem;
        flex-shrink: 0 !important;
        margin: 0 1px !important;
    }
    /* Mobile view: Hide bottom customer-card-footer completely */
    .customer-card-footer {
        display: none !important;
    }
    /* Compact Statistics: Lifetime Spend, Credits Earned, Available Balance */
    .customer-metrics-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        padding: 5px 4px !important;
        margin-top: 5px !important;
        gap: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .c-metric-val {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        line-height: 1.15 !important;
    }
    .c-metric-label {
        font-size: 0.55rem !important;
        white-space: nowrap !important;
        letter-spacing: 0.01em !important;
        margin-top: 2px !important;
    }
        letter-spacing: 0.02em !important;
        margin-top: 2px !important;
    }
    .card-header {
        padding: 0.65rem 0.75rem !important;
    }
    .card-body {
        padding: 0.75rem !important;
    }
    .form-group {
        margin-bottom: 0.75rem !important;
    }
    .form-label {
        font-size: 0.8rem !important;
        margin-bottom: 4px !important;
    }
    .payment-chip {
        padding: 6px 6px !important;
        min-height: 38px !important;
        font-size: 0.74rem !important;
    }
    .payment-chip i {
        font-size: 0.85rem !important;
    }
    .live-calc-box {
        padding: 6px 8px !important;
    }
    .calc-label {
        font-size: 0.65rem !important;
    }
    .calc-val {
        font-size: 0.95rem !important;
    }
    .receipt-upload-box {
        padding: 0.65rem !important;
    }
}

/* Customer Profile Card on POS */
.customer-pos-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
@media (min-width: 768px) {
    .customer-pos-card {
        padding: 1.5rem;
    }
}
.customer-pos-card {
    position: relative;
}

.customer-rfid-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: rgba(6, 182, 212, 0.15);
    color: #38bdf8;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.customer-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--radius-md);
    padding: 10px;
    margin-top: 0.75rem;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
}
.c-metric-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
}
@media (min-width: 768px) {
    .c-metric-val {
        font-size: 1.15rem;
    }
}
.c-metric-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

/* Fuel Selector Radio Grid */
.fuel-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 1.25rem;
}
.fuel-option-card {
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    touch-action: manipulation;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.fuel-option-card:hover {
    border-color: var(--fuel-color, #3b82f6);
    background: var(--fuel-bg, rgba(37, 99, 235, 0.05));
}
.fuel-option-card.selected {
    border-color: var(--fuel-color, #10b981) !important;
    background: var(--fuel-bg, rgba(16, 185, 129, 0.12)) !important;
    box-shadow: 0 0 15px var(--fuel-bg, rgba(16, 185, 129, 0.25));
}
.fuel-option-card input[type="radio"] {
    display: none;
}
.fuel-icon-wrap {
    font-size: 1.25rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fuel-code {
    font-weight: 700;
    font-size: 0.92rem;
}
.fuel-rate {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-main);
    margin-top: 2px;
}
.fuel-rule-tag {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
    color: #60a5fa;
}

@media (max-width: 600px) {
    .fuel-selector-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 0.75rem !important;
    }
    .fuel-option-card {
        padding: 6px 4px !important;
        min-height: 58px !important;
    }
    .fuel-icon-wrap {
        font-size: 1.05rem !important;
        margin-bottom: 1px !important;
    }
    .fuel-code {
        font-size: 0.8rem !important;
    }
    .fuel-rate {
        font-size: 0.85rem !important;
        margin-top: 1px !important;
    }
    .fuel-rule-tag {
        font-size: 0.62rem !important;
        padding: 1px 4px !important;
        margin-top: 2px !important;
    }
}

/* Payment Mode Grid */
.payment-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 8px;
    margin-bottom: 1.25rem;
}
.payment-chip {
    padding: 10px 8px;
    min-height: 48px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    touch-action: manipulation;
}
.payment-chip:hover {
    border-color: #3b82f6;
}
.payment-chip.selected {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}
.payment-chip input {
    display: none;
}

/* Live Calculation Badge */
.live-calc-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.calc-item .calc-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.calc-item .calc-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #34d399;
    font-family: var(--font-mono);
}

/* POS Amount & Reward Points Desktop Alignment */
.pos-amount-points-row {
    align-items: flex-start;
}
@media (min-width: 600px) {
    .pos-amount-points-row {
        align-items: flex-start;
    }
    .pos-amount-points-row .form-group {
        margin-bottom: 0;
    }
    .pos-amount-points-row .live-calc-box {
        height: 48px;
        box-sizing: border-box;
        margin: 0;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .pos-amount-points-row #txAmount {
        height: 48px;
        box-sizing: border-box;
    }
}

/* Camera capture / Receipt proof area */
.receipt-upload-box {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    text-align: center;
    margin-bottom: 1.25rem;
}
.camera-preview-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 10px auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: none;
    border: 2px solid var(--accent-cyan);
}
.camera-preview-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.snapshot-preview {
    max-width: 100%;
    width: 220px;
    max-height: 160px;
    border-radius: var(--radius-md);
    margin: 10px auto;
    display: none;
    border: 1px solid #10b981;
    object-fit: contain;
}

/* POS Responsive Camera and Submit Button Controls */
/* Mobile (preserved exactly as touch targets) */
.pos-camera-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pos-camera-btn {
    flex: 1;
    min-height: 42px;
    font-size: 0.85rem;
    padding: 6px 12px;
}
.pos-webcam-btn {
    min-height: 42px;
    font-size: 0.85rem;
    padding: 6px 12px;
}
.pos-submit-container {
    margin-top: 1.25rem;
    width: 100%;
}
.pos-submit-btn {
    width: 100%;
    min-height: 48px;
    font-size: 1.05rem;
    padding: 13px 24px;
}

/* Desktop View (>= 768px): Proper, balanced button sizing */
@media (min-width: 768px) {
    .pos-camera-actions {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: nowrap;
    }
    .pos-camera-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 175px;
        min-height: 38px;
        padding: 8px 18px;
        font-size: 0.88rem;
    }
    .pos-webcam-btn {
        flex: 0 0 auto;
        width: auto;
        min-height: 38px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .pos-submit-container {
        display: flex;
        justify-content: flex-start;
        margin-top: 1.25rem;
    }
    .pos-submit-btn {
        width: auto;
        min-width: 250px;
        max-width: 320px;
        min-height: 42px;
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}

[data-theme="light"] .receipt-upload-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Digital Loyalty Card (Customer Portal) */
.digital-loyalty-card {
    background: linear-gradient(135deg, #1e3a8a, #065f46 70%, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: clamp(1.25rem, 4vw, 2rem);
    color: #fff;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}
.digital-loyalty-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 40%);
    pointer-events: none;
}
.card-chip {
    width: 44px;
    height: 32px;
    background: linear-gradient(135deg, #d4af37, #f3e5ab);
    border-radius: 6px;
    border: 1px solid #b8860b;
    position: relative;
    margin-bottom: 1.25rem;
}
.card-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.3);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 10px;
}
@media (min-width: 600px) {
    .modal-overlay {
        padding: 1.5rem;
    }
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.25s ease;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.modal-body {
    padding: 1.25rem;
}
.modal-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(15, 23, 42, 0.3);
}

.modal-customer-selector {
    display: none;
    margin-bottom: 1.25rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

/* Responsive OTP Input Boxes */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: clamp(4px, 2vw, 10px);
    margin: 1.25rem 0;
    width: 100%;
}
.otp-box {
    width: clamp(38px, 11vw, 50px);
    height: clamp(44px, 12vw, 54px);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    text-align: center;
    font-size: clamp(1.15rem, 4vw, 1.45rem);
    font-weight: 700;
    font-family: var(--font-mono);
    color: #60a5fa;
    transition: all 0.2s;
}
.otp-box:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    outline: none;
}

/* Alerts / Flash messages */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}
@media (min-width: 768px) {
    .alert {
        padding: 1rem 1.25rem;
        margin-bottom: 1.5rem;
        font-size: 0.95rem;
    }
}
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }
.alert-danger { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.3); color: #fb7185; }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.alert-info { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); color: #38bdf8; }

/* Filter Bar in Reports */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
    .filter-bar {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
}
.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: end;
}
@media (min-width: 580px) {
    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
}

/* Print Friendly Styles */
@media print {
    @page {
        margin: 0 !important;
        size: auto;
    }
    body::before,
    body::after {
        display: none !important;
        content: none !important;
        width: 0 !important;
        height: 0 !important;
    }
    html, body {
        background: #fff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .navbar, .demo-banner, .btn, button, .filter-bar, footer, .app-footer, .nav-toggle-btn, .mobile-nav-drawer, .header-actions, .toast-container, .modal-overlay:not(.print-receipt-modal), .no-print {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .modal-overlay.print-receipt-modal {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        top: 0 !important;
        left: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 4mm 0 0 0 !important;
        margin: 0 auto !important;
        transform: none !important;
    }
    .modal-overlay.print-receipt-modal .modal-content {
        display: block !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        transform: none !important;
        overflow: visible !important;
    }
    .modal-overlay.print-receipt-modal .modal-body {
        display: block !important;
        padding: 0 !important;
        margin: 0 auto !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .card { border: 1px solid #cbd5e1 !important; box-shadow: none !important; background: #fff !important; }
    .table th, .table td { color: #0f172a !important; border-bottom: 1px solid #e2e8f0 !important; }
}

/* Toast Notification: Positioned at Top of Screen */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 92%;
    max-width: 420px;
    pointer-events: none;
}
@media (min-width: 768px) {
    .toast-container {
        top: 20px;
        right: 24px;
        left: auto;
        transform: none;
        max-width: 400px;
        align-items: flex-end;
    }
}
.toast {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    pointer-events: auto;
    animation: toastSlideDown 0.25s ease forwards;
}
@keyframes toastSlideDown {
    from { transform: translateY(-25px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* App Footer Default (Dark) */
.app-footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

/* ==========================================================================
   LIGHT MODE DESIGN SYSTEM
   Applied via <html data-theme="light">
   Preserves all features, layout, animations & responsiveness seamlessly
   ========================================================================== */

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #2563eb;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);

    --accent-emerald: #059669;
    --accent-emerald-light: rgba(5, 150, 105, 0.1);
    --accent-amber: #d97706;
    --accent-amber-light: rgba(217, 119, 6, 0.1);
    --accent-cyan: #0284c7;
    --accent-cyan-light: rgba(2, 132, 199, 0.1);
    --accent-rose: #e11d48;

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);
}

/* Ambient glow adjustments */
[data-theme="light"] body::before {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
}
[data-theme="light"] body::after {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Theme toggle button in light mode */
[data-theme="light"] .theme-toggle-btn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}
[data-theme="light"] .theme-toggle-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

/* Demo switcher quick banner */
[data-theme="light"] .demo-banner {
    background: linear-gradient(90deg, #eef2ff, #f8fafc 50%, #ecfdf5);
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}
[data-theme="light"] .demo-banner strong {
    color: #0f172a;
}
[data-theme="light"] .role-switch-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .role-switch-btn:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    color: #2563eb;
}
[data-theme="light"] .role-switch-btn.active-role {
    border-color: #059669;
    color: #059669;
    background: #ecfdf5;
}

/* Navigation Header */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .brand-text {
    color: #0f172a;
}
[data-theme="light"] .brand-badge {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
[data-theme="light"] .nav-link {
    color: #475569;
}
[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}
[data-theme="light"] .nav-link.active {
    border-color: #bfdbfe;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .user-chip {
    background: #f8fafc;
    border-color: #cbd5e1;
}
[data-theme="light"] .user-chip-name,
[data-theme="light"] .user-chip > div > div:first-child {
    color: #0f172a;
}
[data-theme="light"] .user-chip-sub {
    color: #64748b;
}
[data-theme="light"] .nav-toggle-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .nav-toggle-btn:hover,
[data-theme="light"] .nav-toggle-btn:focus {
    background: #f1f5f9;
    border-color: #2563eb;
    color: #2563eb;
}
[data-theme="light"] .mobile-logout-btn {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}
[data-theme="light"] .mobile-logout-btn:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #be123c;
}

/* Mobile Nav Drawer */
[data-theme="light"] .mobile-nav-backdrop {
    background: rgba(15, 23, 42, 0.4);
}
[data-theme="light"] .mobile-nav-drawer {
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .mobile-nav-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .mobile-close-btn {
    border-color: #cbd5e1;
    color: #64748b;
}
[data-theme="light"] .mobile-close-btn:hover {
    color: #e11d48;
    border-color: #fca5a5;
    background: #fff1f2;
}
[data-theme="light"] .mobile-user-card {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}
[data-theme="light"] .mobile-nav-item {
    color: #334155;
    background: #f8fafc;
    border-color: transparent;
}
[data-theme="light"] .mobile-nav-item:hover,
[data-theme="light"] .mobile-nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
[data-theme="light"] .mobile-nav-item i {
    color: #2563eb;
}
[data-theme="light"] .mobile-nav-footer {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Cards & Surfaces */
[data-theme="light"] .card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .card-title {
    color: #0f172a;
}

/* Forms & Inputs */
[data-theme="light"] .form-label {
    color: #334155;
}
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .form-control::placeholder {
    color: #94a3b8;
}
[data-theme="light"] .form-text {
    color: #64748b;
}

/* Buttons */
[data-theme="light"] .btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}
[data-theme="light"] .btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}
[data-theme="light"] .btn-outline {
    background: transparent;
    border-color: #cbd5e1;
    color: #475569;
}
[data-theme="light"] .btn-outline:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

/* Metric / Stat Cards */
[data-theme="light"] .stat-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .stat-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.1);
}
[data-theme="light"] .stat-info .stat-label {
    color: #64748b;
}
[data-theme="light"] .stat-info .stat-value {
    color: #0f172a;
}
[data-theme="light"] .icon-blue { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
[data-theme="light"] .icon-emerald { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
[data-theme="light"] .icon-amber { background: #fef3c7; color: #d97706; border-color: #fde68a; }
[data-theme="light"] .icon-cyan { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }

/* Tables */
[data-theme="light"] .table th {
    background: #f8fafc;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .table td {
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}
[data-theme="light"] .table tr:hover td {
    background: #f8fafc;
}
[data-theme="light"] .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
}

/* Role Badges */
[data-theme="light"] .role-admin {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}
[data-theme="light"] .role-employee {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

/* Status Badges */
[data-theme="light"] .badge-earn {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
[data-theme="light"] .badge-redeem {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}
[data-theme="light"] .badge-petrol {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
[data-theme="light"] .badge-diesel {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
[data-theme="light"] .badge-speed {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}
[data-theme="light"] .badge-cng {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}

/* POS Terminal Components */
[data-theme="light"] .rfid-scanner-box {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-color: #93c5fd;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
[data-theme="light"] .rfid-scanner-box:hover,
[data-theme="light"] .rfid-scanner-box.scanning {
    background: linear-gradient(145deg, #eff6ff, #ffffff);
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.16);
}
[data-theme="light"] .rfid-input-field {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0369a1;
}
[data-theme="light"] .quick-rfid-chip {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}
[data-theme="light"] .quick-rfid-chip:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
}

[data-theme="light"] .customer-pos-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .customer-rfid-badge {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}
[data-theme="light"] .customer-metrics-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
[data-theme="light"] .c-metric-val {
    color: #0f172a;
}
[data-theme="light"] .c-metric-label {
    color: #64748b;
}

[data-theme="light"] .pos-header-cust-name {
    color: #0284c7;
}
[data-theme="light"] .pos-header-veh-tag {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

[data-theme="light"] .fuel-option-card {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .fuel-option-card:hover {
    border-color: var(--fuel-color, #2563eb);
    background: var(--fuel-bg, #eff6ff);
}
[data-theme="light"] .fuel-option-card.selected {
    border-color: var(--fuel-color, #059669) !important;
    background: var(--fuel-bg, #ecfdf5) !important;
    box-shadow: 0 0 14px var(--fuel-bg, rgba(5, 150, 105, 0.15));
}
[data-theme="light"] .fuel-rule-tag {
    background: #eff6ff;
    color: #2563eb;
}

[data-theme="light"] .payment-chip {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #334155;
}
[data-theme="light"] .payment-chip:hover {
    border-color: #2563eb;
    background: #f8fafc;
}
[data-theme="light"] .payment-chip.selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

[data-theme="light"] .live-calc-box {
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    border-color: #bfdbfe;
}
[data-theme="light"] .live-calc-box .calc-val {
    color: #059669;
}
[data-theme="light"] .receipt-upload-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Modals & Popups */
[data-theme="light"] .modal-overlay {
    background: rgba(15, 23, 42, 0.5);
}
[data-theme="light"] .modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .modal-header {
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .modal-footer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}
[data-theme="light"] .modal-customer-selector {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}
[data-theme="light"] .modal-customer-selector .form-label {
    color: #1e293b !important;
    font-weight: 600 !important;
}
[data-theme="light"] .modal-customer-selector .form-select {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
[data-theme="light"] .modal-customer-selector .form-text {
    color: #64748b !important;
}
[data-theme="light"] .otp-box {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #2563eb;
}
[data-theme="light"] .otp-box:focus {
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.25);
}

/* Filter Bar & Alerts */
[data-theme="light"] .filter-bar {
    background: #ffffff;
    border-color: #e2e8f0;
}
[data-theme="light"] .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
[data-theme="light"] .alert-danger { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
[data-theme="light"] .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
[data-theme="light"] .alert-info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }

/* Toast Notifications */
[data-theme="light"] .toast {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Footer */
[data-theme="light"] .app-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

/* Customer Portal Login & Sample Box Overrides */
[data-theme="light"] .card[style*="linear-gradient(145deg, #16243b"] {
    background: #ffffff !important;
    border-color: #bae6fd !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="light"] .card-header[style*="border-bottom-color: rgba(6, 182, 212"] {
    background: #f0f9ff !important;
    border-bottom-color: #bae6fd !important;
}
[data-theme="light"] div[style*="background: rgba(0, 0, 0, 0.25)"] {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}
[data-theme="light"] div[style*="background: rgba(15, 23, 42, 0.6)"] {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

/* Simulated OTP box in POS modal */
[data-theme="light"] #simulatedOtpDisplay {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

/* Contrast Protection: Prevent hardcoded #fff or white text from becoming invisible on white surfaces */
[data-theme="light"] strong[style*="color: #fff"],
[data-theme="light"] strong[style*="color: #ffffff"],
[data-theme="light"] strong[style*="color: white"],
[data-theme="light"] span[style*="color: #fff"],
[data-theme="light"] span[style*="color: #ffffff"],
[data-theme="light"] span[style*="color: white"],
[data-theme="light"] td[style*="color: #fff"],
[data-theme="light"] td[style*="color: #ffffff"],
[data-theme="light"] td[style*="color: white"],
[data-theme="light"] div[style*="color: #fff"],
[data-theme="light"] div[style*="color: #ffffff"],
[data-theme="light"] div[style*="color: white"],
[data-theme="light"] h1[style*="color: #fff"],
[data-theme="light"] h2[style*="color: #fff"],
[data-theme="light"] h3[style*="color: #fff"],
[data-theme="light"] h4[style*="color: #fff"],
[data-theme="light"] h5[style*="color: #fff"] {
    color: #0f172a !important;
}

/* Preserve White Text for Colored Badges, Buttons, Avatars, Brand Icon, & the Digital Loyalty Card */
[data-theme="light"] .digital-loyalty-card,
[data-theme="light"] .digital-loyalty-card *,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary *,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-success *,
[data-theme="light"] .btn-danger,
[data-theme="light"] .btn-danger *,
[data-theme="light"] .brand-icon,
[data-theme="light"] .brand-icon *,
[data-theme="light"] .user-avatar,
[data-theme="light"] .user-avatar *,
[data-theme="light"] .rfid-pulse-ring,
[data-theme="light"] .rfid-pulse-ring * {
    color: #ffffff !important;
}
[data-theme="light"] .digital-loyalty-card .badge {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

/* App Footer Minimal & Professional */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 0;
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.app-footer .footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.app-footer .footer-status {
    color: var(--accent-emerald);
    font-weight: 600;
    font-size: 0.75rem;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.app-footer .footer-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-subtle);
}
[data-theme="light"] .app-footer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}

@media print {
    [data-theme="light"] .app-footer,
    [data-theme="light"] footer,
    [data-theme="light"] .navbar,
    [data-theme="light"] .filter-bar,
    [data-theme="light"] .btn,
    [data-theme="light"] button {
        display: none !important;
        visibility: hidden !important;
    }
}


