/* Gone Creative Client Tracker
   Graphite Liquid Glass. Content sits on solid grouped sections; only the
   floating toolbar, the month picker and the phone tab bar are glass.
   Light and dark follow prefers-color-scheme. */

/* ---------- Tokens: light ---------- */
:root {
  color-scheme: light dark;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, system-ui, sans-serif;
  --font-round: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;

  --page-base: #f2f2f7;
  --page-bg: radial-gradient(900px 560px at 12% -12%, rgba(0,0,0,0.06), rgba(0,0,0,0) 70%), #f2f2f7;
  --card: #ffffff;
  --inset: #f2f2f7;
  --label: #000000;
  --label2: rgba(60,60,67,0.78);
  --sep: rgba(60,60,67,0.18);
  --grid: rgba(60,60,67,0.12);

  --good: #1f63c7;      /* on track + Won count only */
  --watch: #c93400;
  --bad: #d70015;
  --bad-tint: rgba(215,0,21,0.10);

  --bar: #3a3a3c;
  --bar-sel: #000000;
  --bar-none: #d1d1d6;

  --prominent-bg: #1c1c1e;
  --prominent-fg: #ffffff;
  --seg-on: #ffffff;
  --seg-on-text: #000000;
  --seg-off: rgba(60,60,67,0.85);
  --seg-on-shadow: 0 2px 10px rgba(0,0,0,0.18);

  --glass-bg: rgba(255,255,255,0.58);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 0 0 1px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.10);
  --glass-solid: #ffffff;
  --auth-glass-bg: rgba(255,255,255,0.62);
  --auth-glass-shadow: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 0 0 1px rgba(0,0,0,0.05), 0 24px 60px rgba(0,0,0,0.12);

  --chip-bg: rgba(120,120,128,0.14);
  --chip-fg: #000000;
  --chip-strong-bg: #1c1c1e;
  --chip-strong-fg: #ffffff;
  --field: rgba(120,120,128,0.14);

  --hero-bg: #e9e9ee;
  --blob-a: rgba(255,255,255,1);
  --blob-b: rgba(168,168,177,0.5);
  --blob-c: rgba(255,255,255,0.95);
  --blob-d: rgba(202,202,210,0.85);
  --blob-e: rgba(255,255,255,0.9);
  --hero-grid: rgba(0,0,0,0.05);
  --hero-rim: rgba(255,255,255,0.9);
  --hero-label: #000000;
  --hero-label2: rgba(60,60,67,0.80);
  --logo-line: rgba(60,60,67,0.35);

  --gutter: 20px;
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --page-base: #0e0e10;
    --page-bg: radial-gradient(900px 560px at 12% -12%, rgba(255,255,255,0.10), rgba(255,255,255,0) 70%), radial-gradient(800px 520px at 100% 0%, rgba(255,255,255,0.05), rgba(255,255,255,0) 70%), #0e0e10;
    --card: #1c1c1e;
    --inset: #2c2c2e;
    --label: #ffffff;
    --label2: rgba(235,235,245,0.68);
    --sep: rgba(84,84,88,0.6);
    --grid: rgba(84,84,88,0.45);

    --good: #5a9bf5;
    --watch: #ff9f0a;
    --bad: #ff453a;
    --bad-tint: rgba(255,69,58,0.16);

    --bar: #d1d1d6;
    --bar-sel: #ffffff;
    --bar-none: #3a3a3c;

    --prominent-bg: #f5f5f7;
    --prominent-fg: #000000;
    --seg-on: rgba(255,255,255,0.18);
    --seg-on-text: #ffffff;
    --seg-off: rgba(235,235,245,0.75);

    --glass-bg: rgba(66,66,72,0.42);
    --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -1px 0 rgba(255,255,255,0.06), inset 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px rgba(0,0,0,0.40);
    --glass-solid: #2c2c2e;
    --auth-glass-bg: rgba(66,66,72,0.42);
    --auth-glass-shadow: inset 0 1px 0 rgba(255,255,255,0.32), inset 0 -1px 0 rgba(255,255,255,0.06), inset 0 0 0 1px rgba(255,255,255,0.08), 0 24px 60px rgba(0,0,0,0.5);

    --chip-bg: rgba(120,120,128,0.32);
    --chip-fg: #ffffff;
    --chip-strong-bg: #f5f5f7;
    --chip-strong-fg: #000000;
    --field: rgba(120,120,128,0.30);

    --hero-bg: #262629;
    --blob-a: rgba(255,255,255,0.15);
    --blob-b: rgba(0,0,0,0.42);
    --blob-c: rgba(255,255,255,0.09);
    --blob-d: rgba(255,255,255,0.035);
    --blob-e: rgba(255,255,255,0.05);
    --hero-grid: rgba(255,255,255,0.05);
    --hero-rim: rgba(255,255,255,0.14);
    --hero-label: #ffffff;
    --hero-label2: rgba(235,235,245,0.72);
    --logo-line: rgba(235,235,245,0.35);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--label);
  background: var(--page-bg);
  background-color: var(--page-base);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
a { color: inherit; }
a:hover { opacity: 0.8; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--label); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--prominent-bg); color: var(--prominent-fg);
  padding: 12px 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Glass (controls only) ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--glass-shadow);
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .auth-card {
    background: var(--glass-solid) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* ---------- Liquid backdrop (header + sign in only) ---------- */
.liquid {
  position: absolute; inset: -25%; pointer-events: none; filter: blur(60px);
}
.liquid span { position: absolute; border-radius: 50%; display: block; }
.liquid .b1 { width: 72%; height: 85%; right: -6%; top: -22%; background: var(--blob-a); transform: rotate(-18deg); }
.liquid .b2 { width: 62%; height: 72%; left: -8%; bottom: -18%; background: var(--blob-b); }
.liquid .b3 { width: 50%; height: 26%; right: 4%; bottom: 10%; background: var(--blob-c); transform: rotate(-24deg); }
.liquid .b4 { width: 48%; height: 55%; left: 24%; top: 18%; background: var(--blob-d); }
.liquid .b5 { width: 95%; height: 16%; left: 6%; top: 46%; background: var(--blob-e); transform: rotate(-14deg); }
.liquid-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--hero-grid) 1px, transparent 1px), linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center;
  -webkit-mask-image: radial-gradient(140% 130% at 80% 10%, #000 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(140% 130% at 80% 10%, #000 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0) 100%);
}

/* ---------- Shared type ---------- */
.section-title { margin: 8px 4px 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.num-round { font-family: var(--font-round); font-weight: 700; }
.muted { color: var(--label2); }

/* ---------- Status ---------- */
.status { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.status svg { flex: none; }
.status.good { color: var(--good); }
.status.watch { color: var(--watch); }
.status.bad { color: var(--bad); }

/* ---------- Buttons ---------- */
.btn-prominent {
  font-size: 17px; font-weight: 600;
  color: var(--prominent-fg); background: var(--prominent-bg);
  border: 0; border-radius: 999px; min-height: 52px; padding: 0 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-prominent:disabled { opacity: 0.6; cursor: default; }
.btn-plain {
  background: transparent; border: 0; color: var(--label2);
  font-size: 15px; font-weight: 600; min-height: 44px; padding: 0 12px; border-radius: 999px;
}
.btn-plain:hover { color: var(--label); }

/* ======================================================================
   DASHBOARD
   ====================================================================== */
.page { min-height: 100vh; padding: 0 var(--gutter) 72px; }

/* Toolbar */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  max-width: 1180px; margin: 0 auto; padding: 14px 0 10px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
}
.brand {
  border-radius: 999px; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
}
.gc-badge {
  width: 32px; height: 32px; border-radius: 999px; flex: none;
  background: var(--prominent-bg); color: var(--prominent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: -0.02em;
}
.brand-name { font-size: 15px; font-weight: 600; }

.seg { border-radius: 999px; padding: 4px; display: flex; gap: 2px; }
.seg-btn {
  font-size: 15px; font-weight: 500; min-height: 40px; padding: 0 18px;
  border: 0; border-radius: 999px; background: transparent; color: var(--seg-off);
  white-space: nowrap;
}
.seg-btn[aria-pressed="true"], .seg-more.is-on select {
  font-weight: 600; background: var(--seg-on); color: var(--seg-on-text); box-shadow: var(--seg-on-shadow);
}
.seg-btn .short { display: none; }
.seg-more { position: relative; display: flex; }
.seg-more select {
  -webkit-appearance: none; appearance: none;
  font-size: 15px; font-weight: 500; min-height: 40px; padding: 0 30px 0 16px;
  border: 0; border-radius: 999px; background: transparent; color: var(--seg-off); cursor: pointer;
  max-width: 160px;
}
.seg-more select option { color: initial; background: initial; }
.seg-more svg { position: absolute; right: 11px; top: 50%; margin-top: -6px; pointer-events: none; color: var(--seg-off); }
.seg-more.is-on svg { color: var(--seg-on-text); }

.actions { border-radius: 999px; padding: 4px; display: flex; gap: 2px; position: relative; }
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--label);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.icon-btn:hover { background: var(--chip-bg); }
.icon-btn.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Account menu: solid, not glass */
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 240px; background: var(--card); border-radius: 22px; padding: 14px;
  box-shadow: 0 0 0 1px var(--sep), 0 18px 40px rgba(0,0,0,0.25);
  display: flex; flex-direction: column; gap: 10px;
}
.menu-who { font-size: 13px; color: var(--label2); overflow-wrap: anywhere; }
.menu-who strong { display: block; font-size: 15px; color: var(--label); font-weight: 600; }
.menu .btn-prominent { min-height: 44px; font-size: 15px; }

/* Content column */
.content {
  max-width: 1180px; margin: 0 auto; padding-top: 28px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Header (liquid panel) */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 34px; background: var(--hero-bg);
  padding: 36px 40px; min-height: 280px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  box-shadow: inset 0 1px 0 var(--hero-rim), 0 1px 0 rgba(0,0,0,0.04);
}
.hero-text { position: relative; flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-meta { font-size: 15px; font-weight: 600; color: var(--hero-label2); }
.hero h1 { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.02em; color: var(--hero-label); overflow-wrap: anywhere; }
.hero-summary { font-size: 20px; line-height: 28px; color: var(--hero-label2); max-width: 620px; }
.logo-slot {
  position: relative; flex: 0 1 240px; height: 132px; border-radius: 26px;
  border: 1.5px dashed var(--logo-line);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px; font-size: 15px; font-weight: 600; color: var(--hero-label2);
}
.logo-slot.has-logo { border: 0; padding: 0; }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* Highlights */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.stat {
  background: var(--card); border-radius: 26px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 4px; min-height: 156px;
}
.stat-label { font-size: 15px; font-weight: 600; color: var(--label2); }
.stat-value { font-family: var(--font-round); font-size: 46px; line-height: 54px; font-weight: 700; letter-spacing: -0.01em; }
.stat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 15px; margin-top: auto; }
.stat-foot .note { color: var(--label2); }
.stat .phone-roas { display: none; }

/* Split: chart + side lists */
.split { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 14px; }
.split-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.split .section-title { margin: 0 4px; }
.split-side .section-title + .card + .section-title { margin-top: 12px; }

.card { background: var(--card); border-radius: 26px; }

/* Chart */
.chart-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.sel-day { display: flex; flex-direction: column; gap: 2px; }
.sel-kicker { font-size: 13px; font-weight: 600; color: var(--label2); letter-spacing: 0.02em; }
.sel-value { font-family: var(--font-round); font-size: 28px; font-weight: 700; }
.sel-value .unit { font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--label2); }
.sel-sub { font-size: 15px; color: var(--label2); }
.sel-line { display: none; font-size: 15px; color: var(--label2); }
.sel-line b { color: var(--label); }
.chart-hint { font-size: 13px; color: var(--label2); max-width: 240px; text-align: right; }

.chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.bars, .bar-labels {
  display: grid;
  grid-template-columns: repeat(var(--n, 11), minmax(var(--colmin, 40px), 1fr));
  gap: 10px;
  min-width: max(520px, calc(var(--n, 11) * 50px));
}
.bars {
  align-items: end; height: 170px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px);
  background-size: 100% 42px;
}
.bar {
  height: 100%; width: 100%; border: 0; padding: 0; background: transparent;
  display: flex; align-items: flex-end; border-radius: 10px 10px 4px 4px;
}
.bar i {
  display: block; width: 100%; border-radius: 10px 10px 4px 4px;
  background: var(--bar); opacity: 0.55;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.bar:hover i { opacity: 0.8; }
.bar.zero i { background: var(--bar-none); opacity: 1; }
.bar[aria-pressed="true"] i { background: var(--bar-sel); opacity: 1; }
.bar.zero[aria-pressed="true"] i { background: var(--bar-sel); }
.bar-labels { padding-top: 8px; }
.bar-label { text-align: center; font-size: 12px; font-weight: 500; color: var(--label2); line-height: 16px; white-space: nowrap; }
.bar-label .spend { display: block; font-weight: 500; }
.bar-label.on { font-weight: 700; color: var(--label); }
.bar-ends { display: none; justify-content: space-between; font-size: 12px; color: var(--label2); }
.chart-empty { font-size: 17px; color: var(--label2); padding: 40px 0; text-align: center; }

/* Lists */
.list { padding: 0 20px; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 58px; font-size: 17px;
}
.row + .row { box-shadow: inset 0 1px 0 var(--sep); }
.list.compact .row { min-height: 52px; }
.row-value { display: flex; align-items: baseline; gap: 8px; font-weight: 600; text-align: right; }
.row-value .status { font-size: 15px; }
.won-count { color: var(--good); }

/* Month table */
.table-card { padding: 6px 22px 8px; overflow-x: auto; }
.months-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 17px; }
.months-table th { color: var(--label2); font-size: 13px; font-weight: 600; text-align: right; padding: 12px 0; }
.months-table th:first-child, .months-table td:first-child { text-align: left; }
.months-table td { text-align: right; padding: 15px 0; }
.months-table tbody tr { box-shadow: inset 0 1px 0 var(--sep); }
.months-table tr.total { font-weight: 600; }
.months-list { display: none; padding: 0 18px; }
.months-list .row { min-height: 56px; }
.months-list .sum { font-size: 15px; color: var(--label2); text-align: right; }
.months-list .sum b { color: var(--label); }
.months-list .row.total { font-weight: 600; }

/* Newest leads */
.leads-head { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 4px 0; gap: 12px; }
.leads-head .section-title { margin: 0; }
.leads-count { font-size: 17px; color: var(--label2); }
.leads { padding: 0 22px; }
.lead { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.lead + .lead { box-shadow: inset 0 1px 0 var(--sep); }
.lead-name { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-date { margin-left: auto; font-size: 15px; color: var(--label2); white-space: nowrap; }
.chip {
  font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-fg); white-space: nowrap;
}
.chip.strong { background: var(--chip-strong-bg); color: var(--chip-strong-fg); }
.empty-row { min-height: 56px; display: flex; align-items: center; color: var(--label2); font-size: 17px; }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--label2); padding: 14px 4px 0;
}

/* Loading and error */
.state-card {
  max-width: 560px; margin: 12vh auto 0; background: var(--card); border-radius: 26px;
  padding: 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.state-card h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.state-card p { font-size: 17px; color: var(--label2); line-height: 23px; }
.state-card .btn-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.state-glyph {
  width: 52px; height: 52px; border-radius: 999px; background: var(--inset);
  display: flex; align-items: center; justify-content: center; color: var(--label);
}
.skeleton { display: flex; flex-direction: column; gap: 14px; }
.sk { background: var(--card); border-radius: 26px; animation: pulse 1.6s ease-in-out infinite; }
.sk.hero-sk { height: 280px; border-radius: 34px; background: var(--hero-bg); }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.sk-row .sk { height: 156px; }
.sk.wide { height: 260px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Phone tab bar */
.tabbar { display: none; }

/* ---------- Phone layout ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .page { padding-bottom: 120px; }

  /* Brand + account row scrolls away; the glass month picker stays pinned. */
  .toolbar {
    top: -58px;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 8px;
    padding: 10px 0 0;
  }
  .brand, .actions {
    background: transparent !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .brand { grid-row: 1; grid-column: 1; padding: 0; min-height: 48px; }
  .actions { grid-row: 1; grid-column: 2; padding: 0; }
  .icon-btn { width: 44px; height: 44px; }
  .seg {
    grid-row: 2; grid-column: 1 / -1; min-width: 0;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    margin-top: 2px;
  }
  .seg-btn { min-height: 44px; padding: 0 6px; }
  .seg.many .seg-btn .full { display: none; }
  .seg.many .seg-btn .short { display: inline; }
  .seg-more select { min-height: 44px; width: 100%; max-width: none; padding: 0 24px 0 10px; }
  .seg-more svg { right: 8px; }

  .content { padding-top: 12px; gap: 12px; }

  .hero { border-radius: 30px; padding: 20px 20px 22px; min-height: 0; flex-direction: column; align-items: stretch; gap: 4px; }
  .liquid.in-hero { filter: blur(40px); }
  .hero .liquid-grid { background-size: 48px 48px; }
  .hero-text { flex: none; gap: 4px; }
  .logo-slot { order: -1; flex: none; height: 96px; border-radius: 22px; margin: 0 0 10px; font-size: 13px; }
  .hero h1 { font-size: 34px; line-height: 41px; letter-spacing: -0.01em; }
  .hero-summary { font-size: 17px; line-height: 23px; }

  .section-title { margin: 6px 4px 0; }
  .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { min-height: 0; border-radius: 22px; padding: 16px; gap: 2px; }
  .stat .stat-value { font-size: 32px; line-height: 40px; }
  .stat .stat-foot { font-size: 13px; margin-top: 0; }
  .stat-roas { display: none; }
  .stat-cash { grid-column: 1 / -1; border-radius: 26px; padding: 18px 20px; }
  .stat-cash .stat-value { font-size: 48px; line-height: 56px; }
  .stat-cash .stat-foot { font-size: 15px; }
  .stat-cash .phone-roas { display: inline-flex; }

  .split { flex-direction: column; gap: 12px; padding-top: 0; }
  .split .section-title { margin: 10px 4px 0; }
  .split-main, .split-side { flex: none; gap: 12px; }
  .split-side .section-title + .card + .section-title { margin-top: 10px; }

  .chart-card { padding: 18px 20px; gap: 12px; }
  .sel-day, .chart-hint { display: none; }
  .sel-line { display: block; }
  .bars, .bar-labels { gap: 5px; min-width: 0; grid-template-columns: repeat(var(--n, 11), minmax(0, 1fr)); }
  .chart-card.dense .bars { min-width: calc(var(--n) * 19px); grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); }
  .bars { height: 120px; background-size: 100% 30px; }
  .bar, .bar i { border-radius: 7px 7px 3px 3px; }
  .bar.zero i { border-radius: 5px; }
  .bar-labels { display: none; }
  .bar-ends { display: flex; }

  .list { padding: 0 18px; }
  .row { min-height: 52px; }
  .table-card { display: none; }
  .months-list { display: block; }
  .leads { padding: 0 18px; }
  .leads-head { margin: 10px 4px 0; }

  .tabbar {
    position: fixed; z-index: 10; left: 22px; right: 22px;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    border-radius: 999px; padding: 5px;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  }
  .tab {
    text-decoration: none; min-height: 54px; border-radius: 999px; color: var(--seg-off);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 11px; font-weight: 600;
  }
  .tab[aria-current="true"] { background: var(--seg-on); color: var(--seg-on-text); }
  .tab:hover { opacity: 1; }

  .state-card { margin-top: 6vh; }
  .sk.hero-sk { height: 240px; border-radius: 30px; }
  .sk-row { grid-template-columns: 1fr 1fr; }
  .sk-row .sk { height: 110px; }
}

@media (max-width: 360px) {
  .seg-btn { font-size: 14px; }
  .hero h1 { font-size: 30px; line-height: 36px; }
}

/* ======================================================================
   SIGN IN / JOIN
   ====================================================================== */
.auth-page {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh;
  padding: 48px 16px; background: var(--hero-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
}
.auth-page .liquid { filter: blur(90px); }
.auth-page .liquid-grid { background-size: 80px 80px; }
.auth-badge {
  position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 18px;
  background: var(--prominent-bg); color: var(--prominent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; letter-spacing: -0.03em; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  border-radius: 34px; padding: 30px;
  background: var(--auth-glass-bg);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  box-shadow: var(--auth-glass-shadow);
  display: flex; flex-direction: column; gap: 18px;
}
.auth-step { display: flex; flex-direction: column; gap: 18px; }
.auth-head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.auth-head h1 { font-size: 28px; line-height: 34px; font-weight: 700; }
.auth-head p { font-size: 17px; line-height: 23px; color: var(--label2); overflow-wrap: anywhere; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--label2); }
.field span { padding-left: 6px; }
.field input {
  font-size: 17px; color: var(--label); background: var(--field);
  border: 0; border-radius: 16px; padding: 0 16px; min-height: 52px; width: 100%;
}
.field input::placeholder { color: var(--label2); opacity: 0.8; }
.field input.code {
  font-family: var(--font-round); font-size: 26px; font-weight: 700; letter-spacing: 0.32em;
  text-align: center; padding-left: calc(16px + 0.32em);
}
.auth-fine { font-size: 13px; line-height: 18px; color: var(--label2); text-align: center; }
.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: -8px; }
.auth-foot { position: relative; z-index: 1; font-size: 13px; color: var(--label2); }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bad-tint); color: var(--label); border-radius: 16px; padding: 12px 14px;
  font-size: 15px; line-height: 20px;
}
.alert svg { color: var(--bad); flex: none; margin-top: 1px; }
.notice {
  background: var(--field); color: var(--label); border-radius: 16px; padding: 12px 14px;
  font-size: 15px; line-height: 20px; text-align: center;
}
.done-glyph {
  width: 56px; height: 56px; margin: 0 auto; border-radius: 999px;
  background: var(--prominent-bg); color: var(--prominent-fg);
  display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite; display: inline-block;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .sk { animation: none; }
}

/* ---------- Additions ---------- */
a.btn-prominent { text-decoration: none; }
a.btn-prominent:hover { opacity: 0.9; }
.dash { display: flex; flex-direction: column; gap: 14px; }
[data-tab], .section-title { scroll-margin-top: 84px; }
.bar.zero i { height: 6px; }
@media (max-width: 640px) {
  .dash { gap: 12px; }
  .bar.zero i { height: 5px; }
}
