/* CORE THEME & PALETTE */
:root {
    --bg-base: #08111f;
    --bg-panel: rgba(15, 23, 42, 0.84);
    --bg-elevated: rgba(22, 33, 55, 0.92);
    --border-color: rgba(148, 163, 184, 0.18);
    --text-primary: #f8fafc;
    --text-muted: #a9b7cc;
    --text-soft: #cbd5e1;
    
    /* Vibrant Accents */
    --accent-emerald: #10b981;
    --accent-emerald-hover: #059669;
    --accent-emerald-glow: rgba(16, 185, 129, 0.25);
    
    --accent-orange: #f59e0b;
    --accent-danger: #ef4444;
    --accent-blue: #3b82f6;

    /* Glassmorphism Defaults */
    --glass-blur: blur(16px);
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px var(--accent-emerald-glow);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(16, 185, 129, 0.08), transparent 26%),
        radial-gradient(circle at 88% 15%, rgba(59, 130, 246, 0.12), transparent 24%),
        linear-gradient(180deg, #0a1220 0%, #08111f 100%);
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Glass Panel Utility */
.glass-panel {
    background: linear-gradient(180deg, rgba(10, 18, 32, 0.92) 0%, rgba(14, 24, 40, 0.84) 100%);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 50px rgba(2, 8, 23, 0.45);
    border-radius: 28px;
}

/* Base Cards */
.card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.84) 100%);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 24px;
    border-radius: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.25);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(2, 8, 23, 0.3);
    border-color: rgba(96, 165, 250, 0.28);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.03));
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 600; }
h2 { font-size: 1.6rem; letter-spacing: -0.6px; color: var(--text-primary); margin-bottom: 20px;}

/* Sidebar */
.sidebar {
    width: 260px;
    background: transparent;
    border-right: 1px solid var(--border-color);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 12px 32px 12px;
}
.brand .logo {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand h1 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-left: 5px; }

.nav-links { list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 16px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 3px; background: var(--accent-emerald); transform: scaleY(0); transition: transform 0.3s;
}

.nav-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); transform: translateX(3px); }
.nav-item.active { color: var(--text-primary); background: linear-gradient(90deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.07)); box-shadow: inset 0 0 0 1px rgba(16,185,129,0.12); }
.nav-item.active::before { transform: scaleY(1); }
.nav-item .icon { font-size: 1.2rem; }

.sidebar-footer { padding-top: 20px; border-top: 1px solid var(--border-color); }
.user-profile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,0.2); transition: background 0.3s;}
.user-profile:hover { background: rgba(0,0,0,0.4); cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-blue); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.9rem;}
.user-info { display: flex; flex-direction: column; }
.user-info .name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.user-info .role { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;}

/* Main Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    margin-left: 280px;
    transition: margin 0.3s ease;
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 60px; /* Offset for collapsed sidebar */
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0; /* Full width for mobile */
    }
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    background: rgba(8, 17, 31, 0.86);
}

.topbar h2 { margin: 0; font-size: 1.5rem;}

.topbar-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.view-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.action-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; position: relative;}
.action-btn:hover { background: rgba(255,255,255,0.1); transform: rotate(10deg);}
.active-ping::after { content: ''; position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; background: var(--accent-danger); border-radius: 50%; box-shadow: 0 0 10px var(--accent-danger); }
.datetime-display { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.support-chip {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.views-container { flex: 1; padding: 24px 32px 36px; position: relative; }
.view { display: none; animation: fadeIn 0.4s ease-out forwards; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Shared Grid Layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* Dashboard Specifics */
.welcome-banner { padding: 28px 30px; border-radius: 24px; margin-bottom: 28px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(59, 130, 246, 0.12) 100%); border: 1px solid rgba(148, 163, 184, 0.14); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 20px 40px rgba(2,8,23,0.18);}
.welcome-banner h3 { font-size: 1.85rem; margin-bottom: 5px; color: #fff;}
.welcome-banner p { color: var(--text-soft); font-size: 1rem;}

.stat-card { display: flex; flex-direction: column; gap: 15px; padding: 24px; border-radius: 20px; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.88)); border: 1px solid rgba(148,163,184,0.12); box-shadow: 0 12px 28px rgba(2,8,23,0.2); }
.stat-card::before { content:''; position: absolute; top:0; left:0; right:0; height: 3px; background: var(--accent-emerald); }
.stat-card.warning::before { background: var(--accent-orange); }
.stat-card.danger::before { background: var(--accent-danger); }
.stat-card.blue::before { background: var(--accent-blue); }
.stat-icon { font-size: 2rem; background: rgba(255,255,255,0.05); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.stat-details { display: flex; flex-direction: column; gap: 5px; }
.stat-details .label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.8rem; font-weight: 600; }
.stat-details .value { font-size: 2.2rem; font-weight: 700; color: #fff;}

/* Forms and Inputs */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-soft); letter-spacing: 0.2px; }
input, select { 
    width: 100%; padding: 14px 16px; 
    background: rgba(2, 8, 23, 0.42);
    border: 1px solid rgba(148,163,184,0.16); 
    border-radius: 14px; 
    color: var(--text-primary); 
    font-family: inherit; font-size: 0.98rem;
    transition: all 0.3s ease;
}
input::placeholder { color: #7f8da3; }
input:focus, select:focus { outline: none; border-color: rgba(16,185,129,0.9); box-shadow: 0 0 0 4px rgba(16,185,129,0.14); background: rgba(2,8,23,0.62);}
/* Fix for options in dropdowns on some browsers where it gets unreadable */
option { background-color: var(--bg-panel); color: var(--text-primary); }

/* Premium Buttons */
button { font-family: inherit; cursor: pointer; border: none; transition: all 0.2s ease; font-weight: 700; letter-spacing: 0.2px;}
.btn { padding: 14px 20px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; min-height: 48px; }
.btn-primary { background: var(--accent-emerald); color: white; box-shadow: 0 4px 15px var(--accent-emerald-glow); }
.btn-primary:hover { background: var(--accent-emerald-hover); transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-emerald-glow);}
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: var(--accent-danger); color: white; }

.btn-warning { background: var(--accent-orange); color: white; }
.btn-warning:hover { filter: brightness(1.1); }

/* Tables */
.table-container { width: 100%; overflow-x: auto; border-radius: 18px; border: 1px solid rgba(148,163,184,0.12); margin-top: 20px; background: rgba(2,8,23,0.24);}
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: rgba(255,255,255,0.03); padding: 16px; font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; letter-spacing: 0.8px; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1;}
td { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.93rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }

.badge { padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.empty-state { padding: 40px; text-align: center; color: var(--text-muted); font-style: italic;}

/* Layout Specific Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Responsive Grid Utilities (Replacing inline styles in JS) */
.responsive-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.billing-main-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

.manage-shops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.custom-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 10px;
    align-items: stretch;
}

.receipt-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.employee-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.employee-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.product-editor-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.8fr auto;
    gap: 10px;
}

.billing-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.billing-secondary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.shop-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.shop-modal-actions {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr auto;
    gap: 15px;
}

.product-admin-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
}

.product-admin-row-actions {
    display: flex;
    gap: 8px;
}

.receipts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .billing-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .responsive-grid-2, .manage-shops-grid, .custom-item-grid, .receipt-form-grid, .employee-layout-grid, .employee-form-grid, .product-editor-grid, .billing-action-grid, .billing-secondary-grid, .shop-modal-grid, .shop-modal-actions {
        grid-template-columns: 1fr;
    }
}

.order-details-drawer.open {
    max-height: 1000px !important;
    padding-bottom: 15px !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* Print Output Style */
@media print {
    body { background: white; color: black; margin: 0; padding: 0; }
    .app-container { display: none !important; }
    #print-receipt { display: block !important; padding: 40px; }
    .no-print { display: none !important; }
}

/* Responsive adjustments */
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9;
}

@media (max-width: 1024px) {
    .sidebar { width: 88px; }
    .sidebar .brand h1, .sidebar .nav-item .text, .sidebar .user-info { display: none; }
    .sidebar .brand { padding: 0 0 32px 0; justify-content: center; }
    .sidebar .nav-item { padding: 14px; justify-content: center; }
    .sidebar .nav-item .icon { font-size: 1.5rem; }
    .user-profile { padding: 8px; justify-content: center;}
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    body { overflow-y: auto; }
    .app-container { display: block; }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: auto;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        border-right: none;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 20px 20px 0 0;
        z-index: 120;
        box-shadow: 0 -16px 36px rgba(2, 8, 23, 0.45);
        background: rgba(8, 17, 31, 0.96);
        backdrop-filter: blur(18px);
    }

    .sidebar .brand,
    .sidebar-footer {
        display: none !important;
    }

    .sidebar .nav-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .sidebar .nav-item {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        min-height: 60px;
        padding: 10px 4px;
        border-radius: 14px;
        transform: none !important;
    }

    .sidebar .nav-item::before {
        width: 0;
        height: 3px;
        left: 14%;
        right: 14%;
        top: auto;
        bottom: 0;
        transform: scaleX(0);
    }

    .sidebar .nav-item.active::before {
        transform: scaleX(1);
    }

    .sidebar .nav-item .icon {
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar .nav-item .text {
        display: block !important;
        font-size: 0.62rem;
        line-height: 1.05;
        text-align: center;
        color: inherit;
        white-space: normal;
    }

    .mobile-toggle-btn,
    .sidebar-overlay {
        display: none !important;
    }
    
    .topbar { padding: 12px 12px; }
    .views-container { padding: 14px 10px 156px; }
    .topbar-left { align-items: flex-start; }
    .topbar-title-wrap { gap: 2px; }
    .view-subtitle { font-size: 0.76rem; line-height: 1.28; max-width: 220px; }
    
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    
    .welcome-banner { flex-direction: column; text-align: center; gap: 20px; padding: 25px; }
    .welcome-banner h3 { font-size: 1.5rem; }
    
    .stat-card .value { font-size: 1.8rem; }

    .datetime-display, .support-chip { display: none; }
    .billing-main-grid { gap: 18px; }
    .menu-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
    .receipts-grid { grid-template-columns: 1fr; }
    .table-container { border-radius: 14px; }
    th, td { padding: 12px 10px; font-size: 0.84rem; }
    .card { padding: 18px; border-radius: 20px; }
    #current-invoice-list { max-height: none !important; }
    .billing-secondary-btn { min-height: 46px; font-size: 0.84rem; justify-content: center; }
    #view-billing .card,
    #view-employees .card,
    #view-expenses .card,
    #view-history .card,
    #view-ledger .card,
    #view-dashboard .card {
        border-radius: 16px !important;
    }
    #view-billing .shop-row {
        display: grid !important;
        grid-template-columns: 1fr auto auto !important;
        gap: 8px !important;
        align-items: stretch !important;
    }
    #view-billing .shop-row .route-chip {
        min-width: 0;
    }
    #view-billing #product-admin-list > div {
        display: block !important;
    }
    #view-billing #product-admin-list > div button {
        width: calc(33.333% - 6px);
        margin-top: 10px;
        margin-right: 6px;
    }
    #view-billing #product-admin-list > div button:last-child {
        margin-right: 0;
    }
    #view-employees #attendance-list > div {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    #view-employees #attendance-list > div > div:last-child {
        width: 100% !important;
        min-width: 0 !important;
    }
    #view-employees #attendance-list input[id^="emp-paid-"] {
        width: 100% !important;
        min-width: 0 !important;
    }
    #view-employees #attendance-list button {
        width: 100% !important;
    }
    #view-employees #directory-list .employee-card > div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    #view-employees .table-container {
        display: none;
    }
}

@media (max-width: 480px) {
    .topbar h2 { font-size: 1.1rem; }
    .action-btn { width: 35px; height: 35px; }
    .btn { width: 100%; }
    .flex-between { flex-direction: column; align-items: stretch; gap: 15px; }
    .views-container { padding: 12px 8px 164px; }
    .welcome-banner { padding: 18px; border-radius: 18px; }
    .card { padding: 16px; border-radius: 18px; }
    .menu-catalog { grid-template-columns: 1fr 1fr; gap: 10px; }
    .pos-item-btn { min-height: 124px; padding: 14px 10px; }
    .billing-filter-row { gap: 8px; margin-bottom: 12px; }
    .billing-filter-chip { padding: 9px 12px; font-size: 0.74rem; }
    .billing-product-total { font-size: 0.74rem; padding: 7px 10px; }
    .billing-secondary-grid { grid-template-columns: 1fr; }
    .billing-action-grid { grid-template-columns: 1fr; }
    .product-editor-grid { grid-template-columns: 1fr; }
    .shop-modal-actions { grid-template-columns: 1fr; }
    .shop-modal-grid { grid-template-columns: 1fr; }
    .employee-form-grid { grid-template-columns: 1fr; }
    .receipt-form-grid { grid-template-columns: 1fr; }
    .billing-secondary-btn span { display: inline; }
    .view-subtitle { display: none; }
    .sidebar .nav-item { min-height: 58px; padding: 8px 4px; border-radius: 12px; }
    #view-billing #product-admin-list > div button {
        width: 100%;
        margin-right: 0;
        display: block;
    }
    #view-billing .shop-row {
        grid-template-columns: 1fr !important;
    }
    #view-billing .shop-row button {
        width: 100% !important;
    }
}

/* POS Grid Layout */
.menu-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}
.pos-item-btn {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.82));
    border: 1px solid rgba(148,163,184,0.14);
    border-radius: 18px;
    padding: 16px 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 9px; text-align: center; transition: all 0.2s ease; box-shadow: 0 8px 18px rgba(2,8,23,0.18);
}
.pos-item-btn:hover { background: rgba(16, 185, 129, 0.15); border-color: var(--accent-emerald); transform: translateY(-3px); box-shadow: 0 14px 24px rgba(16,185,129,0.16); }
.pos-item-btn:active { transform: translateY(1px); }
.pos-item-btn .item-name { font-weight: 700; font-size: 0.94rem; color: var(--text-primary); line-height: 1.24; }
.pos-item-btn .item-meta { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.pos-item-btn .item-price { font-size: 0.88rem; color: var(--accent-emerald); background: rgba(16, 185, 129, 0.1); padding: 5px 10px; border-radius: 20px; font-weight: 800; }
.qty-btn { background: rgba(255,255,255,0.1); color: white; border: none; border-radius: 6px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.qty-btn:hover { background: rgba(255,255,255,0.25); }

.billing-pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.billing-section-kicker {
    font-size: 0.72rem;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.billing-product-total {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.billing-filter-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.billing-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.billing-filter-chip.active {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #d1fae5;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.12);
}

.billing-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-size: 0.72rem;
    font-weight: 800;
}

.shop-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
}

.billing-empty-state {
    grid-column: 1 / -1;
    padding: 32px 20px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
}

@media (max-width: 768px) {
    .billing-pos-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* ── Employee Page Mobile Layout ── */
.emp-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .emp-top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .emp-form-cols {
        grid-template-columns: 1fr !important;
    }
    .emp-top-grid {
        gap: 14px;
    }
}
