/* SOA.PLUS — SoldOutAfrica's design system applied to link analytics.
 *
 * Tokens lifted verbatim from marketplace/app/globals.css and web-dashboard/app/globals.css:
 * MontserratAlt1, a strictly monochrome base, violet #8b5cf6 as the single accent, and an
 * inverted dark scheme. HSL channels are kept as separate vars exactly like the source, so
 * the dark override is one block and translucency uses hsl(var(--x) / alpha).
 *
 * The TTFs in those apps are ~280KB each; these are the same faces converted to woff2
 * (~69KB) and cut to the four weights this UI actually sets.
 */

@font-face {
  font-family: "MontserratAlt1";
  src: url("/static/fonts/MontserratAlt1-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MontserratAlt1";
  src: url("/static/fonts/MontserratAlt1-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MontserratAlt1";
  src: url("/static/fonts/MontserratAlt1-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "MontserratAlt1";
  src: url("/static/fonts/MontserratAlt1-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 0%;
  --card: 0 0% 100%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --border: 0 0% 89.8%;
  --accent: 258 90% 66%;        /* #8b5cf6 */
  --accent-strong: 263 70% 55%; /* #7c3aed */
  --success: 160 94% 30%;       /* #059669 */
  --warning: 38 92% 50%;        /* #f59e0b */
  --destructive: 0 84.2% 60.2%;

  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --font: "MontserratAlt1", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .06), 0 1px 2px 0 rgb(0 0 0 / .04);
  --shadow: 0 4px 16px -4px rgb(0 0 0 / .10);
  --shadow-accent: 0 8px 30px -8px hsl(var(--accent) / .45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: 0 0% 0%;
    --foreground: 0 0% 100%;
    --card: 0 0% 0%;
    --muted: 0 0% 14.9%;
    --muted-foreground: 0 0% 63.9%;
    --border: 0 0% 14.9%;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .5);
    --shadow: 0 4px 16px -4px rgb(0 0 0 / .6);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font);
  font-weight: 400;
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 2px;
  border-radius: 4px;
}

/* Micro-labels: the uppercase tracked caption used throughout the SOA dashboard. */
.label, .eyebrow, .count {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.eyebrow { color: hsl(var(--accent)); }

/* Big figures: the foreground → foreground/70 gradient SOA uses for headline numbers. */
.figure {
  font-weight: 700;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, hsl(var(--foreground)), hsl(var(--foreground) / .7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rule { width: 18px; height: 2px; border-radius: 2px; background: hsl(var(--accent)); }

@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: hsl(var(--success));
  box-shadow: 0 0 0 3px hsl(var(--success) / .15);
  animation: livepulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  * { transition: none !important; }
}

.shell { max-width: 1400px; margin: 0 auto; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- masthead ---------- */

.masthead {
  position: relative;
  background: hsl(var(--background));
  border-bottom: 1px solid hsl(var(--border));
  overflow: hidden;
}
/* Ambient violet wash — the one atmospheric device SOA uses on its own hero screens. */
.masthead::before {
  content: "";
  position: absolute; top: -280px; right: 4%;
  width: 520px; height: 520px; border-radius: 50%;
  background: hsl(var(--accent) / .16);
  filter: blur(120px);
  pointer-events: none;
}

.topbar {
  position: relative; padding: 0 40px; height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: baseline; gap: 1px;
  font-weight: 700; font-size: 19px; letter-spacing: -.02em;
  color: hsl(var(--foreground));
}
.brand .dot { color: hsl(var(--accent)); }

.nav { display: flex; gap: 28px; font-size: 12px; font-weight: 500; }
.nav a { color: hsl(var(--muted-foreground)); padding: 4px 0; transition: color .2s; }
.nav a:hover { color: hsl(var(--foreground)); }
.nav a.on { color: hsl(var(--foreground)); font-weight: 600; box-shadow: inset 0 -2px 0 hsl(var(--accent)); }

.live {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em;
  color: hsl(var(--muted-foreground));
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: hsl(var(--foreground)); color: hsl(var(--background));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; letter-spacing: .02em;
}

.hero { position: relative; padding: 40px 40px 44px; }
.hero h1 {
  margin: 0 0 8px;
  font-weight: 700; font-size: 40px; line-height: 1.08; letter-spacing: -.035em;
  max-width: 18ch;
}
.hero .sub {
  margin: 0 0 28px;
  font-size: 15px; color: hsl(var(--muted-foreground)); max-width: 52ch;
}

/* ---------- shorten form ---------- */

.shorten { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.field {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: hsl(var(--accent)); box-shadow: 0 0 0 3px hsl(var(--accent) / .12); }
.field.grow { flex: 1 1 380px; min-width: 0; }
.field svg { color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.field input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: hsl(var(--foreground)); font-family: inherit; font-size: 14px; font-weight: 400;
}
.field input::placeholder { color: hsl(var(--muted-foreground)); }
.field .prefix {
  font-size: 13px; font-weight: 500; white-space: nowrap;
  color: hsl(var(--muted-foreground));
}
.field.slug input { width: 116px; flex: 0 0 auto; }
.field.tag input { width: 78px; flex: 0 0 auto; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius-lg);
  background: hsl(var(--accent)); color: #fff;
  font-family: inherit; font-weight: 600; font-size: 13px; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.btn:hover { background: hsl(var(--accent-strong)); box-shadow: var(--shadow-accent); }
.btn:active { transform: translateY(1px); }

.btn.sm { height: 38px; padding: 0 16px; font-size: 12px; }

/* Neutral secondary — SOA's outline button on the monochrome scale. */
.btn.outline, .btn.ghost, .btn.pill {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn.outline:hover, .btn.ghost:hover, .btn.pill:hover {
  background: hsl(var(--muted)); box-shadow: none; border-color: hsl(var(--foreground) / .25);
}
.btn.pill { border-radius: 999px; height: 34px; padding: 0 14px; font-size: 12px; }
.btn.outline { height: 38px; padding: 0 16px; font-size: 12px; }

/* The hero card is painted with the foreground colour, so its own contents must be tinted
   with --background, not with literal white. In dark mode that card is white, and hardcoded
   white buttons would vanish into it. */
.hero-link .btn.ghost, .hero-link .btn.pill {
  background: hsl(var(--background) / .12);
  color: hsl(var(--background));
  border-color: hsl(var(--background) / .25);
}
.hero-link .btn.ghost:hover, .hero-link .btn.pill:hover {
  background: hsl(var(--background) / .22); border-color: hsl(var(--background) / .45);
}

/* ---------- flash ---------- */

.flash {
  margin: 16px 40px 0; padding: 12px 16px; border-radius: var(--radius-lg);
  font-size: 13px; border: 1px solid;
}
.flash.error {
  background: hsl(var(--destructive) / .08);
  border-color: hsl(var(--destructive) / .3);
  color: hsl(var(--destructive));
}
.flash.ok {
  background: hsl(var(--success) / .08);
  border-color: hsl(var(--success) / .3);
  color: hsl(var(--success));
}

/* ---------- page grid ---------- */

.page {
  padding: 28px 40px 72px;
  display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start;
}
/* Grid items default to min-width:auto, so one long unbreakable string (a user agent, a
   destination URL) can push a 1fr track wider than its container and scroll the whole page
   sideways. Every truncating cell needs this for its ellipsis to actually engage. */
.page > *, .stream-row > span, .geo-row > *, .source-row > * { min-width: 0; }

/* ---------- panels ---------- */

.panel, .sidebar, .stream, .breakdown {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
}
.panel { padding: 24px 26px; }
.panel.tight { padding: 22px 24px; }
.panel h3, .sidebar h2, .stream-head h3, .breakdown h3 {
  margin: 0; font-weight: 600; letter-spacing: -.02em;
}
.panel h3 { font-size: 17px; }
.panel.tight h3, .stream-head h3, .sidebar h2 { font-size: 15px; }
.breakdown h3 { font-size: 14px; }
.panel-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}

/* ---------- sidebar ---------- */

.sidebar { padding: 20px; position: sticky; top: 20px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-card {
  display: block; padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  transition: border-color .2s, background .2s;
}
.link-card:hover { border-color: hsl(var(--foreground) / .3); background: hsl(var(--muted) / .5); }
.link-card.on { border-color: hsl(var(--accent)); background: hsl(var(--accent) / .05); }
.link-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.link-card .slug { font-weight: 600; font-size: 13px; letter-spacing: -.01em; }
.link-card .dest { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.link-card .clicks { display: flex; align-items: baseline; gap: 6px; margin-top: 10px; }
.link-card .clicks b { font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.link-card .clicks span { font-size: 10px; font-weight: 500; color: hsl(var(--muted-foreground)); }

.tag {
  flex-shrink: 0; padding: 3px 8px; border-radius: 6px;
  font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: hsl(var(--muted)); color: hsl(var(--muted-foreground));
}
.link-card.on .tag { background: hsl(var(--accent)); color: #fff; }

.track { height: 3px; background: hsl(var(--muted)); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 999px; background: hsl(var(--accent)); }

.totals { margin-top: 18px; padding-top: 16px; border-top: 1px solid hsl(var(--border)); display: flex; flex-direction: column; gap: 10px; }
.totals .row { display: flex; justify-content: space-between; align-items: baseline; }
.totals .row span { font-size: 12px; color: hsl(var(--muted-foreground)); }
.totals .row b { font-weight: 600; font-size: 15px; letter-spacing: -.02em; }
.totals .row.muted b { color: hsl(var(--muted-foreground)); }

/* ---------- main column ---------- */

.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* The selected link sits on the inverted card — SOA's primary/primary-foreground pair. */
.hero-link {
  position: relative; overflow: hidden;
  background: hsl(var(--foreground)); color: hsl(var(--background));
  border-radius: var(--radius-xl); padding: 26px 28px;
  display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.hero-link::after {
  content: ""; position: absolute; top: -140px; right: 12%;
  width: 320px; height: 320px; border-radius: 50%;
  background: hsl(var(--accent) / .35); filter: blur(90px); pointer-events: none;
}
.hero-link > * { position: relative; }
.hero-link h2 { margin: 0; font-weight: 700; font-size: 26px; letter-spacing: -.03em; }
.hero-link .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hero-link .meta .when { font-size: 11px; color: hsl(var(--background) / .5); }
.hero-link .meta .eyebrow { color: hsl(var(--accent) / 1); }
.hero-link .dest {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: hsl(var(--background) / .6); max-width: 620px;
}
.hero-link .actions { display: flex; align-items: center; gap: 18px; }
.qr { width: 92px; height: 92px; background: #fff; border-radius: var(--radius); padding: 7px; flex-shrink: 0; }
.qr img { width: 100%; height: 100%; display: block; }

/* ---------- stat cards ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  padding: 18px 20px; border-radius: var(--radius-xl);
  border: 1px solid hsl(var(--border)); background: hsl(var(--card));
  transition: border-color .2s, box-shadow .2s;
}
.stat:hover { border-color: hsl(var(--foreground) / .25); box-shadow: var(--shadow-sm); }
.stat.dark {
  background: hsl(var(--accent)); border-color: hsl(var(--accent)); color: #fff;
  box-shadow: var(--shadow-accent);
}
.stat.dark .label { color: hsl(0 0% 100% / .75); }
.stat.dark .note { color: hsl(0 0% 100% / .65); }
.stat.dark .figure { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.stat .value { font-size: 30px; line-height: 1.1; margin-top: 8px; }
.stat .foot { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.stat .note { font-size: 11px; color: hsl(var(--muted-foreground)); }

.delta { font-size: 11px; font-weight: 600; }
.delta.up { color: hsl(var(--success)); }
.delta.down { color: hsl(var(--destructive)); }
.delta.flat { color: hsl(var(--accent)); }
.stat.dark .delta { color: #fff; }

/* ---------- range switch ---------- */

.ranges { display: flex; gap: 4px; padding: 3px; background: hsl(var(--muted)); border-radius: var(--radius-lg); }
.ranges a {
  display: inline-flex; align-items: center; height: 30px; padding: 0 13px;
  border-radius: calc(var(--radius-lg) - 3px);
  font-size: 11px; font-weight: 600; color: hsl(var(--muted-foreground));
  transition: background .2s, color .2s;
}
.ranges a:hover { color: hsl(var(--foreground)); }
.ranges a.on { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: var(--shadow-sm); }

/* ---------- chart ---------- */

.chart {
  display: flex; align-items: flex-end; gap: 3px; height: 200px;
  padding-bottom: 1px; border-bottom: 1px solid hsl(var(--border));
}
.chart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.chart .col > i {
  display: block; width: 100%; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, hsl(var(--accent)), hsl(var(--accent-strong)));
  transition: opacity .2s;
}
.chart .col:hover > i { opacity: .7; }
.axis { display: flex; gap: 3px; margin-top: 8px; }
.axis span {
  flex: 1; text-align: center; min-width: 0;
  font-size: 10px; font-weight: 500; color: hsl(var(--muted-foreground));
  overflow: hidden; white-space: nowrap;
}
.chart-foot {
  display: flex; gap: 28px; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid hsl(var(--border)); flex-wrap: wrap;
}
.chart-foot b { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; letter-spacing: -.01em; }

/* ---------- breakdowns ---------- */

.breakdowns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.breakdown { padding: 20px 22px; transition: border-color .2s; }
.breakdown:hover { border-color: hsl(var(--foreground) / .25); }
.breakdown .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.breakdown .rows { display: flex; flex-direction: column; gap: 12px; }
.bar-row .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; gap: 10px; }
.bar-row .name { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .pct { font-size: 11px; font-weight: 600; color: hsl(var(--muted-foreground)); flex-shrink: 0; }
.bar { height: 5px; background: hsl(var(--muted)); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: hsl(var(--foreground) / .25); }
.bar > i.first { background: hsl(var(--accent)); }
.bar > i.second { background: hsl(var(--foreground) / .55); }

/* ---------- geo + sources ---------- */

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.geo-row { display: grid; grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 1fr) 58px; gap: 12px; align-items: center; }
.geo-row .rank { font-size: 11px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.geo-row .country { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-row .cities { font-size: 10px; color: hsl(var(--muted-foreground)); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-row .num { text-align: right; }
.geo-row .num b { font-size: 12px; font-weight: 600; }
.geo-row .num span { display: block; font-size: 10px; color: hsl(var(--muted-foreground)); }

.source-row { display: flex; align-items: center; gap: 12px; }
.source-row .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.source-row .name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-row .kind { font-size: 10px; color: hsl(var(--muted-foreground)); margin-top: 1px; }

/* ---------- click stream ---------- */

.stream { overflow: hidden; }
.stream-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid hsl(var(--border)); flex-wrap: wrap; gap: 12px;
}
.realtime {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; color: hsl(var(--success));
}
.privacy { font-size: 11px; color: hsl(var(--muted-foreground)); max-width: 52ch; }
.stream-cols, .stream-row {
  display: grid; grid-template-columns: 110px 1.1fr 1fr 1.2fr 1fr 88px; gap: 14px; align-items: center;
}
.stream-cols {
  padding: 10px 24px; background: hsl(var(--muted) / .6);
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.stream-row { padding: 13px 24px; border-bottom: 1px solid hsl(var(--border)); transition: background .2s; }
.stream-row:last-of-type { border-bottom: none; }
.stream-row:hover { background: hsl(var(--muted) / .5); }
.stream-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.stream-row .when { color: hsl(var(--muted-foreground)); font-size: 11px; }
.stream-row .where { font-weight: 600; }

.badge {
  justify-self: end; padding: 3px 9px; border-radius: 999px;
  font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: hsl(var(--accent) / .12); color: hsl(var(--accent-strong));
}
.badge.ret { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge.known { background: hsl(var(--success) / .12); color: hsl(var(--success)); }

.stream-foot {
  padding: 14px 24px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; border-top: 1px solid hsl(var(--border));
}
.stream-foot > span { font-size: 11px; color: hsl(var(--muted-foreground)); }

/* ---------- empty state ---------- */

.empty {
  padding: 64px 32px; text-align: center;
  border: 1px dashed hsl(var(--border)); border-radius: var(--radius-xl);
  background: hsl(var(--muted) / .4);
}
.empty h2 { margin: 0 0 8px; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.empty p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 13px; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid hsl(var(--border)); margin-top: 8px; }
.footer .inner {
  padding: 26px 40px; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer .mark { font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.footer .fine { font-size: 11px; color: hsl(var(--muted-foreground)); }

/* ---------- auth ---------- */

.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth .body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 56px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { margin: 0 0 6px; font-weight: 700; font-size: 26px; letter-spacing: -.03em; }
.auth-card p.sub { margin: 0 0 26px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.auth-card label {
  display: block; font-size: 10px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-bottom: 6px;
}
.auth-card input, .edit-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg);
  background: hsl(var(--card)); color: hsl(var(--foreground));
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-card input:focus, .edit-input:focus {
  border-color: hsl(var(--accent)); box-shadow: 0 0 0 3px hsl(var(--accent) / .12);
}
.auth-card .group { margin-bottom: 16px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-card .alt { margin: 20px 0 0; font-size: 13px; color: hsl(var(--muted-foreground)); text-align: center; }
.auth-card .alt a { color: hsl(var(--accent)); font-weight: 500; }
.auth-card .alt a:hover { color: hsl(var(--accent-strong)); }

/* ---------- 404 ---------- */

.gone {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center;
}
.gone h1 { margin: 0; font-weight: 700; font-size: 64px; letter-spacing: -.05em; }
.gone p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 14px; max-width: 44ch; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split, .breakdowns { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar, .hero, .page, .footer .inner { padding-left: 20px; padding-right: 20px; }
  .flash { margin-left: 20px; margin-right: 20px; }
  .nav { display: none; }
  .hero h1 { font-size: 30px; }
  .stats { grid-template-columns: 1fr; }
  .hero-link { padding: 22px; }
  .hero-link h2 { font-size: 21px; }
  .stream-cols { display: none; }
  .stream-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .stream-row .when { grid-column: 1; }
  .badge { grid-column: 2; grid-row: 1; }
}
