/* ============================================================
   POS System - Main Stylesheet
   Font: Plus Jakarta Sans (UI) + JetBrains Mono (data)
   Theme: Dark slate with vivid amber/cyan accents
   ============================================================ */

:root {
    --bg-base:       #0f1117;
    --bg-surface:    #181c27;
    --bg-elevated:   #1e2435;
    --bg-hover:      #252b3b;
    --border:        rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.14);

    --primary:       #f59e0b;
    --primary-dim:   rgba(245,158,11,0.12);
    --primary-hover: #fbbf24;

    --accent:        #06b6d4;
    --accent-dim:    rgba(6,182,212,0.12);

    --success:       #10b981;
    --success-dim:   rgba(16,185,129,0.12);
    --danger:        #ef4444;
    --danger-dim:    rgba(239,68,68,0.12);
    --warning:       #f59e0b;
    --info:          #3b82f6;

    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;

    --sidebar-w:     240px;
    --topbar-h:      58px;
    --radius:        10px;
    --radius-sm:     6px;
    --radius-lg:     16px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.3);

    --font-ui:   'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: 0.18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font-ui); background: var(--bg-base); color: var(--text-primary); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ---- Layout ---- */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition), width var(--transition);
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
}
.brand-icon {
    width: 38px; height: 38px;
    background: var(--primary-dim);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 16px;
    flex-shrink: 0;
}
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: var(--radius-sm); flex-shrink: 0; }
.brand-name { display: block; font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }
.brand-version { display: block; font-size: 0.7rem; color: var(--text-muted); font-family: var(--font-mono); }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--primary-dim); color: var(--primary); border-left: 3px solid var(--primary); }
.nav-item i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-badge { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-avatar {
    width: 32px; height: 32px;
    background: var(--accent-dim);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 0.8rem; font-weight: 700;
    flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name { display: block; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.7rem; color: var(--text-muted); }
.logout-btn { color: var(--text-muted); padding: 7px; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.logout-btn:hover { color: var(--danger); background: var(--danger-dim); }

/* ---- Main Content ---- */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.top-bar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    flex-shrink: 0;
}
.top-bar-title { font-weight: 700; font-size: 1.05rem; flex: 1; }
.top-bar-actions { display: flex; align-items: center; gap: 10px; }
.top-bar-time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }

.sidebar-toggle { background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); display: none; }

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

/* ---- Cards ---- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-weight: 700; font-size: 0.95rem; }

/* ---- Stat Cards ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex; flex-direction: column; gap: 6px;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-color, var(--accent));
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-sub { font-size: 0.75rem; color: var(--text-secondary); }
.stat-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 2rem; opacity: 0.08; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer; transition: all var(--transition);
    white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-primary { background: var(--primary); color: #0f1117; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-accent { background: var(--accent); color: #0f1117; }
.btn-accent:hover { filter: brightness(1.1); }
.btn-block { width: 100%; justify-content: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.form-control {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

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

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.table th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-hover); }
.table-mono { font-family: var(--font-mono); }

/* ---- Badges ---- */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-danger  { background: var(--danger-dim);  color: var(--danger);  }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-muted   { background: var(--bg-hover); color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: var(--success-dim); border-color: var(--success); color: var(--success); }
.alert-danger  { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.1); border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(59,130,246,0.1); border-color: var(--info); color: var(--info); }

/* ---- Modals ---- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: none;
    align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 800px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 4px; border-radius: var(--radius-sm); transition: color var(--transition); }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 16px; }
.page-btn {
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem; font-weight: 600;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer; transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: #0f1117; border-color: var(--primary); }

/* ---- Search bar ---- */
.search-bar { position: relative; }
.search-bar input { padding-left: 36px; }
.search-bar i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; pointer-events: none; }

/* ---- Spinner ---- */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast ---- */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500;
    box-shadow: var(--shadow);
    animation: toastIn 0.25s ease;
    min-width: 200px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.toast-success { background: var(--success); color: #fff; }
.toast-danger  { background: var(--danger); color: #fff; }
.toast-warning { background: var(--warning); color: #0f1117; }

/* ---- Login Page ---- */
body.login-page { display: flex; align-items: center; justify-content: center; background: var(--bg-base); }
.login-box {
    width: 100%; max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-icon { width: 56px; height: 56px; background: var(--primary-dim); border: 2px solid rgba(245,158,11,0.3); border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--primary); }
.login-logo h1 { margin-top: 12px; font-size: 1.3rem; font-weight: 800; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; }

/* ---- POS Screen ---- */
.pos-layout { display: grid; grid-template-columns: 1fr 380px; gap: 0; height: calc(100vh - var(--topbar-h)); overflow: hidden; }
.pos-left { display: flex; flex-direction: column; overflow: hidden; padding: 16px; gap: 12px; }
.pos-right { background: var(--bg-surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; }

.pos-search { position: relative; }
.pos-search input { width: 100%; padding: 12px 14px 12px 40px; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text-primary); font-size: 1rem; outline: none; }
.pos-search input:focus { border-color: var(--primary); }
.pos-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.category-tabs { display: flex; gap: 8px; overflow-x: auto; flex-shrink: 0; padding-bottom: 4px; }
.category-tabs::-webkit-scrollbar { height: 3px; }
.category-tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
.cat-tab {
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 0.8rem; font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer; transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.cat-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.cat-tab.active { color: #0f1117; border-color: transparent; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    align-content: start;
    overflow-y: auto;
    flex: 1;
}
.product-tile {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 10px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}
.product-tile:hover { border-color: var(--primary); background: var(--primary-dim); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.product-tile.out-of-stock { opacity: 0.4; pointer-events: none; }
.product-img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); }
.product-icon { width: 52px; height: 52px; background: var(--bg-hover); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--text-muted); }
.product-name { font-size: 0.8rem; font-weight: 600; line-height: 1.2; }
.product-price { font-size: 0.9rem; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.product-stock { font-size: 0.68rem; color: var(--text-muted); }

/* Cart */
.cart-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-customer { padding: 10px 16px; border-bottom: 1px solid var(--border); position: relative; z-index: 20; }

.walk-in-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
}
.walk-in-badge i { color: var(--text-muted); }

.customer-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
}

.customer-found-card {
    background: var(--bg-elevated);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 8px;
}
.customer-found-card .found-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.customer-found-card .found-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.customer-found-card .btn-add-customer {
    width: 100%;
    justify-content: center;
    font-weight: 700;
}
.customer-search-status {
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--bg-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
}
.customer-pick-list {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 4px);
    z-index: 100;
    background: var(--bg-elevated);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 200px;
    overflow-y: auto;
}
.customer-pick-list--inline,
.customer-pick-list--cart {
    position: static;
    margin-top: 8px;
    margin-bottom: 0;
    max-height: 160px;
    box-shadow: none;
    border: 1px solid var(--border-strong);
}
.customer-pick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition);
}
.customer-pick-item:last-child { border-bottom: none; }
.customer-pick-item:hover, .customer-pick-item:focus {
    background: var(--primary-dim);
    outline: none;
}
.customer-pick-item strong { display: block; font-size: 0.88rem; }
.customer-pick-item span { font-size: 0.78rem; color: var(--text-muted); }
.customer-pick-item .pick-hint {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}
.customer-pick-item.selected-customer {
    background: var(--success-dim, rgba(34,197,94,0.15));
    border-left: 3px solid var(--success);
}
.cart-items { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cart-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex; align-items: center; gap: 8px;
}
.cart-item-name { flex: 1; font-size: 0.8rem; font-weight: 600; }
.cart-item-price { font-size: 0.8rem; font-family: var(--font-mono); color: var(--primary); }
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; transition: background var(--transition); }
.qty-btn:hover { background: var(--primary); color: #0f1117; border-color: var(--primary); }
.qty-val { font-weight: 700; font-size: 0.85rem; min-width: 24px; text-align: center; font-family: var(--font-mono); }
.cart-remove { color: var(--text-muted); cursor: pointer; font-size: 0.85rem; transition: color var(--transition); }
.cart-remove:hover { color: var(--danger); }

.cart-totals { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 0.85rem; display: flex; flex-direction: column; gap: 6px; }
.total-row { display: flex; justify-content: space-between; color: var(--text-secondary); }
.total-row.grand { color: var(--text-primary); font-weight: 800; font-size: 1.1rem; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--border); }
.total-row.grand span:last-child { color: var(--primary); }

.cart-actions { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.pay-btn {
    padding: 10px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--bg-elevated); color: var(--text-secondary);
    cursor: pointer; transition: all var(--transition);
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 0.72rem; font-weight: 600;
}
.pay-btn i { font-size: 1.1rem; }
.pay-btn:hover, .pay-btn.selected { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---- Inventory ---- */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.inv-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.inv-card.low-stock { border-color: rgba(239,68,68,0.4); background: var(--danger-dim); }

/* ---- Report Charts ---- */
.chart-bar-wrap { display: flex; flex-direction: column; gap: 10px; }
.chart-bar-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; }
.chart-bar-label { width: 120px; color: var(--text-secondary); flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-track { flex: 1; height: 10px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 99px; background: var(--primary); transition: width 0.6s ease; }
.chart-bar-val { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-primary); font-weight: 600; width: 70px; text-align: right; }

/* ---- Page Header Utility ---- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 1.3rem; font-weight: 800; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .sidebar-toggle { display: flex !important; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,0.5); }
    .pos-layout { grid-template-columns: 1fr; }
    .pos-right { position: fixed; bottom: 0; left: 0; right: 0; height: 50vh; z-index: 50; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .page-body { padding: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Print styles for receipts ---- */
@media print {
    body { background: white; color: black; }
    .no-print { display: none !important; }
    .receipt { max-width: 320px; margin: 0 auto; font-family: monospace; font-size: 12px; }
}
