:root { --purple:#6f42c1; --purple-dark:#59339d; --canvas:#f6f7fb; --text:#24262d; }
body { color:var(--text); }
.auth-bg { background:radial-gradient(circle at top left,#eee6ff,#f8f9fc 48%,#fff); }
.auth-card { width:min(100%,430px); border-radius:20px; }
.brand { font-weight:700; color:#fff; text-decoration:none; font-size:1.1rem; }
.brand:hover { color:#fff; }
.brand-mark { width:42px; height:42px; border-radius:12px; background:linear-gradient(135deg,#8b5cf6,#5b21b6); color:#fff; display:grid; place-items:center; font-weight:800; flex-shrink:0; }
.sidebar { width:260px; height:100vh; background:#21183a; color:#cfc8df; position:sticky; top:0; overflow-y:auto; flex-shrink:0; }
.sidebar .nav-link { color:#cfc8df; border-radius:10px; padding:.65rem .8rem; font-size:.93rem; }
.sidebar .nav-link:hover { background:#33264f; color:#fff; }
.sidebar i { margin-right:.6rem; }
.nav-label { font-size:.68rem; text-transform:uppercase; letter-spacing:.08em; color:#817798; margin:1.3rem .8rem .35rem; }
.main { min-width:0; background:var(--canvas); min-height:100vh; }
.topbar { height:70px; background:#fff; border-bottom:1px solid #e9e9ef; position:sticky; top:0; z-index:1010; }
.btn-primary { --bs-btn-bg:var(--purple); --bs-btn-border-color:var(--purple); --bs-btn-hover-bg:var(--purple-dark); --bs-btn-hover-border-color:var(--purple-dark); }
.metric-card,.panel { background:#fff; border:1px solid #ececf2; border-radius:16px; padding:1.25rem; box-shadow:0 4px 14px rgba(34,24,58,.04); }
.metric-card { display:flex; align-items:center; gap:1rem; height:100%; }
.metric-icon { width:42px; height:42px; border-radius:12px; background:#f0eaff; color:var(--purple); display:grid; place-items:center; font-size:1.2rem; flex-shrink:0; }
.table > :not(caption) > * > * { padding:.85rem 1rem; }
.table thead th { color:#777186; font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; background:#fbfaff; }
.form-control,.form-select { border-radius:10px; }
.form-control:focus,.form-select:focus { border-color:#a88bdf; box-shadow:0 0 0 .2rem rgba(111,66,193,.13); }
.theme-toggle { width:38px; height:38px; display:inline-grid; place-items:center; border-radius:10px; }
.guest-theme-toggle { position:fixed; top:1rem; right:1rem; z-index:10; }
[data-bs-theme="dark"] { --canvas:#111019; --text:#efedf6; --bs-body-bg:#111019; --bs-body-color:#efedf6; --bs-border-color:#34303f; --bs-secondary-color:#aaa4b8; }
[data-bs-theme="dark"] body { background:#111019; color:#efedf6; }
[data-bs-theme="dark"] .auth-bg { background:radial-gradient(circle at top left,#2b1d47,#15131e 52%,#0f0e15); }
[data-bs-theme="dark"] .auth-card,[data-bs-theme="dark"] .modal-content { background:#1d1a27; border-color:#373143!important; color:#efedf6; }
[data-bs-theme="dark"] .sidebar { background:#171221; border-right:1px solid #302740; }
[data-bs-theme="dark"] .main { background:var(--canvas); }
[data-bs-theme="dark"] .topbar { background:#1a1822; border-color:#302d38; }
[data-bs-theme="dark"] .metric-card,[data-bs-theme="dark"] .panel { background:#1d1a27; border-color:#34303f; box-shadow:0 4px 18px rgba(0,0,0,.18); }
[data-bs-theme="dark"] .metric-icon { background:#30234a; color:#bd9bf5; }
[data-bs-theme="dark"] .table { --bs-table-bg:transparent; --bs-table-color:#e9e6f0; --bs-table-border-color:#34303f; --bs-table-hover-bg:#282431; --bs-table-hover-color:#fff; }
[data-bs-theme="dark"] .table thead th { background:#24202d; color:#aaa4b8; }
[data-bs-theme="dark"] .form-control,[data-bs-theme="dark"] .form-select { background-color:#17151e; border-color:#3b3646; color:#f2eff8; }
[data-bs-theme="dark"] .form-control::placeholder { color:#7f788b; }
[data-bs-theme="dark"] .btn-light { --bs-btn-bg:#292531; --bs-btn-border-color:#383342; --bs-btn-color:#eeeaf5; --bs-btn-hover-bg:#373140; --bs-btn-hover-color:#fff; --bs-btn-hover-border-color:#494153; }
[data-bs-theme="dark"] code { color:#d4afff; }
[data-bs-theme="dark"] .text-muted { color:#aaa4b8!important; }
@media(max-width:991px) { .sidebar { display:none; } .main { width:100%; } main.p-4 { padding:1rem!important; } }
@media print { .sidebar,.topbar,.btn,form { display:none!important; } .main { background:#fff; } main.p-4 { padding:0!important; } .panel { box-shadow:none; } }
.invoice-paper { max-width:1000px; margin:0 auto; }
@media print { .no-print { display:none!important; } .invoice-paper { max-width:none; border:0!important; color:#000!important; background:#fff!important; } .invoice-paper .table { --bs-table-color:#000; --bs-table-bg:#fff; } }

/* Compact, task-focused navigation */
.sidebar { width:238px; padding:.75rem; background:#fff; color:#394150; border-right:1px solid #e5e7eb; }
.sidebar-head { min-height:52px; display:flex; align-items:center; justify-content:space-between; padding:.2rem .35rem .8rem; }
.sidebar .brand { color:#20242d; font-size:1rem; margin:0!important; }
.sidebar .brand-mark { width:34px; height:34px; border-radius:9px; }
.sidebar-close { border:0; background:transparent; color:inherit; font-size:1.15rem; }
.compact-nav { display:flex; flex-direction:column; gap:3px; }
.compact-nav .nav-link,.nav-group summary { min-height:40px; display:flex; align-items:center; gap:.65rem; padding:.55rem .7rem; border-radius:7px; color:#4b5563; text-decoration:none; font-size:.91rem; cursor:pointer; list-style:none; user-select:none; }
.nav-group summary::-webkit-details-marker { display:none; }
.compact-nav .nav-link i,.nav-group summary > i:first-child { width:18px; margin:0; text-align:center; font-size:1rem; }
.compact-nav .nav-link:hover,.nav-group summary:hover { background:#f1f5f9; color:#111827; }
.compact-nav .nav-link.active,.nav-group summary.active { background:#4388ee; color:#fff; }
.nav-group summary .nav-arrow { margin-left:auto; margin-right:0; font-size:.72rem; transition:transform .16s ease; }
.nav-group[open] summary .nav-arrow { transform:rotate(90deg); }
.nav-children { display:flex; flex-direction:column; padding:.2rem 0 .35rem 2.65rem; }
.nav-children a { padding:.42rem .55rem; color:#667085; text-decoration:none; border-left:2px solid #e5e7eb; font-size:.86rem; }
.nav-children a:hover { color:#2563eb; }
.nav-children a.active { color:#2563eb; border-left-color:#4388ee; font-weight:600; }
.sidebar-backdrop { display:none; }
[data-bs-theme="dark"] .sidebar { background:#171721; border-right-color:#2f303c; color:#ddd; }
[data-bs-theme="dark"] .sidebar .brand { color:#fff; }
[data-bs-theme="dark"] .compact-nav .nav-link,[data-bs-theme="dark"] .nav-group summary { color:#c8c9d2; }
[data-bs-theme="dark"] .compact-nav .nav-link:hover,[data-bs-theme="dark"] .nav-group summary:hover { background:#252633; color:#fff; }
[data-bs-theme="dark"] .compact-nav .nav-link.active,[data-bs-theme="dark"] .nav-group summary.active { background:#3f7edb; color:#fff; }
[data-bs-theme="dark"] .nav-children a { color:#aeb0bc; border-left-color:#343644; }
[data-bs-theme="dark"] .nav-children a.active { color:#80b1ff; border-left-color:#4d8fec; }
@media(max-width:991px) {
 .sidebar { display:block; position:fixed; inset:0 auto 0 0; z-index:1050; transform:translateX(-100%); transition:transform .2s ease; box-shadow:0 0 30px rgba(0,0,0,.2); }
 body.sidebar-open .sidebar { transform:translateX(0); }
 .sidebar-backdrop { position:fixed; inset:0; z-index:1040; background:rgba(0,0,0,.45); }
 body.sidebar-open .sidebar-backdrop { display:block; }
 .user-name { display:none; }
}

/* Compact 80mm POS receipt */
.pos-receipt { width:min(100%,380px); margin:0 auto; padding:1.25rem; background:#fff; color:#111; border:1px solid #e5e7eb; border-radius:12px; font-size:.82rem; }
.receipt-divider { border-color:#b8b8b8!important; border-style:dashed!important; border-width:0 0 1px!important; }
.receipt-meta > div,.receipt-totals > div,.receipt-payments > div { display:flex; justify-content:space-between; gap:1rem; margin:.25rem 0; }
.receipt-meta span { color:#666; }
.receipt-items { width:100%; border-collapse:collapse; }
.receipt-items th,.receipt-items td { padding:.38rem .15rem; border-bottom:1px dashed #ccc; vertical-align:top; }
.receipt-items small { display:block; color:#666; }
.receipt-grand-total { font-size:1.05rem; padding:.35rem 0; }
.daily-sale-detail { background:rgba(111,66,193,.05); border-top:1px solid var(--bs-border-color); border-bottom:1px solid var(--bs-border-color); }
tr.collapse.show { display:table-row; }
@media print {
 .pos-receipt { width:80mm; max-width:80mm; margin:0; padding:3mm; border:0; border-radius:0; font-size:10pt; }
 @page { size:80mm auto; margin:2mm; }
}
