/* GrowViking design system: "Northern lights".
   A deep night canvas lit by a slow aurora (cobalt, violet, cyan: the colours
   of the Pods logo). Glass cards float above it; the CEO Pod is the brightest
   thing on screen. Numbers are set in a mono face so money lines up.
   Dark is the default; [data-theme="light"] gives a bright pearl version.
   Every colour is a token. */
:root {
  --font-display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* brand light */
  --c1: #3446f2;          /* cobalt */
  --c2: #8b5cf6;          /* violet */
  --c3: #22d3ee;          /* cyan */
  --aurora: linear-gradient(120deg, #3446f2 0%, #8b5cf6 52%, #22d3ee 100%);
  --aurora-soft: linear-gradient(120deg, rgba(52, 70, 242, .22), rgba(139, 92, 246, .18) 52%, rgba(34, 211, 238, .16));

  /* night (default) */
  --bg: #05070d;
  --bg-glow-1: rgba(52, 70, 242, .30);
  --bg-glow-2: rgba(139, 92, 246, .22);
  --bg-glow-3: rgba(34, 211, 238, .14);
  --grid-line: rgba(255, 255, 255, .035);
  --surface: rgba(17, 21, 33, .66);
  --surface-solid: #0f131d;
  --surface-2: rgba(255, 255, 255, .035);
  --field: rgba(5, 7, 13, .55);
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --highlight: rgba(255, 255, 255, .06);   /* top edge light on glass */
  --text: #f2f4fa;
  --text-2: #a9b2c6;
  --text-3: #707b92;
  --value: linear-gradient(180deg, #ffffff 30%, #b9c2ff);

  --accent: #7c8bff;
  --accent-strong: #a3adff;
  --accent-soft: rgba(124, 139, 255, .14);
  --on-accent: #ffffff;

  --good: #3ee0a1; --good-soft: rgba(62, 224, 161, .12);
  --warn: #fbbf4a; --warn-soft: rgba(251, 191, 74, .12);
  --bad: #ff7a8a;  --bad-soft: rgba(255, 122, 138, .12);
  --info: #6cc8ff; --info-soft: rgba(108, 200, 255, .12);

  --ink: #070912;         /* sidebar and CEO Pod ground, both themes */
  --ink-2: rgba(255, 255, 255, .045);
  --ink-line: rgba(255, 255, 255, .08);
  --ink-text: #eef1f8;
  --ink-text-2: #8e98ad;

  --chart-a: #7c8bff;
  --chart-b: rgba(255, 255, 255, .14);
  --chart-c: #22d3ee;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: inset 0 1px 0 var(--highlight), 0 1px 0 rgba(0, 0, 0, .4), 0 24px 48px -32px rgba(0, 0, 0, .9);
  --shadow-lg: inset 0 1px 0 var(--highlight), 0 30px 80px -30px rgba(0, 0, 0, .95);
  --glow: 0 0 0 1px rgba(124, 139, 255, .35), 0 10px 40px -10px rgba(99, 102, 241, .65);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-glow-1: rgba(52, 70, 242, .16);
  --bg-glow-2: rgba(139, 92, 246, .13);
  --bg-glow-3: rgba(34, 211, 238, .12);
  --grid-line: rgba(20, 30, 80, .045);
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-2: rgba(20, 30, 80, .035);
  --field: rgba(255, 255, 255, .9);
  --line: rgba(20, 30, 80, .09);
  --line-strong: rgba(20, 30, 80, .16);
  --highlight: rgba(255, 255, 255, .9);
  --text: #0c1020;
  --text-2: #4a5268;
  --text-3: #6d758a;
  --value: linear-gradient(180deg, #0c1020 40%, #2b37b8);
  --accent: #3446f2; --accent-strong: #2433c9; --accent-soft: rgba(52, 70, 242, .09); --on-accent: #ffffff;
  --good: #0a875c; --good-soft: rgba(10, 135, 92, .1);
  --warn: #b25a07; --warn-soft: rgba(178, 90, 7, .1);
  --bad: #d0334a; --bad-soft: rgba(208, 51, 74, .09);
  --info: #2563c9; --info-soft: rgba(37, 99, 201, .09);
  --chart-a: #3446f2; --chart-b: rgba(20, 30, 80, .12); --chart-c: #0891b2;
  --shadow: inset 0 1px 0 var(--highlight), 0 1px 2px rgba(16, 24, 64, .05), 0 18px 40px -28px rgba(30, 40, 120, .35);
  --shadow-lg: inset 0 1px 0 var(--highlight), 0 30px 70px -30px rgba(30, 40, 120, .4);
  --glow: 0 0 0 1px rgba(52, 70, 242, .25), 0 10px 30px -10px rgba(52, 70, 242, .45);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body { font: 15px/1.55 var(--font-body); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; position: relative; min-height: 100vh; }
/* The night sky: slow aurora light, a faint grid, and grain. Fixed behind everything. */
body::before { content: ""; position: fixed; inset: -20vmax; z-index: -2; pointer-events: none; background:
  radial-gradient(38vmax 30vmax at 18% 8%, var(--bg-glow-1), transparent 70%),
  radial-gradient(34vmax 28vmax at 88% 12%, var(--bg-glow-2), transparent 70%),
  radial-gradient(40vmax 30vmax at 70% 100%, var(--bg-glow-3), transparent 70%);
  filter: blur(30px); animation: sky 28s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%); }
@keyframes sky { 50% { transform: translate(3%, 2%) rotate(3deg); } 100% { transform: translate(-3%, 4%) rotate(-2deg) scale(1.06); } }
::selection { background: rgba(124, 139, 255, .35); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
h2 { font-size: 1.12rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 600; }
p { margin: 0; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--aurora); }
.gradient-text, h1 em { font-style: normal; background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; background: linear-gradient(180deg, rgba(7, 9, 18, .82), rgba(7, 9, 18, .92)); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border-right: 1px solid var(--ink-line); color: var(--ink-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.sidebar::after { content: ""; position: absolute; top: 0; right: -1px; width: 1px; height: 40%; background: linear-gradient(180deg, transparent, rgba(124, 139, 255, .6), transparent); pointer-events: none; }
:root[data-theme="light"] .sidebar { background: linear-gradient(180deg, #0b0e1a, #070912); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; color: var(--ink-text); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.brand:hover { color: #fff; }
.brand-mark { position: relative; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--aurora); color: #fff; font-size: 1rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset, 0 0 28px -4px rgba(124, 139, 255, .9); }
img.brand-mark { background: none; box-shadow: none; object-fit: contain; }
.brand-logo { height: 34px; width: auto; max-width: 190px; display: block; }
/* White-text logo on dark grounds (default theme, sidebar); dark-text logo on the light theme's pages. */
.brand-logo.for-light { display: none; }
:root[data-theme="light"] .brand-logo.for-dark { display: none; }
:root[data-theme="light"] .brand-logo.for-light { display: block; }
:root[data-theme="light"] .sidebar .brand-logo.for-dark { display: block; }
:root[data-theme="light"] .sidebar .brand-logo.for-light { display: none; }
.switcher { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--ink-line); color: var(--ink-text); font: inherit; text-align: left; transition: border-color .2s ease, background .2s ease; }
.switcher select { flex: 1; min-width: 0; background: transparent; border: 0; color: inherit; font: inherit; font-weight: 600; padding: 0; margin: 0; appearance: none; cursor: pointer; }
.switcher select option { color: #12151a; }
.avatar-sq { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(52, 70, 242, .5), rgba(139, 92, 246, .45)); font-size: .74rem; font-weight: 700; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.switcher .meta { display: block; font-size: .75rem; color: var(--ink-text-2); font-weight: 400; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #5d6780; padding: 14px 12px 6px; font-weight: 600; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 11px; color: #a7b0c3; font-size: .92rem; font-weight: 500; transition: background .18s ease, color .18s ease; }
.nav a svg { flex: none; opacity: .8; transition: opacity .18s ease, filter .18s ease; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a:hover svg { opacity: 1; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(99, 112, 255, .26), rgba(139, 92, 246, .08) 70%, transparent); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 139, 255, .22); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--aurora); box-shadow: 0 0 14px 2px rgba(124, 139, 255, .8); }
.nav a[aria-current="page"] svg { opacity: 1; color: #c3caff; filter: drop-shadow(0 0 6px rgba(124, 139, 255, .9)); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f59e0b; color: #1a1204; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.nav .soon { margin-left: auto; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #6b7487; border: 1px solid var(--ink-line); padding: 1px 6px; border-radius: 6px; }
.governor { position: relative; margin-top: auto; background: linear-gradient(160deg, rgba(62, 224, 161, .08), rgba(255, 255, 255, .02)); border: 1px solid var(--ink-line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: .78rem; color: var(--ink-text-2); overflow: hidden; }
.governor strong { color: var(--ink-text); font-size: .85rem; }
.governor .bar { background: var(--ink-line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--ink-line); padding-top: 14px; font-size: .85rem; }
.side-user .who { flex: 1; min-width: 0; }
.side-user .who span { display: block; color: var(--ink-text-2); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user button, .side-user a.icon-btn { background: transparent; border: 1px solid var(--ink-line); color: var(--ink-text-2); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; padding: 0; margin: 0; box-shadow: none; }
.side-user button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side-user button::after { display: none; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--aurora); color: #fff; font-weight: 700; font-size: .85rem; box-shadow: 0 0 0 2px rgba(7, 9, 18, 1), 0 0 0 3px rgba(124, 139, 255, .45); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 36px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 280px; max-width: 460px; }
.search input { width: 100%; height: 42px; padding: 0 64px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; font-size: .9rem; margin: 0; }
.search svg { position: absolute; left: 13px; top: 12px; color: var(--text-3); }
.search kbd { position: absolute; right: 10px; top: 10px; font: 600 .72rem var(--font-mono); color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--surface-2); }
.spacer { flex: 1; }
.topbar .menu-btn { display: none; }
.content { padding: 28px 36px 64px; display: flex; flex-direction: column; gap: 24px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.page-head .sub { color: var(--text-2); margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Entrance: page sections rise in, one after another */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.content > *, .public-main > *, .kpis > .kpi, .grid-2 > .col > *, .grid-even > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.content > :nth-child(2), .kpis > .kpi:nth-child(2), .grid-2 > .col > :nth-child(2) { animation-delay: .06s; }
.content > :nth-child(3), .kpis > .kpi:nth-child(3), .grid-2 > .col > :nth-child(3) { animation-delay: .12s; }
.content > :nth-child(4), .kpis > .kpi:nth-child(4), .grid-2 > .col > :nth-child(4) { animation-delay: .18s; }
.content > :nth-child(n+5), .kpis > .kpi:nth-child(n+5) { animation-delay: .24s; }

/* ---------- Buttons, chips, badges ---------- */
.btn, button, a.button { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(135deg, #4152ff, #7b4dff); color: var(--on-accent); font: 600 .9rem var(--font-body); cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, background .2s ease; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px -10px rgba(91, 80, 255, .8); }
.btn::after, button::after, a.button::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); transform: skewX(-20deg); transition: left .6s ease; pointer-events: none; }
.btn:hover::after, button:hover::after, a.button:hover::after { left: 130%; }
.btn:hover, button:hover, a.button:hover { color: var(--on-accent); filter: brightness(1.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 32px -10px rgba(110, 90, 255, .95); }
.btn:active, button:active { transform: translateY(1px) scale(.99); }
.btn.secondary, button.secondary, a.button.secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); box-shadow: inset 0 1px 0 var(--highlight); backdrop-filter: blur(8px); }
.btn.secondary:hover, button.secondary:hover, a.button.secondary:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); color: var(--text); filter: none; box-shadow: inset 0 1px 0 var(--highlight), 0 0 24px -8px rgba(124, 139, 255, .6); }
.btn.ghost, button.ghost { background: transparent; color: var(--text-2); box-shadow: none; }
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--text); box-shadow: none; filter: none; }
.btn.secondary::after, button.secondary::after, .btn.ghost::after, button.ghost::after, button.link::after, .icon-btn::after { display: none; }
button.link { background: none; border: 0; color: var(--accent); padding: 0; min-height: 0; font-weight: 500; box-shadow: none; overflow: visible; }
button.link:hover { box-shadow: none; color: var(--accent-strong); }
button.danger, .btn.danger { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px -10px rgba(244, 63, 94, .8); }
.btn.glow { background: linear-gradient(110deg, #3446f2, #8b5cf6 45%, #22d3ee 90%, #3446f2); background-size: 220% 100%; color: #fff; border: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(124, 139, 255, .4), 0 10px 30px -8px rgba(124, 92, 255, .9); animation: flow 6s linear infinite; }
.btn.glow:hover { color: #fff; filter: brightness(1.12); }
@keyframes flow { to { background-position: -220% 0; } }
.btn.sm, button.sm { min-height: 32px; padding: 0 12px; font-size: .82rem; border-radius: 9px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: 500 .85rem var(--font-body); cursor: pointer; box-shadow: none; }
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); box-shadow: 0 0 20px -6px rgba(124, 139, 255, .7); filter: none; }
.chip::after { display: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .73rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 22%, transparent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.badge.accent { background: var(--accent-soft); color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.sample { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .75rem; font-weight: 650; }

/* ---------- Cards and grids ---------- */
/* Glass cards. A soft light follows the pointer (mm.js sets --mx/--my). */
.card, .kpi, .feature, .tile { --mx: 50%; --my: -100px; }
.card { position: relative; background: var(--surface); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); min-width: 0; transition: border-color .25s ease, box-shadow .25s ease; }
.card::before, .kpi::before, .feature::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(124, 139, 255, .10), transparent 45%); opacity: 0; transition: opacity .3s ease; }
.card:hover::before, .kpi:hover::before, .feature:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-strong); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card.flush .card-head { padding: 20px 24px 0; }
.card-head p { color: var(--text-2); font-size: .85rem; margin-top: 3px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.grid-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* KPI tiles: big glowing numbers */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { position: relative; background: var(--surface); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.kpi::after { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 139, 255, .7), transparent); opacity: .7; }
.kpi:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.kpi .label { font-size: .8rem; color: var(--text-2); font-weight: 500; display: flex; justify-content: space-between; gap: 8px; letter-spacing: .01em; }
.kpi .value { font: 600 1.85rem/1.1 var(--font-mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; background: var(--value); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi .value.error { background: none; color: var(--bad); }
.kpi .value small { font: 500 .8rem var(--font-body); color: var(--text-3); -webkit-text-fill-color: var(--text-3); letter-spacing: 0; margin-left: 4px; }
.kpi .delta { font-size: .78rem; font-weight: 600; }
.kpi .delta.up { color: var(--good); } .kpi .delta.down { color: var(--bad); } .kpi .delta.flat { color: var(--text-3); }
.kpi svg.spark { width: 100%; height: 38px; display: block; margin-top: 2px; overflow: visible; }
.kpi.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(52, 70, 242, .38), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(34, 211, 238, .16), transparent 55%), var(--surface); border-color: rgba(124, 139, 255, .4); box-shadow: var(--shadow), 0 0 40px -14px rgba(99, 102, 241, .8); }
.kpi.hero::after { left: 0; right: 0; height: 2px; background: var(--aurora); opacity: 1; }
:root[data-theme="light"] .kpi.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(52, 70, 242, .14), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(34, 211, 238, .1), transparent 55%), var(--surface); }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--aurora); box-shadow: 0 0 12px rgba(124, 139, 255, .8); }

/* objective strip */
.objective { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.objective .body { flex: 1 1 380px; display: flex; flex-direction: column; gap: 10px; }
.objective .goal { font: 650 1.2rem var(--font-display); letter-spacing: -0.02em; }
.ring { --p: 12; width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c1), var(--c2) calc(var(--p) * .5%), var(--c3) calc(var(--p) * 1%), var(--surface-2) 0); box-shadow: 0 0 30px -8px rgba(124, 139, 255, .8); }
.ring span { width: 70px; height: 70px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; font: 650 1rem var(--font-mono); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data, table.audit { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.audit th { text-align: left; font-size: .7rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.data td, table.audit td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .15s ease; }
table.data tbody tr:hover td, table.audit tbody tr:hover td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
table.data tr:last-child td, table.audit tr:last-child td { border-bottom: 0; }
table.data td.r, table.data th.r { text-align: right; }
table.data .num { white-space: nowrap; }
table.numbers td, table.numbers th { white-space: nowrap; }
.card table.data:first-child th:first-child, .card.flush table.data th:first-child, .card.flush table.data td:first-child { padding-left: 24px; }
.card.flush table.data th:last-child, .card.flush table.data td:last-child { padding-right: 24px; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.cell-title { font-weight: 600; display: block; }
.cell-sub { font-size: .78rem; color: var(--text-3); }
.minibar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; margin-left: 8px; overflow: hidden; border: 1px solid var(--line); }
.minibar span { display: block; height: 100%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.minibar.neg span { background: var(--bad); box-shadow: 0 0 8px var(--bad); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font: 11px var(--font-mono); }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart rect.bar-v { transition: opacity .2s ease, filter .2s ease; transform-box: fill-box; transform-origin: bottom; animation: grow .9s cubic-bezier(.2, .7, .2, 1) both; }
.chart rect.bar-v:hover { filter: brightness(1.25) drop-shadow(0 0 10px rgba(124, 139, 255, .9)); }
.chart polyline.line-draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s .3s ease-out forwards; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 8px currentColor; }

/* ---------- CEO Pod: the brightest place ---------- */
.pod-card { position: relative; overflow: hidden; border-radius: 22px; padding: 24px; background: linear-gradient(160deg, #0b0e1d, #070912); color: var(--ink-text); border: 1px solid rgba(124, 139, 255, .3); isolation: isolate; box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 30px 80px -30px rgba(76, 70, 240, .7); }
.pod-card::before { content: ""; position: absolute; inset: -40%; z-index: -1; background:
  radial-gradient(40% 35% at 20% 15%, rgba(52, 70, 242, .65), transparent 70%),
  radial-gradient(35% 30% at 85% 20%, rgba(139, 92, 246, .55), transparent 70%),
  radial-gradient(40% 35% at 70% 95%, rgba(34, 211, 238, .4), transparent 70%);
  filter: blur(14px); animation: aurora 16s ease-in-out infinite alternate; }
.pod-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, rgba(124, 139, 255, .9) 80%, rgba(34, 211, 238, .9) 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes aurora { to { transform: translate(6%, -4%) rotate(8deg) scale(1.08); } }
.pod-card h2, .pod-card h3 { color: #fff; }
.pod-card p { color: #d6dcea; line-height: 1.65; }
.pod-card .meta { color: var(--ink-text-2); font-size: .78rem; }
.pod-card .btn.secondary { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.pod-card .btn.secondary:hover { background: rgba(255, 255, 255, .16); }
.pod-card .btn.light { background: #fff; color: #0b0e1d; box-shadow: 0 8px 28px -8px rgba(255, 255, 255, .6); }
.pod-card .btn.light::after { background: linear-gradient(100deg, transparent, rgba(124, 139, 255, .35), transparent); }
.pod-orb { position: relative; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--aurora); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 0 26px -2px rgba(124, 139, 255, .9); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 40px 2px rgba(124, 139, 255, .9); } }

/* The Pods visual (logo idea): a glowing CEO pod floating on stacked pods. */
.pods-visual { position: relative; width: 250px; height: 228px; flex: none; }
.pods-visual svg { width: 100%; height: 100%; overflow: visible; }
.pods-visual .pv-top { animation: float 5s ease-in-out infinite; transform-origin: center; }
.pods-visual .pv-halo { animation: halo 5s ease-in-out infinite; transform-origin: 110px 70px; }
.pods-visual .pv-spark { animation: twinkle 3s ease-in-out infinite; }
.pods-visual .pv-spark:nth-of-type(2) { animation-delay: 1s; } .pods-visual .pv-spark:nth-of-type(3) { animation-delay: 2s; }
@keyframes float { 50% { transform: translateY(-7px); } }
@keyframes halo { 50% { opacity: .6; transform: scale(1.12); } }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }

/* Hero banner at the top of the overview and CEO Pod pages */
.hero-banner { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px 34px; border-radius: 26px; border: 1px solid rgba(124, 139, 255, .28); background: linear-gradient(135deg, rgba(14, 18, 38, .9), rgba(8, 10, 20, .85)); box-shadow: var(--shadow-lg), 0 0 80px -40px rgba(99, 102, 241, .9); color: var(--ink-text); }
.hero-banner::before { content: ""; position: absolute; inset: -50%; z-index: -1; background:
  radial-gradient(30% 40% at 78% 40%, rgba(139, 92, 246, .45), transparent 70%),
  radial-gradient(30% 40% at 90% 70%, rgba(34, 211, 238, .3), transparent 70%),
  radial-gradient(35% 45% at 15% 0%, rgba(52, 70, 242, .45), transparent 70%); filter: blur(20px); animation: aurora 18s ease-in-out infinite alternate; }
.hero-banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.hero-banner h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 2.9rem); letter-spacing: -0.04em; margin-top: 10px; }
.hero-banner .sub { color: #aeb7cc; margin-top: 10px; max-width: 560px; }
.hero-banner .eyebrow { color: #9aa6ff; }
.hero-banner .actions { margin-top: 20px; }
.hero-banner .btn.secondary { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .16); }
.hero-banner .btn.secondary:hover { background: rgba(255, 255, 255, .13); }
.hero-banner select { background: rgba(255, 255, 255, .07); color: #fff; border-color: rgba(255, 255, 255, .16); }
.hero-banner select option { color: #12151a; }
.hero-banner .pods-visual { margin: -16px 0 -24px; }
.hero-text { flex: 1 1 360px; min-width: 0; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: #9fe9cb; font-weight: 600; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ee0a1; box-shadow: 0 0 0 0 rgba(62, 224, 161, .7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(62, 224, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 224, 161, 0); } }

/* Decision list */
.decision { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.decision:first-child { border-top: 0; padding-top: 0; }
.sev { width: 4px; align-self: stretch; border-radius: 4px; background: var(--warn); flex: none; box-shadow: 0 0 10px var(--warn); }
.sev.high { background: var(--bad); box-shadow: 0 0 10px var(--bad); } .sev.low { background: var(--good); box-shadow: 0 0 10px var(--good); }
.decision .what { flex: 1; min-width: 0; }
.decision .what strong { display: block; font-weight: 600; font-size: .92rem; }
.decision .what span { font-size: .8rem; color: var(--text-2); }

/* Health list */
.health { display: flex; align-items: center; gap: 12px; font-size: .88rem; padding: 8px 0; }
.health + .health { border-top: 1px solid var(--line); }
.health .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.health .dot.ok { background: var(--good-soft); color: var(--good); box-shadow: 0 0 14px -2px color-mix(in srgb, var(--good) 60%, transparent); }
.health .dot.warn { background: var(--warn-soft); color: var(--warn); }
.health .name { flex: 1; }
.health .val { color: var(--text-3); font-size: .8rem; }

/* Chat */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.chat { display: flex; flex-direction: column; gap: 22px; }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 560px; padding: 12px 16px; border-radius: 18px; line-height: 1.55; }
.msg.me .bubble { background: linear-gradient(135deg, #4152ff, #7b4dff); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 10px 30px -12px rgba(91, 80, 255, .8); }
.msg.pod .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.stamp { font-size: .74rem; color: var(--text-3); }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.step .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--good-soft); color: var(--good); }
.step .tick.wait { background: var(--warn-soft); color: var(--warn); }
.step .tick.run { background: var(--accent-soft); color: var(--accent); }
.step b { font-weight: 600; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.callout svg { color: var(--warn); flex: none; margin-top: 2px; }
.callout.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.callout.info svg { color: var(--info); }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); }
.composer:focus-within { border-color: rgba(124, 139, 255, .6); box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft), 0 0 40px -10px rgba(124, 139, 255, .7); }
.composer textarea { flex: 1; border: 0; resize: none; background: transparent; color: var(--text); font: inherit; padding: 8px 0; margin: 0; min-height: 44px; outline: none; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 12px; display: grid; place-items: center; flex: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* key/value rows */
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .88rem; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--text-2); }

/* Waterfall breakdown */
.wf-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; align-items: center; gap: 12px; font-size: .86rem; padding: 6px 0; }
.wf-track { position: relative; height: 22px; }
.wf-track span { position: absolute; top: 0; height: 100%; border-radius: 6px; animation: grow-x .9s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
@keyframes grow-x { from { transform: scaleX(0); } }
.wf-row .r { text-align: right; }

/* Dropzone & mapping (orders import) */
.drop { border: 1.5px dashed var(--line-strong); border-radius: 18px; padding: 30px; text-align: center; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: border-color .2s ease, background .2s ease; }
.drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop .ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 30px -6px rgba(124, 139, 255, .8); }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }

/* ---------- Forms ---------- */
label { display: block; margin: 12px 0 0; font-weight: 550; font-size: .88rem; }
label.check { display: inline-flex; gap: 8px; align-items: center; margin-right: 16px; font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--field); color: var(--text); font: inherit; font-size: .92rem; transition: border-color .2s ease, box-shadow .2s ease; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px -8px rgba(124, 139, 255, .7); }
select option { background: var(--surface-solid); color: var(--text); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0; accent-color: var(--accent); box-shadow: none; }
input[type=file] { padding: 8px; background: var(--surface-2); }
input[type=file]::file-selector-button { margin-right: 12px; border: 0; border-radius: 9px; padding: 8px 14px; background: var(--accent-soft); color: var(--accent-strong); font: 600 .85rem var(--font-body); cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }

/* ---------- Auth & landing ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(16px, 6vw, 88px); gap: 26px; max-width: 560px; width: 100%; margin: 0 auto; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.auth-form h1 { font-size: 2.4rem; letter-spacing: -0.04em; }
.auth-art { position: relative; overflow: hidden; background: #060812; color: var(--ink-text); padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 26px; isolation: isolate; border-left: 1px solid var(--ink-line); }
.auth-art::before { content: ""; position: absolute; inset: -30%; z-index: -1; background:
  radial-gradient(35% 30% at 25% 25%, rgba(52, 70, 242, .7), transparent 70%),
  radial-gradient(30% 30% at 80% 35%, rgba(139, 92, 246, .55), transparent 70%),
  radial-gradient(35% 30% at 60% 90%, rgba(34, 211, 238, .4), transparent 70%); filter: blur(16px); animation: aurora 20s ease-in-out infinite alternate; }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); }
.auth-art blockquote { margin: 0; font: 650 clamp(1.6rem, 2.6vw, 2.3rem)/1.15 var(--font-display); letter-spacing: -0.035em; max-width: 540px; color: #fff; }
.auth-art .pods-visual { width: 260px; height: 230px; align-self: center; }
.auth-art .pod-card { background: rgba(10, 13, 26, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.site-nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 24px; padding: 18px clamp(16px, 5vw, 64px); }
.site-nav .links { display: flex; gap: 26px; font-size: .9rem; }
.site-nav .links a { color: var(--text-2); }
.site-nav .links a:hover { color: var(--text); }
.landing-hero { position: relative; padding: 84px clamp(16px, 5vw, 64px) 0; text-align: center; isolation: isolate; }
.landing-hero::before { content: ""; position: absolute; left: 50%; top: -240px; width: 1300px; height: 820px; transform: translateX(-50%); z-index: -1; background:
  radial-gradient(40% 40% at 35% 50%, rgba(52, 70, 242, .55), transparent 70%),
  radial-gradient(35% 40% at 65% 45%, rgba(139, 92, 246, .45), transparent 70%),
  radial-gradient(30% 30% at 50% 80%, rgba(34, 211, 238, .3), transparent 70%); filter: blur(30px); animation: aurora 20s ease-in-out infinite alternate; }
:root[data-theme="light"] .landing-hero::before { opacity: .5; }
.landing-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -0.055em; max-width: 1000px; margin: 22px auto 0; }
.landing-hero h1 em { background: linear-gradient(100deg, #6d7cff, #a78bfa 45%, #22d3ee 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; animation: flow 8s linear infinite; }
.landing-hero .lead { font-size: 1.2rem; color: var(--text-2); max-width: 660px; margin: 22px auto 0; }
.landing-hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.landing-hero .btn { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.landing-hero .pods-visual { margin: 28px auto -10px; }
.shot { position: relative; margin: 40px auto 0; max-width: 1160px; border-radius: 22px 22px 0 0; border: 1px solid rgba(124, 139, 255, .3); border-bottom: 0; background: rgba(12, 15, 28, .7); backdrop-filter: blur(10px); box-shadow: 0 -20px 120px -40px rgba(99, 102, 241, .9), 0 50px 100px -40px rgba(0, 0, 0, .9); padding: 14px 14px 0; overflow: hidden; perspective: 1200px; }
:root[data-theme="light"] .shot { background: rgba(255, 255, 255, .7); }
.shot::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(160, 170, 255, .9), transparent); }
.shot-inner { border-radius: 12px 12px 0 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 80px clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.feature { position: relative; padding: 26px; border-radius: 20px; background: var(--surface); backdrop-filter: blur(16px); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease; }
.feature:hover { transform: translateY(-4px); border-color: rgba(124, 139, 255, .4); }
.feature .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 28px -6px rgba(124, 139, 255, .9); }
.feature p { color: var(--text-2); font-size: .93rem; }
.site-foot { padding: 26px clamp(16px, 5vw, 64px); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; color: var(--text-3); font-size: .85rem; border-top: 1px solid var(--line); }
.site-foot a { color: var(--text-2); }

/* Messages */
.flash { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 12px; font-weight: 500; font-size: .9rem; }
.flash.error, p.error { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.ok, p.ok { background: var(--good-soft); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 25%, transparent); }
p.error, p.ok { padding: 11px 15px; border-radius: 12px; }
.error { color: var(--bad); } .ok { color: var(--good); }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--aurora); color: #fff; box-shadow: 0 0 34px -6px rgba(124, 139, 255, .9); }

/* ---------- App extras ---------- */
.soon-item { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 11px; color: #5f6880; font-size: .92rem; font-weight: 500; cursor: default; }
.soon-item svg { flex: none; opacity: .55; }
.soon-item .soon, .governor .soon { margin-left: auto; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: #8b93ff; border: 1px solid rgba(124, 139, 255, .25); background: rgba(124, 139, 255, .08); padding: 1px 6px; border-radius: 6px; }
a.switcher { text-decoration: none; }
a.switcher:hover { border-color: rgba(124, 139, 255, .4); background: rgba(124, 139, 255, .08); color: var(--ink-text); }
.switcher .who { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.crumb { font-weight: 600; color: var(--text-2); font-size: .9rem; display: inline-flex; align-items: center; gap: 10px; }
.crumb::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.public { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.public .site-nav .brand { color: var(--text); }
.public-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 16px 48px; display: flex; flex-direction: column; gap: 20px; position: relative; isolation: isolate; }
.landing-main { max-width: none; padding: 0; }

/* ---------- Compatibility with the existing pages ---------- */
.content > .card > h1:first-child, .public-main > .card > h1:first-child { font-size: 1.6rem; margin-bottom: 6px; }
.card > h2 { margin: 20px 0 10px; } .card > h2:first-child { margin-top: 0; }
.card > p + p, .card > p + ul, .card > ul + p, .card > form + p, .card > p + form, .card > p + table, .card > p + .scroll, .card > div + p { margin-top: 10px; }
.card ul { padding-left: 20px; margin: 10px 0; }
.card ul li { margin: 3px 0; }
.narrow { width: 100%; max-width: 440px; margin: 48px auto; padding: 30px; box-shadow: var(--shadow-lg), 0 0 80px -40px rgba(99, 102, 241, .9); }
.narrow h1 { margin-bottom: 8px; }
form button, form .button { margin-top: 16px; }
form.inline, .inline { display: inline; }
form.inline button, .actions button, .topbar button, .side-user button, button.chip, .presets button { margin-top: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row h1, .row h2 { margin: 0; }
.row select { width: auto; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.stats > div { position: relative; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; font-size: .82rem; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; }
.stats > div::after { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 139, 255, .6), transparent); }
.stats .num { display: block; font: 600 1.5rem/1.15 var(--font-mono); letter-spacing: -0.035em; color: var(--text); }
.stats .num.error { color: var(--bad); }
.scroll { overflow-x: auto; }
.card > .scroll, .card > table.audit { margin-top: 14px; }
.card > .scroll > table.audit, .card > table.audit { border: 1px solid var(--line); border-radius: 14px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.audit .details { color: var(--text-3); word-break: break-word; font-size: .82rem; }
table.audit td strong { font-family: var(--font-mono); font-weight: 600; }
table.numbers td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .84rem; }
table.numbers td:first-child { font-family: var(--font-body); }
.pager { display: flex; gap: 16px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .73rem; font-weight: 650; white-space: nowrap; }
.tag-high { background: var(--good-soft); color: var(--good); }
.tag-medium { background: var(--warn-soft); color: var(--warn); }
.tag-low { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
pre.copy { white-space: pre-wrap; word-break: break-all; background: var(--field); border: 1px solid var(--line); padding: 12px; border-radius: 12px; user-select: all; font: .82rem var(--font-mono); }
code { font: .86em var(--font-mono); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--accent); }
ul.problems { color: var(--bad); font-size: .88rem; }
.hp { position: absolute; left: -9999px; }
.check a { display: inline; }
label.check { margin-top: 14px; }
.lead { font-size: 1.1rem; color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .chat-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; background: #070912; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55); }
  .topbar .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px 16px 40px; }
  .search kbd { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .site-nav .links { display: none; }
  h1 { font-size: 1.6rem; }
  .wf-row { grid-template-columns: 110px minmax(0, 1fr) 90px; }
  .hero-banner { padding: 24px 20px; }
  .hero-banner .pods-visual { display: none; }
}
@media (max-width: 600px) {
  .topbar .hide-sm, .topbar .search { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpi { padding: 14px 14px 12px; }
  .kpi .value { font-size: 1.3rem; }
  .objective .ring { display: none; }
  table.audit:not(.numbers) thead { display: none; }
  table.audit:not(.numbers) td { display: block; border: 0; padding: 2px 14px; }
  table.audit:not(.numbers) tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .landing-hero .pods-visual { width: 170px; height: 155px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Landing page product shot (a small drawn copy of the app) */
.mini { display: grid; grid-template-columns: 56px minmax(0, 1fr); background: var(--bg); text-align: left; min-height: 380px; }
.mini-side { background: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0; border-right: 1px solid var(--ink-line); }
.mini-side i { width: 22px; height: 6px; border-radius: 3px; background: #1d2333; }
.mini-side i.on { background: var(--aurora); box-shadow: 0 0 10px rgba(124, 139, 255, .9); }
.mini-main { padding: 18px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 860px) { .mini { grid-template-columns: minmax(0, 1fr); } .mini-side { display: none; } .mini .grid-2 { grid-template-columns: minmax(0, 1fr); } }
button.wide, .btn.wide { width: 100%; min-height: 48px; font-size: .95rem; }
.auth-form .brand { color: var(--text); padding: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(300px circle at var(--mx) var(--my), rgba(124, 139, 255, .16), transparent 50%); opacity: 0; transition: opacity .3s ease; }
.tile:hover { border-color: rgba(124, 139, 255, .45); color: var(--text); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(99, 102, 241, .9); }
.tile:hover::before { opacity: 1; }
.tile .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.tile:hover .ico { background: var(--aurora); color: #fff; box-shadow: 0 0 24px -4px rgba(124, 139, 255, .9); }
.tile b { margin-top: 6px; }
.tile span:last-child { font-size: .84rem; color: var(--text-2); }
.health a.val { font-weight: 600; }
.pod-card textarea::placeholder { color: #8a94a6; }
.health .dot.todo { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); }
.chart-box { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.chart-box .legend { justify-content: flex-end; }
@media (max-width: 600px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* Forms in existing pages: each submit button on its own line, sections breathe */
fieldset > button, form > button { display: flex; }
form.inline > button { display: inline-flex; }
form.inline + form.inline { margin-left: 8px; }
.card h3 { margin: 22px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.card .card-head h3, .card > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.card form > fieldset > p, .card form > p { margin-top: 12px; }

/* CEO Pod page */
a.governor { text-decoration: none; transition: border-color .2s ease; }
a.governor:hover { border-color: rgba(62, 224, 161, .35); }
.governor .badge.good { background: rgba(62, 224, 161, .14); color: #7fe9c3; }
.tag-act { background: var(--bad-soft); color: var(--bad); }
.stats .delta { font-size: .78rem; font-weight: 650; margin-left: 4px; }
.delta { font-size: .78rem; font-weight: 600; }
ul.flags .badge { margin-right: 6px; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
ul.flags { list-style: none; padding: 0; }
ul.flags li { padding: 12px 0; border-bottom: 1px solid var(--line); }
ul.flags li:last-child { border-bottom: 0; }
ol.todo { padding-left: 0; list-style: none; counter-reset: todo; }
ol.todo li { counter-increment: todo; position: relative; padding: 10px 0 10px 40px; border-bottom: 1px solid var(--line); }
ol.todo li:last-child { border-bottom: 0; }
ol.todo li::before { content: counter(todo); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--aurora); color: #fff; font: 700 .78rem var(--font-mono); box-shadow: 0 0 16px -4px rgba(124, 139, 255, .9); }
.meter { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.meter span { position: relative; display: block; height: 100%; border-radius: inherit; background: var(--aurora); box-shadow: 0 0 16px rgba(124, 139, 255, .8); animation: grow-x 1.2s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; overflow: hidden; }
.meter span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shimmer 2.6s 1.2s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.meter span.over { background: var(--bad); box-shadow: 0 0 16px var(--bad); }
.answer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.prose { white-space: pre-wrap; line-height: 1.65; }

/* Approvals */
.proposal { border-top: 1px solid var(--line); padding: 18px 0; }
.proposal:first-of-type { border-top: 0; padding-top: 4px; }
.proposal h3 { margin: 0; padding: 0; border: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.proposal .effect { font: 600 .9rem var(--font-mono); color: var(--good); white-space: nowrap; text-shadow: 0 0 18px color-mix(in srgb, var(--good) 50%, transparent); }
.proposal .actions { display: flex; gap: 8px; margin-top: 12px; }
dl.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 10px 0; font-size: .88rem; }
dl.facts dt { color: var(--text-3); } dl.facts dd { margin: 0; }
.proposal .effect.muted { color: var(--text-3); text-shadow: none; }
.proposal.blocked h3, .proposal.blocked > p { opacity: .7; }
.veto { background: var(--bad-soft); color: var(--text); border-radius: 12px; padding: 11px 15px; margin: 8px 0; font-size: .9rem; border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent); }
.veto strong { color: var(--bad); } .veto ul { margin: 6px 0; padding-left: 18px; }
.rehearsal { margin-top: 6px; font-size: .85rem; } .rehearsal details { margin-top: 4px; } .rehearsal pre { white-space: pre-wrap; word-break: break-all; }

/* Reports */
.report .lead-in { font-size: 1.04rem; line-height: 1.65; margin: 0 0 14px; }
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 8px; }
.kpis.compact .kpi { box-shadow: none; padding: 12px 14px; }
.kpis.compact .kpi .value { font-size: 1.25rem; }
.report ul { padding-left: 20px; } .report li { margin-bottom: 6px; }
ul.report-list { list-style: none; padding: 0; margin: 0; }
ul.report-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.report-list li[aria-current] a { font-weight: 650; }
ul.report-list a { text-decoration: none; color: var(--text); display: flex; gap: 8px; align-items: center; }
@media (max-width: 600px) {
  .crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .crumb::before { display: none; }
  .topbar .btn.glow { min-height: 36px; padding: 0 12px; font-size: .82rem; }
  .hero-banner h1 { font-size: 2rem; }
}

/* Products & brand */
.know-list { list-style: none; padding: 0; margin: 6px 0 14px; display: flex; flex-direction: column; gap: 6px; }
.know-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2, rgba(127, 127, 127, .08)); }
.know-list li > span:first-child { flex: 1 1 260px; }
.know-list .src { font-size: .8rem; }
.know-list li.know-forbidden_claim { border-left: 3px solid var(--bad); }
.know-list li.know-approved_claim { border-left: 3px solid var(--good); }

/* Creatives */
.creative { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line, rgba(127, 127, 127, .2)); margin: 10px 0 10px calc(var(--depth, 0) * 28px); }
.creative.variant { border-left: 3px solid var(--accent, #7c8bff); }
.creative h3 { margin: 0; font-size: 1.02rem; }
.creative .meta { font-size: .85rem; margin: 4px 0 8px; }
.creative .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.creative .actions select { margin: 0; width: auto; }
@media (max-width: 640px) { .creative { margin-left: calc(var(--depth, 0) * 10px); } }
.creative .actions form.inline { display: flex; gap: 8px; align-items: center; margin: 0; }

/* Watchdog */
.freeze-banner { display: block; margin-bottom: 16px; padding: 12px 16px; border-radius: 12px; background: var(--bad-soft); border: 1px solid var(--bad); color: var(--text); text-decoration: none; }
.freeze-banner strong { color: var(--bad); }
.card.frozen { border-color: var(--bad); }
