/* =========================================================================
   Nexus Lite — "Market Ledger" theme
   Pine-green commerce identity · money set as tabular hero figures ·
   receipt-tape motif on the cart & receipt. Mobile-first.
   ========================================================================= */

:root {
  /* surfaces */
  --background:#f8fafc; --card:#ffffff; --popover:#ffffff; --muted:#f3f4f6;
  /* ink */
  --foreground:#1e293b; --card-foreground:#1e293b; --popover-foreground:#1e293b;
  --muted-foreground:#6b7280;
  /* brand (indigo) */
  --primary:#6366f1; --primary-foreground:#ffffff; --primary-strong:#4f46e5;
  --accent:#e0e7ff; --accent-foreground:#3730a3; --accent-solid:#f59e0b;
  /* lines + controls */
  --border:#e2e8f0; --input:#d1d5db; --ring:#6366f1;
  --secondary:#eceef3; --secondary-foreground:#334155;
  /* status */
  --destructive:#ef4444; --destructive-foreground:#ffffff;
  --success:#16a34a; --warning:#d97706;
  /* sidebar — light slab, indigo active pill */
  --sidebar:#f5f6fa; --sidebar-foreground:#334155; --sidebar-muted:#94a3b8;
  --sidebar-border:#e5e7eb; --sidebar-hover:rgba(99,102,241,.10);
  --sidebar-active:#6366f1; --sidebar-active-foreground:#ffffff;
  /* charts */
  --chart-1:#6366f1; --chart-2:#4f46e5; --chart-3:#4338ca; --chart-4:#818cf8; --chart-5:#a5b4fc;
  /* shape + type */
  --radius:10px; --shadow-opacity:.06;
  --font-sans:"Inter",system-ui,sans-serif;
  --font-display:"Space Grotesk","Inter",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,monospace;
}
.dark {
  --background:#0f172a; --card:#1e293b; --popover:#1e293b; --muted:#172033;
  --foreground:#e2e8f0; --card-foreground:#e2e8f0; --popover-foreground:#e2e8f0;
  --muted-foreground:#9ca3af;
  --primary:#818cf8; --primary-foreground:#0f172a; --primary-strong:#6366f1;
  --accent:#374151; --accent-foreground:#c7d2fe; --accent-solid:#f59e0b;
  --border:#334155; --input:#4b5563; --ring:#818cf8;
  --secondary:#334155; --secondary-foreground:#e2e8f0;
  --destructive:#ef4444; --destructive-foreground:#0f172a;
  --success:#22c55e; --warning:#f59e0b;
  --sidebar:#111827; --sidebar-foreground:#cbd5e1; --sidebar-muted:#64748b;
  --sidebar-border:#1f2937; --sidebar-hover:rgba(255,255,255,.06);
  --sidebar-active:#6366f1; --sidebar-active-foreground:#ffffff;
  --chart-1:#818cf8; --chart-2:#6366f1; --chart-3:#a5b4fc; --chart-4:#4f46e5; --chart-5:#c7d2fe;
  --shadow-opacity:.4;
}

* { box-sizing:border-box; }
html,body { height:100%; }
body {
  margin:0; font-family:var(--font-sans); font-size:15px; line-height:1.45;
  background:var(--background); color:var(--foreground);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a { color:inherit; text-decoration:none; }
h1 { font-family:var(--font-display); font-size:1.45rem; font-weight:700; letter-spacing:-.02em; margin:0; }
h2 { font-family:var(--font-display); font-size:1.02rem; font-weight:600; letter-spacing:-.01em; margin:0; }
code { font-family:var(--font-mono); background:var(--muted); padding:1px 5px; border-radius:5px; font-size:.85em; }
.mono { font-family:var(--font-mono); }
.muted { color:var(--muted-foreground); }
.spacer { flex:1; }

/* icons (Lucide, inline SVG) — inherit color via currentColor */
.ico { width:20px; height:20px; flex:none; display:inline-block; vertical-align:-.18em; }
.btn .ico { width:18px; height:18px; }
.icon-btn .ico { width:20px; height:20px; vertical-align:middle; }
.nav-ico { display:inline-flex; align-items:center; justify-content:center; }
.nav-ico .ico, .bn-ico .ico { width:22px; height:22px; }
.link .ico { width:15px; height:15px; }
.tile .ph .ico { width:30px; height:30px; color:var(--muted-foreground); }
.cart h2 .ico { width:19px; height:19px; }
hr { border:0; border-top:1px dashed var(--border); margin:10px 0; }

/* tabular money figures — the personality of the app */
.num, .stat, .hero-amt, .charge-amt { font-variant-numeric:tabular-nums; }

/* boot + spinner ---------------------------------------------------------- */
.boot { min-height:100vh; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:14px; color:var(--muted-foreground); padding:24px; text-align:center; }
.spinner { width:30px; height:30px; border:3px solid var(--border); border-top-color:var(--primary);
  border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* buttons ----------------------------------------------------------------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; height:42px;
  padding:0 18px; border-radius:var(--radius); border:1px solid transparent; font:inherit;
  font-weight:600; cursor:pointer; white-space:nowrap; background:var(--secondary);
  color:var(--secondary-foreground); transition:filter .12s, background .12s, border-color .12s; }
.btn:hover { filter:brightness(.97); }
.btn:active { transform:translateY(1px); }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-primary { background:var(--primary); color:var(--primary-foreground); box-shadow:0 1px 0 var(--primary-strong); }
.btn-primary:hover { background:var(--primary-strong); filter:none; }
.btn-ghost { background:transparent; border-color:var(--border); color:var(--foreground); }
.btn-ghost:hover { background:var(--muted); }
.btn-danger { background:var(--destructive); color:var(--destructive-foreground); }
.btn-sm { height:34px; padding:0 12px; font-size:.86rem; }
.btn-block { width:100%; }
.icon-btn { display:inline-grid; place-items:center; background:transparent; border:none;
  border-radius:9px; width:40px; height:40px; font-size:18px; cursor:pointer; color:inherit; }
.icon-btn:hover { background:var(--muted); }

/* inputs ------------------------------------------------------------------ */
.input, select.input, textarea.input { width:100%; height:42px; padding:0 12px; font:inherit;
  border:1px solid var(--input); border-radius:var(--radius); background:var(--card);
  color:var(--foreground); }
textarea.input { height:auto; padding:10px 12px; min-height:72px; }
.input:focus { outline:none; border-color:var(--ring);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--ring) 28%,transparent); }
.input::placeholder { color:var(--muted-foreground); opacity:.7; }
.label { display:block; font-size:.74rem; font-weight:600; text-transform:uppercase;
  letter-spacing:.05em; color:var(--muted-foreground); margin-bottom:6px; }
.field { margin-bottom:14px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:520px){ .grid2 { grid-template-columns:1fr; } }

/* badges + chips ---------------------------------------------------------- */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:999px;
  font-size:.7rem; font-weight:600; letter-spacing:.02em; background:var(--muted); color:var(--muted-foreground); }
.badge.ok { background:color-mix(in srgb,var(--success) 16%,transparent); color:var(--success); }
.badge.warn { background:color-mix(in srgb,var(--accent-solid) 22%,transparent); color:var(--warning); }
.badge.bad { background:color-mix(in srgb,var(--destructive) 16%,transparent); color:var(--destructive); }
.chip { display:inline-flex; align-items:center; height:34px; padding:0 14px; border-radius:999px;
  border:1px solid var(--border); background:var(--card); color:var(--muted-foreground);
  cursor:pointer; font-size:.85rem; font-weight:500; white-space:nowrap; }
.chip:hover { border-color:var(--primary); }
.chip.active { background:var(--primary); color:var(--primary-foreground); border-color:var(--primary); }

/* cards ------------------------------------------------------------------- */
.card { background:var(--card); color:var(--card-foreground); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px;
  box-shadow:0 1px 2px hsl(150 20% 10% / var(--shadow-opacity)),
             0 8px 24px -16px hsl(150 20% 10% / var(--shadow-opacity)); }
.card + .card { margin-top:16px; }
.card h2 { margin-bottom:12px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0;
  border-bottom:1px solid var(--border); }
.row:last-child { border-bottom:0; }

/* stat cards — small uppercase label over a big tabular figure ------------ */
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:16px; }
.stat-card { position:relative; overflow:hidden; padding:16px 18px; }
.stat-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--chart-1); }
.stat-card.tone-amber::before { background:var(--accent-solid); }
.stat-card.tone-red::before { background:var(--destructive); }
.stat-label { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em;
  color:var(--muted-foreground); }
.stat { font-family:var(--font-display); font-size:1.7rem; font-weight:700; letter-spacing:-.02em; margin-top:4px; }

/* dashboard hero — the big "today" readout -------------------------------- */
.hero { position:relative; overflow:hidden; padding:24px; background:var(--primary);
  color:var(--primary-foreground); border-color:transparent; }
.hero .stat-label { color:color-mix(in srgb,var(--primary-foreground) 78%,transparent); }
.hero-money { display:flex; align-items:baseline; gap:10px; margin-top:6px; flex-wrap:wrap; }
.hero-cur { font-family:var(--font-mono); font-size:.95rem; font-weight:600; opacity:.8; }
.hero-amt { font-family:var(--font-display); font-weight:700; font-size:clamp(2.2rem,9vw,3.4rem);
  line-height:1; letter-spacing:-.03em; }
.hero-sub { display:flex; gap:22px; margin-top:18px; flex-wrap:wrap; }
.hero-sub div { font-size:.82rem; color:color-mix(in srgb,var(--primary-foreground) 80%,transparent); }
.hero-sub strong { display:block; font-family:var(--font-display); font-size:1.05rem; font-weight:600; }

/* tables ------------------------------------------------------------------ */
.table-wrap { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--card); }
.table { width:100%; border-collapse:collapse; }
.table th { text-align:left; font-size:.68rem; text-transform:uppercase; letter-spacing:.06em;
  font-weight:600; color:var(--muted-foreground); padding:11px 14px; background:var(--muted);
  border-bottom:1px solid var(--border); }
.table td { padding:13px 14px; border-bottom:1px solid var(--border); }
.table tbody tr:last-child td { border-bottom:0; }
.table tr:hover td { background:color-mix(in srgb,var(--primary) 5%,transparent); }

/* login ------------------------------------------------------------------- */
.auth { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(120% 80% at 50% -20%, color-mix(in srgb,var(--primary) 12%,transparent), transparent 60%),
    var(--background); }
.auth-card { width:100%; max-width:380px; position:relative; padding-top:26px; }
/* perforated receipt edge along the top of the login card */
.auth-card::before { content:""; position:absolute; left:0; right:0; top:0; height:10px;
  background:radial-gradient(circle at 6px -2px, transparent 5px, var(--card) 5px) repeat-x;
  background-size:14px 10px; }
.auth-logo { width:52px; height:52px; border-radius:14px; background:var(--primary);
  color:var(--primary-foreground); display:grid; place-items:center; font-family:var(--font-display);
  font-weight:700; font-size:24px; margin:0 auto 16px; box-shadow:0 4px 14px -4px var(--primary); }
.auth h1 { text-align:center; margin-bottom:4px; }
.auth .sub { text-align:center; margin-bottom:20px; }
.link { color:var(--primary); cursor:pointer; font-size:.88rem; font-weight:500; }
.link:hover { text-decoration:underline; }

/* app layout -------------------------------------------------------------- */
#app.app { min-height:100vh; display:grid; grid-template-columns:1fr; }
.sidebar { display:none; }
.main { min-width:0; display:flex; flex-direction:column; min-height:100vh; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:10px; height:58px;
  padding:0 14px; background:color-mix(in srgb,var(--card) 88%,transparent);
  backdrop-filter:saturate(1.4) blur(8px); border-bottom:1px solid var(--border); }
.biz { font-family:var(--font-display); font-weight:600; }
.who { font-size:.76rem; color:var(--muted-foreground); }
.only-desktop { display:none; }
@media (min-width:1024px){ .only-desktop { display:inline; } }
.view { flex:1; padding:18px 16px; padding-bottom:96px; width:100%; max-width:none; }
.view-head { display:flex; align-items:center; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.view-head .spacer { flex:1; }
.toolbar { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }

/* sidebar nav ------------------------------------------------------------- */
.brand { display:flex; align-items:center; gap:11px; padding:20px 18px; font-family:var(--font-display);
  font-weight:700; color:var(--sidebar-foreground); letter-spacing:-.01em; }
.brand-mark { width:34px; height:34px; display:grid; place-items:center; border-radius:9px;
  background:var(--primary); color:#fff; font-size:18px; }
.nav { display:flex; flex-direction:column; gap:3px; padding:6px 12px; }
.nav-item { display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:9px;
  color:var(--sidebar-foreground); font-weight:500; cursor:pointer; transition:background .12s, color .12s; }
.nav-item:hover { background:var(--sidebar-hover); color:var(--foreground); }
.nav-item.active { background:var(--sidebar-active); color:var(--sidebar-active-foreground); font-weight:600; }
.nav-ico { width:22px; text-align:center; font-size:17px; }
.side-foot { margin-top:auto; padding:16px 18px; font-size:.72rem; color:var(--sidebar-muted);
  border-top:1px solid var(--sidebar-border); }

/* bottom nav (mobile) ----------------------------------------------------- */
.bottom-nav { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; background:var(--card);
  border-top:1px solid var(--border); padding-bottom:env(safe-area-inset-bottom); }
.bn-item { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:9px 0;
  color:var(--muted-foreground); font-size:18px; cursor:pointer; }
.bn-item small { font-size:.62rem; font-weight:500; }
.bn-item.active { color:var(--primary); }
.backdrop { display:none; }

@media (min-width:1024px) {
  #app.app { grid-template-columns:236px 1fr; }
  .sidebar { display:flex; flex-direction:column; position:sticky; top:0; align-self:start; height:100vh;
    background:var(--sidebar); border-right:1px solid var(--sidebar-border); overflow-y:auto; }
  .bottom-nav { display:none; }
  .view { padding:28px 36px; padding-bottom:36px; }
  .only-mobile { display:none !important; }
}
@media (max-width:1023px) {
  /* App-shell scroll model: only the content area (.view) scrolls, not the body.
     This keeps the fixed bottom nav rock-solid on mobile browsers (iOS/Android),
     where a body-scroll + fixed footer can drift. Scoped to the authed shell so
     the login screen still scrolls normally. */
  body:has(#app.app) { overflow:hidden; }
  #app.app { height:100vh; height:100dvh; }
  .main { height:100vh; height:100dvh; min-height:0; }
  .view { flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .topbar { position:static; }

  #app.app.nav-open .sidebar { display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0;
    width:260px; z-index:50; background:var(--sidebar); border-right:1px solid var(--sidebar-border); overflow-y:auto; }
  #app.app.nav-open .backdrop { display:block; position:fixed; inset:0; background:hsl(150 30% 4% / .5); z-index:45; }
}

/* POS --------------------------------------------------------------------- */
.pos { display:grid; grid-template-columns:1fr; gap:16px; }
.pos-products { display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:12px; }
.tile { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:11px;
  cursor:pointer; text-align:left; display:flex; flex-direction:column; gap:7px;
  transition:border-color .12s, transform .08s; }
.tile:hover { border-color:var(--primary); }
.tile:active { transform:scale(.98); }
.tile .ph { aspect-ratio:1; border-radius:8px; background:var(--muted); display:grid; place-items:center;
  font-size:26px; overflow:hidden; }
.tile .ph img { width:100%; height:100%; object-fit:cover; }
.tile .nm { font-size:.84rem; font-weight:500; line-height:1.25; }
.tile .pr { font-family:var(--font-display); font-weight:700; font-size:.92rem; font-variant-numeric:tabular-nums; }
.tile .st { font-size:.7rem; color:var(--muted-foreground); }
.tile.out { opacity:.55; }

/* POS view toggle (segmented control) */
.seg { display:inline-flex; border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.seg-btn { background:var(--card); border:none; border-left:1px solid var(--border); padding:0 11px; height:40px;
  cursor:pointer; color:var(--muted-foreground); display:grid; place-items:center; }
.seg-btn:first-child { border-left:0; }
.seg-btn:hover { background:var(--muted); color:var(--foreground); }
.seg-btn.active { background:var(--primary); color:var(--primary-foreground); }

/* small icons view */
.pos-products.view-small { grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:8px; }
.pos-products.view-small .tile { padding:7px; gap:4px; }
.pos-products.view-small .tile .ph { font-size:18px; }
.pos-products.view-small .tile .nm { font-size:.75rem; }
.pos-products.view-small .tile .pr { font-size:.8rem; }
.pos-products.view-small .tile .st { display:none; }

/* list view */
.pos-products.view-list { display:flex; flex-direction:column; gap:6px; }
.pos-products.view-list .tile { flex-direction:row; align-items:center; gap:12px; padding:8px 12px; }
.pos-products.view-list .tile .ph { width:38px; height:38px; aspect-ratio:auto; flex:none; font-size:18px; }
.pos-products.view-list .tile .nm { flex:1; font-size:.9rem; }
.pos-products.view-list .tile .pr { font-size:.92rem; }
.pos-products.view-list .tile .st { min-width:90px; text-align:right; }

/* cart header + item counter */
.cart-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.cart-head h2 { display:flex; align-items:center; gap:8px; }
.cart-count { background:var(--primary); color:var(--primary-foreground); font-family:var(--font-display);
  font-size:.78rem; font-weight:600; min-width:22px; height:22px; padding:0 6px; border-radius:999px;
  display:inline-grid; place-items:center; }

/* cart — styled like a receipt on tape */
.cart { background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; position:relative; }
.cart::before { content:""; position:absolute; left:0; right:0; top:-1px; height:9px;
  background:radial-gradient(circle at 6px 9px, var(--background) 5px, transparent 5px) repeat-x;
  background-size:13px 9px; }
.cart h2 { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.cart-item { display:flex; align-items:center; gap:8px; padding:10px 0; border-bottom:1px dashed var(--border); }
.cart-item .ci-name { font-size:.88rem; font-weight:500; }
.cart-item .ci-price { font-family:var(--font-mono); font-size:.76rem; color:var(--muted-foreground); }
.ci-price-wrap { display:flex; align-items:center; gap:5px; margin-top:4px; }
.ci-cur { font-family:var(--font-mono); font-size:.72rem; color:var(--muted-foreground); }
.ci-price-in { width:108px; height:30px; padding:0 8px; font-size:.82rem; }
.ci-serial { height:30px; padding:0 8px; font-size:.78rem; margin-top:5px; }

/* subtabs (within-view tabs) */
.subtabs { display:flex; gap:2px; margin-bottom:18px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.subtab { background:transparent; border:none; border-bottom:2px solid transparent; margin-bottom:-1px;
  padding:10px 15px; font:inherit; font-weight:500; color:var(--muted-foreground); cursor:pointer; white-space:nowrap; }
.subtab:hover { color:var(--foreground); }
.subtab.active { color:var(--primary); border-bottom-color:var(--primary); }

/* dashboard cards + quick actions */
.dash-card-wrap + .dash-card-wrap { margin-top:16px; }
.quick-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.quick-actions .btn { justify-content:flex-start; }

/* invoice document */
.invoice-doc { font-family:var(--font-sans); }
.inv-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.invoice-doc .r-biz { font-family:var(--font-display); font-size:1.1rem; font-weight:700; }
.invoice-doc .table th, .invoice-doc .table td { padding:8px 8px; }
.invoice-doc .r-line { display:flex; justify-content:space-between; padding:3px 0; }
.invoice-doc .r-rule { border-top:1px dashed var(--border); margin:8px 0; }
.qtybtn { width:30px; height:30px; border-radius:8px; border:1px solid var(--border); background:var(--muted);
  cursor:pointer; font-size:16px; line-height:1; color:inherit; }
.qtybtn:hover { border-color:var(--primary); }
.cart .row strong { font-family:var(--font-display); font-variant-numeric:tabular-nums; }
.charge { margin-top:12px; height:50px; font-size:1rem; }
.charge-amt { font-family:var(--font-display); font-variant-numeric:tabular-nums; }
.cart-cta { position:fixed; left:0; right:0; bottom:0; z-index:35; padding:10px 14px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom)); background:var(--card);
  border-top:1px solid var(--border); }
@media (min-width:1024px){
  .pos { grid-template-columns:1fr 372px; align-items:start; }
  .cart { position:sticky; top:74px; }
  .cart-cta { display:none; }
}

/* modal + sheet ----------------------------------------------------------- */
.modal-bg { position:fixed; inset:0; background:hsl(150 30% 4% / .55); z-index:60; display:flex;
  align-items:flex-end; justify-content:center; padding:0; animation:fade .15s ease; }
.modal { background:var(--card); color:var(--card-foreground); width:100%; max-width:520px; max-height:92vh;
  overflow-y:auto; border-radius:18px 18px 0 0; padding:20px; animation:rise .2s ease; }
.modal-head { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.modal-head h2 { font-size:1.1rem; }
@keyframes fade { from { opacity:0; } }
@keyframes rise { from { transform:translateY(24px); } }
@media (min-width:640px){
  .modal-bg { align-items:center; padding:20px; }
  .modal { border-radius:14px; }
  @keyframes rise { from { transform:translateY(12px) scale(.98); opacity:.6; } }
}

/* toast ------------------------------------------------------------------- */
.toast { position:fixed; left:50%; bottom:96px; transform:translateX(-50%) translateY(18px); z-index:100;
  background:var(--foreground); color:var(--background); padding:11px 18px; border-radius:999px;
  font-size:.86rem; font-weight:500; opacity:0; pointer-events:none; transition:.2s; max-width:90vw;
  box-shadow:0 10px 30px -8px hsl(150 30% 4% / .4); }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.toast.err { background:var(--destructive); color:#fff; }
@media (min-width:1024px){ .toast { bottom:28px; } }

/* charts + misc ----------------------------------------------------------- */
.empty { text-align:center; color:var(--muted-foreground); padding:52px 16px; }
.bars { display:flex; align-items:flex-end; gap:7px; height:130px; }
.bar-col { flex:1; display:flex; flex-direction:column; justify-content:flex-end; gap:5px; }
.bar { width:100%; background:linear-gradient(var(--chart-2),var(--chart-1)); border-radius:6px 6px 0 0; min-height:3px; }
.bar-lbl { text-align:center; color:var(--muted-foreground); font-size:.6rem; font-family:var(--font-mono); }
.cards-list { display:flex; flex-direction:column; gap:10px; }

/* searchable category combobox */
.combo { position:relative; }
.combo-pop { position:absolute; z-index:40; top:calc(100% + 4px); left:0; right:0; background:var(--popover);
  border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 12px 30px -10px hsl(150 30% 4% / .35);
  max-height:240px; overflow-y:auto; }
.combo-opt { padding:10px 13px; cursor:pointer; font-size:.9rem; }
.combo-opt:hover { background:var(--muted); }

/* running-balance line chart */
.line-chart { width:100%; height:150px; display:block; }
.lc-area { fill:color-mix(in srgb,var(--primary) 13%,transparent); stroke:none; }
.lc-line { fill:none; stroke:var(--primary); stroke-width:2; vector-effect:non-scaling-stroke;
  stroke-linejoin:round; stroke-linecap:round; }
.chart-foot { display:flex; justify-content:space-between; font-size:.66rem; color:var(--muted-foreground);
  font-family:var(--font-mono); margin-top:6px; }

/* cash ledger rows */
.led { display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--border); }
.led:last-child { border-bottom:0; }
.led-ico { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; flex:none;
  background:color-mix(in srgb,var(--success) 14%,transparent); color:var(--success); }
.led-ico.out { background:color-mix(in srgb,var(--destructive) 14%,transparent); color:var(--destructive); }
.led-amt { font-family:var(--font-display); font-variant-numeric:tabular-nums; font-weight:600; }
.led-amt.in { color:var(--success); }
.led-amt.out { color:var(--destructive); }

/* receipt logo */
.r-logo { display:block; max-width:120px; max-height:64px; margin:0 auto 8px; object-fit:contain; }

/* receipt — full receipt-tape treatment */
#receipt { font-family:var(--font-mono); font-size:.84rem; background:var(--card);
  padding:18px 16px; border-radius:10px; position:relative; }
#receipt .r-center { text-align:center; }
#receipt .r-line { display:flex; justify-content:space-between; gap:10px; padding:3px 0; }
#receipt .r-rule { border-top:1px dashed var(--border); margin:8px 0; }
#receipt .r-biz { font-family:var(--font-display); font-size:1.05rem; font-weight:700; }

@media print {
  body * { visibility:hidden; }
  #receipt, #receipt * { visibility:visible; }
  #receipt { position:absolute; left:0; top:0; width:100%; border:0; padding:0; background:#fff; color:#000; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
