/* ============================================================================
   Ossys® DynaMobile — Premium UI System
   Light-first, dark-mode capable. Glassmorphism + neumorphic accents,
   depth layers, GPU-accelerated micro-interactions. No framework dependency.
   Brand: #0B77BD → #00D2FF
   Layers: 1) Tokens 2) Base 3) Layout/Shell 4) Components 5) Modules
           6) Motion 7) Responsive 8) A11y / reduced-motion
   ========================================================================== */

/* ============================ 1. DESIGN TOKENS ============================ */
:root {
  /* Brand */
  --brand:        #0B77BD;
  --brand-dark:   #095e96;
  --brand-2:      #00D2FF;
  --brand-grad:   linear-gradient(120deg, #0B77BD 0%, #00D2FF 100%);
  --brand-soft:   rgba(11,119,189,.10);

  /* Light canvas */
  --bg:           #eaeef5;
  --bg-glow-1:    rgba(11,119,189,.16);
  --bg-glow-2:    rgba(0,210,255,.14);
  --surface:      #ffffff;
  --surface-2:    #f6f8fc;
  --glass:        rgba(255,255,255,.66);
  --glass-brd:    rgba(255,255,255,.75);
  --line:         #e4e9f1;
  --line-2:       #eef2f8;

  /* Ink */
  --ink:          #0f1b2d;
  --ink-2:        #334155;
  --muted:        #64748b;
  --faint:        #94a3b8;

  /* Semantic */
  --ok:           #16a34a;   --ok-bg:   #dcfce7;
  --warn:         #d97706;   --warn-bg: #fef3c7;
  --danger:       #dc2626;   --danger-bg:#fee2e2;
  --info:         #2563eb;   --info-bg: #dbeafe;
  --purple:       #7c3aed;   --purple-bg:#ede9fe;
  --indigo:       #4f46e5;   --indigo-bg:#e0e7ff;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radius */
  --r-xs: 8px; --r-sm: 11px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;

  /* Elevation (light) */
  --sh-1: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --sh-2: 0 6px 16px -6px rgba(16,24,40,.14), 0 2px 6px -2px rgba(16,24,40,.08);
  --sh-3: 0 18px 40px -16px rgba(16,24,40,.22);
  --sh-brand: 0 12px 28px -10px rgba(11,119,189,.55);
  --sh-inset: inset 0 1px 0 rgba(255,255,255,.7);

  /* Layout */
  --topbar-h: 60px;
  --tabbar-h: 64px;
  --maxw: 920px;

  /* Motion */
  --ease: cubic-bezier(.16,.84,.34,1);
  --spring: cubic-bezier(.22,1.4,.36,1);
}

/* Dark theme overrides */
:root[data-theme="dark"] {
  --bg:           #050f24;
  --bg-glow-1:    rgba(11,119,189,.30);
  --bg-glow-2:    rgba(0,210,255,.18);
  --surface:      rgba(255,255,255,.045);
  --surface-2:    rgba(255,255,255,.07);
  --glass:        rgba(13,26,50,.62);
  --glass-brd:    rgba(255,255,255,.14);
  --line:         rgba(255,255,255,.10);
  --line-2:       rgba(255,255,255,.06);

  --ink:          #f1f6fd;
  --ink-2:        #cbd6e8;
  --muted:        #93a3bf;
  --faint:        #6f81a3;

  --ok-bg:#0d2a1c; --warn-bg:#3a2a09; --danger-bg:#3a1416; --info-bg:#0d2147; --purple-bg:#221544; --indigo-bg:#191a45;

  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 10px 26px -12px rgba(0,0,0,.6);
  --sh-3: 0 26px 54px -18px rgba(0,0,0,.7);
  --sh-brand: 0 14px 34px -12px rgba(0,210,255,.45);
  --sh-inset: inset 0 1px 0 rgba(255,255,255,.06);
}

/* ================================ 2. BASE ================================ */
* { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
}

/* Ambient aurora background */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(820px 520px at 8% -8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(720px 520px at 100% 0%, var(--bg-glow-2), transparent 55%);
  transition: opacity .4s var(--ease);
}

h1,h2,h3,h4,h5 { color: var(--ink); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 3. LAYOUT / SHELL ========================== */
.app {
  width: min(100% - 28px, var(--maxw));
  margin: 0 auto;
  padding: 18px 0 28px;
}

/* Topbar — sticky glass */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 4px 18px -8px rgba(11,119,189,.7);
}
:root[data-theme="dark"] .topbar { box-shadow: 0 6px 22px -10px rgba(0,0,0,.7); }
.topbar .tb-back, .topbar .tb-act {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.topbar .tb-back:hover, .topbar .tb-act:hover { background: rgba(255,255,255,.3); }
.topbar .tb-back:active, .topbar .tb-act:active { transform: scale(.94); }
.topbar svg { width: 20px; height: 20px; stroke-width: 2; }
.topbar .tb-title {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .tb-title .logo {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); box-shadow: var(--sh-inset);
}
.topbar .tb-title .logo svg { width: 18px; height: 18px; }
.topbar .tb-title small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .18em; opacity: .8; text-transform: uppercase; }

/* Bottom tab bar — global nav */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--glass-brd);
  box-shadow: 0 -8px 24px -14px rgba(16,24,40,.3);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 600;
  position: relative; transition: color .18s var(--ease);
}
.tabbar a svg { width: 23px; height: 23px; stroke-width: 1.9; transition: transform .2s var(--spring); }
.tabbar a:hover { color: var(--brand); }
.tabbar a.active { color: var(--brand); }
.tabbar a.active svg { transform: translateY(-2px); }
.tabbar a.active::before {
  content: ""; position: absolute; top: 6px; width: 34px; height: 30px; border-radius: 999px;
  background: var(--brand-soft); z-index: -1;
}

/* Module segmented sub-nav (fixed bottom on detail pages) */
.subnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--glass-brd);
}
.subnav-inner {
  width: min(100% , var(--maxw)); margin: 0 auto;
  display: flex; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 5px;
}
.subnav-inner a {
  flex: 1; text-align: center; padding: 9px 8px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .18s var(--ease);
}
.subnav-inner a svg { width: 16px; height: 16px; }
.subnav-inner a:hover { color: var(--ink); }
.subnav-inner a.active { background: var(--brand-grad); color: #fff; box-shadow: var(--sh-brand); }

/* ============================ 4. COMPONENTS ============================== */
.page-title { margin: 4px 2px 16px; }
.page-title h1 { font-size: 22px; }
.page-title p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

.section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--ink); margin: 26px 2px 12px;
  text-transform: none;
}
.section-label svg { width: 17px; height: 17px; color: var(--brand); }

/* Card / glass surface */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  padding: 18px; margin-bottom: 14px;
}
.glass {
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--sh-2);
}
.lift { transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--brand); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14.5px; line-height: 1;
  padding: 12px 18px; border-radius: var(--r-sm); min-height: 46px;
  border: 1px solid transparent; transition: transform .14s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: #fff; background: var(--brand-grad); box-shadow: var(--sh-brand); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(0,210,255,.55); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--ink); background: var(--surface); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* Form fields */
.field { margin-bottom: 14px; }
.field label, label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, input[type="text"], input[type="password"], input[type="search"],
input[type="date"], input[type="number"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; font-size: 15px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11,119,189,.16);
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

/* Search bar (icon + input + button) */
.searchbar { display: flex; gap: 8px; margin-bottom: 4px; }
.searchbar .search-wrap { position: relative; flex: 1; }
.searchbar .search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.searchbar .search-wrap input { padding-left: 40px; }
.searchbar .btn { padding-left: 20px; padding-right: 20px; }

/* List rows */
.list { display: flex; flex-direction: column; gap: 9px; }
.list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand); padding: 6px 4px; margin-top: 4px;
}
.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 13px 14px;
  box-shadow: var(--sh-1); color: var(--ink);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s;
}
a.row:hover, .row.lift:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--brand); }
.row .av {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--brand-soft); color: var(--brand);
}
.row .av.warn { background: var(--warn-bg); color: var(--warn); }
.row .meta { min-width: 0; flex: 1; }
.row .meta b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--brand); white-space: nowrap; }
.row .chev { color: var(--faint); flex-shrink: 0; }
.row .chev svg { width: 18px; height: 18px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.hold { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.due { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Key-value detail table */
.kv { width: 100%; border-collapse: collapse; }
.kv tr { border-bottom: 1px solid var(--line-2); }
.kv tr:last-child { border-bottom: none; }
.kv td { padding: 11px 2px; vertical-align: top; font-size: 14px; }
.kv td:first-child { color: var(--muted); width: 46%; }
.kv td:last-child { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.kv td.full { display: block; text-align: left; width: 100%; }

/* Definition rows (label left / value right) used in details */
.dl { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.dl:last-child { border-bottom: none; }
.dl .k { color: var(--muted); }
.dl .v { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.v.pos { color: var(--ok); } .v.neg { color: var(--danger); } .v.warnv { color: var(--warn); } .v.brandv { color: var(--brand); }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--faint); margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ============================ 5. MODULES ================================ */
/* Dashboard tiles */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 12px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 11px;
  box-shadow: var(--sh-1);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--brand); }
.tile .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.tile .ic svg { width: 27px; height: 27px; stroke-width: 2; }
.tile span { font-weight: 600; font-size: 14px; }
.ic-blue{background:var(--info-bg);color:#2563eb;} .ic-green{background:var(--ok-bg);color:#16a34a;}
.ic-amber{background:var(--warn-bg);color:#d97706;} .ic-purple{background:var(--purple-bg);color:#7c3aed;}
.ic-indigo{background:var(--indigo-bg);color:#4f46e5;} .ic-red{background:var(--danger-bg);color:#dc2626;}

/* Stat / KPI widgets */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--sh-1);
}
.stat .si { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; }
.stat .si svg { width: 19px; height: 19px; }
.stat .num { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .lab { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Report gradient tiles */
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.report {
  border-radius: var(--r-md); padding: 18px 14px; color: #fff; text-align: left;
  display: flex; flex-direction: column; gap: 10px; min-height: 92px;
  box-shadow: var(--sh-2); position: relative; overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.report:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.report::after { content:""; position:absolute; right:-20px; top:-20px; width:90px; height:90px; border-radius:50%; background:rgba(255,255,255,.16); }
.report .ri { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.22); }
.report .ri svg { width: 19px; height: 19px; }
.report b { font-size: 14.5px; font-weight: 700; }
.r-blue{background:linear-gradient(135deg,#3b82f6,#2563eb);} .r-green{background:linear-gradient(135deg,#22c55e,#16a34a);}
.r-purple{background:linear-gradient(135deg,#a855f7,#7c3aed);} .r-amber{background:linear-gradient(135deg,#f59e0b,#d97706);}
.r-cyan{background:linear-gradient(135deg,#0B77BD,#00D2FF);}

/* Aging breakdown bars */
.aging { display: flex; flex-direction: column; gap: 10px; }
.aging .ar { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.aging .ar .albl { color: var(--muted); }
.aging .ar .track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.aging .ar .fill { height: 100%; border-radius: 999px; background: var(--brand-grad); }
.aging .ar .aval { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.aging .ar.warnr .fill { background: linear-gradient(90deg,#f59e0b,#d97706); }
.aging .ar.dangerr .fill { background: linear-gradient(90deg,#ef4444,#dc2626); }

/* Mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 6px 2px 22px; position: relative; }
.bars .bar { flex: 1; border-radius: 6px 6px 0 0; background: var(--brand-grad); position: relative; min-height: 4px; transition: height .8s var(--spring); }
.bars .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

/* Accordion (receivables docs) */
details.acc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  margin-bottom: 9px; overflow: hidden; box-shadow: var(--sh-1);
}
details.acc > summary {
  list-style: none; cursor: pointer; padding: 13px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 600; font-size: 14px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .chev { transition: transform .2s var(--ease); color: var(--faint); }
details.acc[open] > summary .chev { transform: rotate(180deg); }
details.acc .acc-body { padding: 0 14px 14px; font-size: 13.5px; color: var(--ink-2); }

/* Download list */
.dl-list { display: flex; flex-direction: column; gap: 10px; }
.dl-item { display: flex; align-items: center; gap: 12px; }
.dl-item .di { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); flex-shrink: 0; }
.dl-item .di svg { width: 20px; height: 20px; }

/* ============================== 6. MOTION =============================== */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal[data-d="1"].in { transition-delay: .05s; }
.reveal[data-d="2"].in { transition-delay: .1s; }
.reveal[data-d="3"].in { transition-delay: .15s; }
.reveal[data-d="4"].in { transition-delay: .2s; }
.reveal[data-d="5"].in { transition-delay: .25s; }

@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-9px)} }
.float { animation: floaty 6s var(--ease) infinite; }

/* tilt target gets perspective from parent .scene */
.scene { perspective: 1100px; }
.tilt { transition: transform .3s var(--ease); transform-style: preserve-3d; will-change: transform; }

/* Skeleton shimmer */
@keyframes shimmer { to { background-position: -200% 0; } }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }

/* ============================ 7. RESPONSIVE ============================= */
@media (min-width: 620px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-grid, .report-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) {
  .topbar .tb-title small { display: none; }
}

/* ============================ 8. A11Y =================================== */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .float, .skel { animation: none !important; }
  .tilt { transform: none !important; }
}
