/*
 * Mega Stream — new look (beta), 2026-10-29.
 *
 * What Mega Stream is for: the owner's and managers' window on the business -- sales, stock, money
 * due, parties -- read many times a day, often on a phone, sometimes on a big screen. So the look is
 * a calm "control room": numbers first (a figure font with even digits, larger key figures), colour
 * only where it means something (green up / paid, red down / overdue, amber waiting), a deep
 * ink-and-teal frame that recedes, and no blur on repeated cards (phones scroll smoothly).
 *
 * A layer over the live app (html.nl): every screen, button and number is the live code. Promote
 * copies it to live with the beta index.html (tools/beta/newlook.py rebuilds that from live).
 */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

html.nl:root{
  --bg:#EEF1F4; --surface:#FFFFFF; --surface-2:#F6F8FA; --sunken:#E8ECF0;
  --ink:#0F172A; --ink-2:#334155; --muted:#64748B; --faint:#94A3B8;
  --line:#E2E8F0; --line-2:#CBD5E1;
  --brand:#0D9488; --brand-ink:#0F766E; --brand-soft:#DDF4F1;
  --green:#15803D; --green-soft:#DCFCE7; --red:#B91C1C; --red-soft:#FEE2E2;
  --amber:#B45309; --amber-soft:#FEF3C7; --blue:#1D4ED8; --blue-soft:#DBEAFE;
  --nav:#0B1220; --nav-ink:rgba(226,232,240,.62); --nav-hi:#fff;
  --r:18px; --r-sm:12px;
  --sh:0 1px 0 rgba(15,23,42,.04), 0 12px 32px -22px rgba(15,23,42,.35);
  --sh-pop:0 30px 70px -24px rgba(15,23,42,.55);
  --hero1:#0F766E; --hero2:#0B1220;
}
@media (prefers-color-scheme:dark){ html.nl:root:not([data-theme="light"]){
  --bg:#070B14; --surface:#0F1624; --surface-2:#131C2D; --sunken:#0B111C;
  --ink:#E7ECF3; --ink-2:#B8C2D1; --muted:#8391A7; --faint:#5B687D;
  --line:#1C2638; --line-2:#26324A;
  --brand:#2DD4BF; --brand-ink:#5EEAD4; --brand-soft:#0F2A2B;
  --green:#4ADE80; --green-soft:#0E2A1A; --red:#F87171; --red-soft:#2E1414; --amber:#FBBF24; --amber-soft:#2A1F0B; --blue:#93B4FF; --blue-soft:#121F3B;
  --nav:#04070D; --hero1:#115E59; --hero2:#060A12;
  --sh:0 1px 0 rgba(255,255,255,.03), 0 14px 34px -22px rgba(0,0,0,.9);
}}
html.nl:root[data-theme="dark"]{
  --bg:#070B14; --surface:#0F1624; --surface-2:#131C2D; --sunken:#0B111C;
  --ink:#E7ECF3; --ink-2:#B8C2D1; --muted:#8391A7; --faint:#5B687D;
  --line:#1C2638; --line-2:#26324A;
  --brand:#2DD4BF; --brand-ink:#5EEAD4; --brand-soft:#0F2A2B;
  --green:#4ADE80; --green-soft:#0E2A1A; --red:#F87171; --red-soft:#2E1414; --amber:#FBBF24; --amber-soft:#2A1F0B; --blue:#93B4FF; --blue-soft:#121F3B;
  --nav:#04070D; --hero1:#115E59; --hero2:#060A12;
  --sh:0 1px 0 rgba(255,255,255,.03), 0 14px 34px -22px rgba(0,0,0,.9);
}

/* figures: even digits, a figure face for the big ones */
html.nl .num, html.nl .metric b, html.nl .hero b, html.nl .kv b { font-variant-numeric:tabular-nums; }
html.nl .hero b, html.nl .metric b, html.nl .serif { font-family:"Space Grotesk",Inter,system-ui,sans-serif; letter-spacing:-.02em; }

/* the frame recedes: ink sidebar with a teal rail on the open section */
html.nl .sidebar { background:linear-gradient(180deg,var(--nav),#0F1A2E); border-right:1px solid rgba(255,255,255,.05); }
html.nl .sidebar a.on, html.nl .sidebar button.on, html.nl .sidebar [aria-current="page"] { box-shadow:inset 3px 0 0 var(--brand); background:rgba(45,212,191,.10); }
html.nl .topbar { border-bottom:1px solid transparent; }
html.nl .topbar.scrolled { border-bottom-color:var(--line); box-shadow:0 8px 24px -20px rgba(15,23,42,.6); }

/* hero: deeper, with a soft light from the top corner */
html.nl .hero { border-radius:24px; background:
  radial-gradient(90% 120% at 100% 0%,rgba(94,234,212,.28),transparent 55%),
  radial-gradient(70% 90% at 0% 100%,rgba(59,130,246,.18),transparent 60%),
  linear-gradient(150deg,var(--hero1),var(--hero2)); box-shadow:0 30px 60px -34px rgba(13,148,136,.7); }

/* cards and key figures */
html.nl .card { border-radius:var(--r); border-color:var(--line); }
html.nl .metric { padding:16px 18px; transition:background .15s ease; }
html.nl .metric:hover { background:var(--surface-2); }

/* controls: clear, finger-sized */
html.nl .btn { border-radius:12px; font-weight:650; }
html.nl .btn.primary, html.nl .btn-primary { background:var(--brand); border-color:var(--brand); color:#fff; box-shadow:0 10px 24px -14px var(--brand); }
html.nl .chip { border-radius:10px; padding:7px 13px; }
html.nl .chip.on { background:var(--brand); border-color:var(--brand); color:#fff; }
html.nl .tbl th { text-transform:uppercase; letter-spacing:.06em; font-size:10.5px; }
html.nl .tbl tbody tr:hover td { background:var(--surface-2); }
html.nl .tabbar { border-top:1px solid var(--line); }
html.nl .sheet { border-radius:26px 26px 0 0; }

/* beta tag */
html.nl .nl-beta-tag { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(var(--tab-h) + 8px + env(safe-area-inset-bottom)); z-index:60;
  font:700 10px/1 Inter,system-ui,sans-serif; letter-spacing:.14em; padding:5px 10px; border-radius:99px; background:var(--ink); color:var(--surface); opacity:.75; pointer-events:none; }
@media (min-width:900px){ html.nl .nl-beta-tag { bottom:12px; } }
@media (prefers-reduced-motion:reduce){ html.nl *{ transition:none !important; } }

/* ADDED 2026-11-05 (user: "blue line on search box not symmetric", Home "This month" box): the ring is drawn on the
 * rounded box itself (.field:focus-within); the control inside the box no longer draws a second, offset line */
html.nl .field :focus-visible, html.nl .field:focus-within :focus{outline:none !important}
html.nl .field:focus-within{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft)}
