/* 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.30);
  --auth-glass-sheen: linear-gradient(140deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0) 62%, rgba(255,255,255,0.35) 100%);
  --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(255,255,255,0.07);
    --auth-glass-sheen: linear-gradient(140deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.04) 38%, rgba(255,255,255,0) 60%, rgba(255,255,255,0.08) 100%);
    --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, textarea { 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 max(var(--gutter), env(safe-area-inset-right, 0px)) calc(72px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
}

/* Toolbar */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  max-width: 1180px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 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: calc(120px + env(safe-area-inset-bottom, 0px)); }

  /* 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: calc(10px + env(safe-area-inset-top, 0px)) 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: calc(48px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  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-sheen), var(--auth-glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.04);
  backdrop-filter: blur(16px) saturate(190%) brightness(1.04);
  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; }

.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; }
}

/* ======================================================================
   LEADS PAGE (#leads)
   ====================================================================== */

/* Page links inside the brand capsule (desktop). Phone uses the tab bar. */
.brand.has-nav { padding: 4px; gap: 6px; }
.brand.has-nav .gc-badge { margin-left: 2px; }
.brand.has-nav .brand-name { display: none; }
.nav-seg { display: flex; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-size: 15px; font-weight: 500; color: var(--seg-off);
}
.nav-link:hover { opacity: 1; color: var(--label); }
.nav-link[aria-current="page"] {
  font-weight: 600; background: var(--seg-on); color: var(--seg-on-text); box-shadow: var(--seg-on-shadow);
}

.leads-view { display: flex; flex-direction: column; gap: 14px; }
.page-head { display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 0; }
.page-head h1 { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -0.01em; }
.page-sub { font-size: 17px; color: var(--label2); }
.leads-ready { display: flex; flex-direction: column; gap: 14px; }

.leads-controls { display: flex; flex-direction: column; gap: 12px; }
.search {
  display: flex; align-items: center; gap: 8px; max-width: 520px;
  background: var(--card); border-radius: 14px; padding: 0 14px; min-height: 48px; color: var(--label2);
}
.search:focus-within { outline: 2px solid var(--label); outline-offset: 2px; }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--label);
  font-size: 17px; min-height: 48px; padding: 0;
}
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--label2); opacity: 1; }

.stage-filter {
  position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px; margin: -3px -2px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.stage-filter::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--card); color: var(--label); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.filter-chip .count { font-weight: 500; color: var(--label2); }
.filter-chip[aria-pressed="true"] { background: var(--prominent-bg); color: var(--prominent-fg); }
.filter-chip[aria-pressed="true"] .count { color: inherit; opacity: 0.75; }

.lead-list { overflow: hidden; }
.lead-row { position: relative; display: flex; align-items: stretch; }
.lead-row + .lead-row::before {
  content: ''; position: absolute; left: 20px; right: 0; top: 0; height: 1px; background: var(--sep);
}
.lead-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 8px 12px 8px 20px; border: 0; background: transparent;
  color: inherit; text-align: left;
}
.lead-open:hover, .lead-call:hover { background: var(--inset); opacity: 1; }
.lead-open:focus-visible, .lead-call:focus-visible { outline-offset: -3px; border-radius: 14px; }
.lead-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lead-row .lead-name { font-size: 17px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-meta { font-size: 15px; line-height: 20px; color: var(--label2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-open .chip { flex: none; }
.lead-call {
  flex: none; width: 200px; display: flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 20px 0 12px; color: var(--label); text-decoration: none;
}
.lead-call .num { font-size: 15px; color: var(--label2); white-space: nowrap; }
.lead-call.none { pointer-events: none; }

.chip.good, .chip.bad {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; box-shadow: inset 0 0 0 1.5px currentColor;
}
.chip.good { color: var(--good); }
.chip.bad { color: var(--bad); }

.lead-empty { padding: 28px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lead-empty p { font-size: 17px; color: var(--label2); }

.lead-skeleton { display: flex; flex-direction: column; gap: 14px; }
.sk.sk-search { height: 48px; border-radius: 14px; max-width: 520px; }
.sk.sk-list { height: 420px; }

/* ---------- Lead sheet (solid, never glass) ---------- */
html.sheet-open { overflow: hidden; }
dialog.sheet {
  padding: 0; border: 0; color: var(--label); background: var(--card);
  width: min(560px, calc(100% - 40px)); max-width: none;
  max-height: min(88vh, 920px); border-radius: 34px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--sep), 0 30px 80px rgba(0,0,0,0.35);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.22s ease-out; }
dialog.sheet::backdrop { background: rgba(0,0,0,0.45); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }

.sheet-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-head { flex: none; padding: 24px 24px 12px; }
.sheet-head h2 { font-size: 22px; line-height: 28px; font-weight: 700; overflow-wrap: anywhere; }
.sheet-head h2:focus { outline: none; }
.sheet-sub { font-size: 15px; color: var(--label2); margin-top: 2px; }
.grabber { display: none; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 18px; }
.sheet-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.quick-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.quick {
  min-height: 56px; border: 0; border-radius: 18px; background: var(--inset); color: var(--label);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px;
}
.quick:hover { opacity: 0.85; }
.quick:disabled { opacity: 0.5; cursor: default; }

.helper { font-size: 13px; line-height: 18px; color: var(--label2); padding: 0 6px; }
.helper:empty { display: none; }
.helper.strong { color: var(--label); font-weight: 600; }
.group-title { margin: 12px 6px 0; font-size: 15px; font-weight: 600; color: var(--label2); }
.group-title label { cursor: default; }
.group { background: var(--inset); border-radius: 18px; padding: 0 16px; }
.frow { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; }
.frow + .frow { box-shadow: inset 0 1px 0 var(--sep); }
.frow-label { font-size: 17px; }

.select-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.select-wrap select {
  -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: var(--label);
  font-size: 17px; text-align: right; text-align-last: right; min-height: 44px; padding: 0 22px 0 8px;
  max-width: 220px; cursor: pointer;
}
.select-wrap svg { position: absolute; right: 4px; pointer-events: none; color: var(--label2); }

.stepper { display: flex; align-items: center; gap: 6px; }
.step-btn {
  width: 44px; height: 44px; border: 0; border-radius: 999px; padding: 0;
  background: var(--chip-bg); color: var(--label); display: flex; align-items: center; justify-content: center;
}
.step-btn:disabled { opacity: 0.4; cursor: default; }
.step-val { min-width: 34px; text-align: center; font-family: var(--font-round); font-size: 20px; font-weight: 700; }

.money {
  display: flex; align-items: center; gap: 2px; background: var(--field); border-radius: 12px;
  padding: 0 12px; min-height: 44px; color: var(--label2); font-size: 17px;
}
.money:focus-within { outline: 2px solid var(--label); outline-offset: 1px; }
.money input {
  width: 110px; border: 0; background: transparent; color: var(--label); font-size: 17px;
  text-align: right; min-height: 44px; padding: 0;
}
.money input:focus-visible { outline: none; }
.group textarea {
  display: block; width: 100%; border: 0; background: transparent; color: var(--label);
  font-size: 17px; line-height: 1.4; min-height: 120px; padding: 14px 0; resize: vertical;
}
.group textarea::placeholder, .money input::placeholder { color: var(--label2); opacity: 1; }
.group textarea:focus-visible { outline: none; }
.group:focus-within:has(textarea) { outline: 2px solid var(--label); outline-offset: 2px; }

.drow { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; font-size: 17px; }
.drow + .drow { box-shadow: inset 0 1px 0 var(--sep); }
.drow-label { flex: none; }
.drow-value { color: var(--label2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.drow-value.link { color: var(--label); display: inline-flex; align-items: center; min-height: 44px; }
.drow.block { flex-direction: column; align-items: stretch; gap: 6px; padding: 14px 0; }
.answers { margin: 0; font-size: 15px; line-height: 21px; color: var(--label2); white-space: pre-wrap; overflow-wrap: anywhere; }

.sheet-foot {
  flex: none; display: flex; flex-direction: column; gap: 10px; background: var(--card);
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: inset 0 1px 0 var(--sep);
}
.saving-note { font-size: 13px; color: var(--label2); text-align: center; }
.saving-note:empty { display: none; }
.sheet-buttons { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 10px; }
.btn-secondary {
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--chip-bg); color: var(--label); font-size: 17px; font-weight: 600;
}
.btn-secondary:disabled { opacity: 0.5; cursor: default; }
.sheet-buttons .btn-prominent { min-width: 120px; }
.alert-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.alert-action { padding: 0; color: var(--label); text-decoration: underline; font-size: 15px; }

.toast {
  position: fixed; z-index: 40; left: 50%; bottom: 28px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--prominent-bg); color: var(--prominent-fg);
  font-size: 15px; font-weight: 600; text-align: center; box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

@media (max-width: 640px) {
  .brand.has-nav { padding: 0; gap: 10px; }
  .brand.has-nav .brand-name { display: inline; }
  .nav-seg { display: none; }

  .leads-view, .leads-ready { gap: 12px; }
  .page-head { padding-top: 2px; }
  .search { max-width: none; }
  .lead-open {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 1px;
    padding: 6px 4px 6px 18px; align-content: center; min-height: 56px;
  }
  .lead-row .lead-name { line-height: 21px; }
  .lead-meta { line-height: 19px; }
  #reason-row { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
  #reason-row .select-wrap select { max-width: none; width: 100%; text-align: left; text-align-last: left; padding-left: 0; }
  .lead-open .lead-main { display: contents; }
  .lead-open .lead-name { grid-row: 1; grid-column: 1; }
  .lead-open .chip { grid-row: 1; grid-column: 2; justify-self: end; }
  .lead-open .lead-meta { grid-row: 2; grid-column: 1 / -1; }
  .lead-row + .lead-row::before { left: 18px; }
  .lead-call { width: 52px; justify-content: center; padding: 0 14px 0 4px; }
  .lead-call .num { display: none; }

  dialog.sheet {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: calc(100dvh - 12px);
    border-radius: 34px 34px 0 0;
  }
  dialog.sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
  .grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--sep); margin: 0 auto 12px; }
  .sheet-head { padding: 8px 20px 10px; }
  .sheet-body { padding: 4px 16px 16px; }
  .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-buttons { grid-template-columns: 1fr 1fr; }
  .money input { width: 92px; }
  .select-wrap select { max-width: 180px; }

  .toast { bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
}
a.leads-count { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
a.leads-count:hover { color: var(--label); opacity: 1; }

/* ======================================================================
   FACE ID (passkeys) + HOME SCREEN APP
   ====================================================================== */
.pk-signin { display: flex; flex-direction: column; gap: 12px; }
.or-divider { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--label2); }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--sep); }
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.pk-signin .auth-fine { margin-top: -4px; }

.menu-pk { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; box-shadow: inset 0 1px 0 var(--sep); }
.menu-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.menu-state { font-weight: 500; color: var(--label2); }
.menu-pk .btn-secondary { min-height: 44px; font-size: 15px; }
.menu-note { font-size: 13px; line-height: 18px; color: var(--label2); }
.menu-note:empty { display: none; }

/* Installed to the home screen: the status bar is translucent, so keep a
   solid strip under it and let nothing scroll beneath the clock. */
@media (display-mode: standalone) {
  body::before {
    content: ''; position: fixed; z-index: 30; top: 0; left: 0; right: 0;
    height: env(safe-area-inset-top, 0px); background: var(--page-base); pointer-events: none;
  }
  body[data-page="login"]::before, body[data-page="join"]::before { display: none; }
}

/* Gone Creative wordmark (replaces the GC tile) */
.auth-logo { position: relative; z-index: 1; display: block; width: 118px; margin-bottom: 22px; }
.auth-logo img { display: block; width: 100%; height: auto; }
.gc-logo { display: flex; align-items: center; justify-content: center; flex: none; height: 32px; padding: 0 12px; }
.gc-logo img { display: block; width: 50px; height: auto; }

/* ======================================================================
   ALL CLIENTS (#clients, staff only)
   ====================================================================== */
.back-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--label); background: var(--chip-bg);
}
.back-link:hover { opacity: 1; background: var(--seg-on); }

.clients-view, .clients-ready { display: flex; flex-direction: column; gap: 14px; }
.agency-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 22px; gap: 12px; }
.sum-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sum-cell + .sum-cell { box-shadow: inset 1px 0 0 var(--sep); padding-left: 16px; }
.sum-label { font-size: 15px; font-weight: 600; color: var(--label2); }
.sum-value { font-family: var(--font-round); font-size: 34px; line-height: 41px; font-weight: 700; overflow-wrap: anywhere; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cc-item { display: flex; min-width: 0; }
.client-card {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px; color: inherit; text-decoration: none;
}
.client-card:hover { opacity: 1; box-shadow: inset 0 0 0 1px var(--sep); }
.client-card:focus-visible { outline-offset: 3px; border-radius: 26px; }
.cc-head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.cc-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; background: var(--inset); flex: none; }
.cc-name { flex: 1; min-width: 0; font-size: 20px; line-height: 25px; font-weight: 700; overflow-wrap: anywhere; }
.cc-chevron { flex: none; color: var(--label2); }
.cc-note { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--label); }
.cc-note svg { color: var(--label2); flex: none; }
.cc-note.quiet { color: var(--label2); font-weight: 500; }
.cc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
.cc-metric { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cc-label { font-size: 13px; font-weight: 600; color: var(--label2); }
.cc-value { font-family: var(--font-round); font-size: 24px; line-height: 30px; font-weight: 700; overflow-wrap: anywhere; }
.cc-status { font-size: 13px; line-height: 18px; }
.cc-total { font-size: 13px; line-height: 18px; color: var(--label2); padding-top: 12px; box-shadow: inset 0 1px 0 var(--sep); }
.sk.sk-summary { height: 96px; }
.sk.sk-card { height: 250px; }

@media (max-width: 640px) {
  .brand.has-back .brand-name { display: none; }
  .back-link { min-height: 44px; }
  .clients-view, .clients-ready { gap: 12px; }
  .agency-summary { padding: 16px; gap: 8px; }
  .sum-cell + .sum-cell { padding-left: 10px; }
  .sum-label { font-size: 13px; }
  .sum-value { font-size: 22px; line-height: 28px; }
  .client-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .client-card { padding: 18px; }
  .cc-value { font-size: 22px; line-height: 28px; }
}

/* ---------- All Clients: KPIs, Needs Attention, trends ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi-label { font-size: 15px; font-weight: 600; color: var(--label2); }
.kpi-value { font-family: var(--font-round); font-size: 34px; line-height: 41px; font-weight: 700; overflow-wrap: anywhere; }
.kpi .status { font-size: 15px; }
.kpi-extra { font-size: 13px; line-height: 18px; color: var(--label2); }
.kpi-note { font-size: 13px; line-height: 18px; color: var(--label2); padding: 0 4px; margin-top: -4px; }
.kpi-note:empty { display: none; }
.sk.sk-kpi { height: 140px; }

.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--label2); }
.trend svg { flex: none; }
.trend.small { font-size: 13px; }

.att-list { overflow: hidden; }
.att-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px;
  padding: 9px 16px 9px 18px; color: inherit; text-decoration: none;
}
.att-row + .att-row::before { content: ''; position: absolute; left: 58px; right: 0; top: 0; height: 1px; background: var(--sep); }
a.att-row:hover { opacity: 1; background: var(--inset); }
a.att-row:focus-visible { outline-offset: -3px; border-radius: 14px; }
.att-glyph {
  flex: none; width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.att-row.bad .att-glyph, .att-row.bad .att-text { color: var(--bad); }
.att-row.watch .att-glyph, .att-row.watch .att-text { color: var(--watch); }
.att-glyph.good { color: var(--good); }
.att-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.att-name { font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.att-text { font-size: 15px; line-height: 20px; font-weight: 600; }
.att-calm { font-size: 17px; color: var(--label); }

.cc-metric .trend { margin-top: 1px; }
.cc-rate {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 15px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--sep);
}
.cc-rate-label { color: var(--label2); font-weight: 600; }
.cc-rate-value { display: inline-flex; align-items: center; gap: 10px; }
.cc-rate-value strong { font-family: var(--font-round); font-size: 17px; }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .kpi-grid { gap: 12px; }
  .kpi { padding: 14px 16px; }
  .kpi-label { font-size: 13px; }
  .kpi-value { font-size: 26px; line-height: 32px; }
  .kpi .status { font-size: 13px; }
  .att-row { padding: 9px 12px 9px 16px; }
  .att-row + .att-row::before { left: 56px; }
}

/* Client cards: every row lines up across cards. Metric cells reserve room
   for a two line trend, and the Lead to Booked + All time rows sit at the bottom. */
.cc-metric { min-height: 86px; }
.cc-rate { margin-top: auto; }
.cc-metrics + .cc-total { margin-top: auto; }
.cc-total { min-height: 48px; }
