/* Shrandha Labs product kit — shared design system for the interactive product showcases.
   Each product sets --brand (via Demo.init theme); every accent derives from it. */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap");

:root {
  --brand: #14b8a6;
  --bg: #f5f6fa; --surface: #ffffff; --surface-2: #fbfbfd; --sunken: #f0f2f7; --fg: #0b1020; --muted: #4a5468; --subtle: #818a9c; --line: #e6e8ef; --line-2: #eef0f5;
  --rail: #0b0f1c; --rail-2: #121829; --rail-fg: #9aa3b8; --rail-line: rgb(255 255 255 / .07);
  --accent: color-mix(in oklab, var(--brand) 80%, black); --accent-strong: var(--brand);
  --accent-soft: color-mix(in oklab, var(--brand) 11%, var(--surface)); --rail-active: color-mix(in oklab, var(--brand) 70%, white);
  --indigo: #4f46e5; --indigo-soft: #eef0ff;
  --good: #0a8a5a; --good-soft: #e5f7ef; --warn: #a35a00; --warn-soft: #fff3dc; --bad: #d12c52; --bad-soft: #ffe9ee;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 1px 3px rgb(16 24 40 / .04), 0 12px 32px -16px rgb(16 24 40 / .14);
  --shadow-lg: 0 24px 64px -24px rgb(16 24 40 / .35), 0 2px 6px rgb(16 24 40 / .06);
  --display: "Geist", "Segoe UI", system-ui, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #07090f; --surface: #0e121c; --surface-2: #111623; --sunken: #151b29; --fg: #edf0f7; --muted: #a7afc2; --subtle: #767f94; --line: #1c2333; --line-2: #171d2b;
  --rail: #05070c; --rail-2: #0b0f19;
  --accent: color-mix(in oklab, var(--brand) 72%, white); --accent-soft: color-mix(in oklab, var(--brand) 16%, var(--surface));
  --indigo: #8b93ff; --indigo-soft: #1a1d3d;
  --good: #3ddc97; --good-soft: #0d2a20; --warn: #f7b955; --warn-soft: #2c2210; --bad: #ff7b96; --bad-soft: #321520;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -20px rgb(0 0 0 / .8); --shadow-lg: 0 30px 80px -30px rgb(0 0 0 / .9);
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #07090f; --surface: #0e121c; --surface-2: #111623; --sunken: #151b29; --fg: #edf0f7; --muted: #a7afc2; --subtle: #767f94; --line: #1c2333; --line-2: #171d2b;
  --rail: #05070c; --rail-2: #0b0f19;
  --accent: color-mix(in oklab, var(--brand) 72%, white); --accent-soft: color-mix(in oklab, var(--brand) 16%, var(--surface));
  --indigo: #8b93ff; --indigo-soft: #1a1d3d;
  --good: #3ddc97; --good-soft: #0d2a20; --warn: #f7b955; --warn-soft: #2c2210; --bad: #ff7b96; --bad-soft: #321520;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -20px rgb(0 0 0 / .8); --shadow-lg: 0 30px 80px -30px rgb(0 0 0 / .9);
  color-scheme: dark }

* { box-sizing: border-box }
html, body { height: 100%; margin: 0 }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; font-feature-settings: "ss01", "cv11" }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 8px }
::selection { background: color-mix(in oklab, var(--brand) 30%, transparent) }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em }
.num { font-variant-numeric: tabular-nums }
[hidden] { display: none !important }
kbd { font: 500 11px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--subtle); background: var(--surface) }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100% }
.rail { background: radial-gradient(420px 260px at 0 0, color-mix(in oklab, var(--brand) 22%, transparent), transparent 70%), linear-gradient(180deg, var(--rail-2), var(--rail) 40%); color: var(--rail-fg);
  padding: 20px 14px 16px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--rail-line) }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; color: #fff; font: 700 17px/1 var(--display); letter-spacing: -.02em }
.brand small { margin-left: auto; font: 600 10px var(--mono); letter-spacing: .06em; color: var(--rail-active); border: 1px solid color-mix(in oklab, var(--brand) 40%, transparent); padding: 3px 6px; border-radius: 6px }
.mark { width: 34px; height: 34px; border-radius: 11px; flex: none; position: relative; display: grid; place-items: center;
  background: var(--mark, linear-gradient(135deg, color-mix(in oklab, var(--brand) 70%, white), var(--brand) 45%, color-mix(in oklab, var(--brand) 60%, black)));
  box-shadow: 0 8px 22px -8px var(--brand), inset 0 1px 0 rgb(255 255 255 / .35) }
.mark::after { content: ""; width: 13px; height: 13px; border-radius: 4px; background: rgb(255 255 255 / .92); transform: rotate(45deg); box-shadow: 0 0 0 3px rgb(255 255 255 / .18) }
.org { margin: 0 2px; padding: 11px 12px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--rail-line); display: flex; align-items: center; gap: 10px }
.org .ologo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--display); color: #fff; background: rgb(255 255 255 / .1); flex: none }
.org div { min-width: 0; flex: 1 }
.org small { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #667087 }
.org span { display: block; color: #eef1f8; font-weight: 600; font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.org svg { width: 14px; height: 14px; color: #667087; flex: none }
.roles { display: flex; background: rgb(255 255 255 / .05); border: 1px solid var(--rail-line); border-radius: 11px; padding: 3px; margin: 0 2px }
.roles button { flex: 1; background: none; border: 0; color: #9aa3b8; padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; transition: .2s }
.roles button[aria-pressed="true"] { background: #fff; color: #0b1020; box-shadow: 0 2px 8px rgb(0 0 0 / .3) }
.nav { display: flex; flex-direction: column; gap: 2px }
.nav small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #5b6479; padding: 12px 12px 6px; font-weight: 600 }
.nav button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; color: var(--rail-fg); text-align: left; padding: 9px 12px; border-radius: 10px; font-weight: 500; transition: background .2s, color .2s }
.nav button:hover { background: rgb(255 255 255 / .05); color: #fff }
.nav button[aria-current="page"] { background: linear-gradient(90deg, color-mix(in oklab, var(--brand) 22%, transparent), rgb(255 255 255 / .03)); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06) }
.nav button[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); box-shadow: 0 0 12px var(--brand) }
.nav button[aria-current="page"] svg { color: var(--rail-active) }
.nav svg { width: 18px; height: 18px; flex: none }
.nav .count { margin-left: auto; font: 600 11px var(--mono); background: rgb(255 255 255 / .08); color: #cfd6e4; padding: 1px 7px; border-radius: 999px }
.nav button[aria-current="page"] .count { background: var(--brand); color: #fff }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px }
.upgrade { border-radius: 14px; padding: 14px; background: linear-gradient(160deg, color-mix(in oklab, var(--brand) 26%, transparent), rgb(255 255 255 / .03)); border: 1px solid rgb(255 255 255 / .08); color: #d5dbe8; font-size: 12.5px }
.upgrade b { display: block; color: #fff; font-size: 13px; margin-bottom: 3px }
.upgrade .meter { height: 5px; border-radius: 9px; background: rgb(255 255 255 / .1); margin-top: 10px; overflow: hidden }
.upgrade .meter i { display: block; height: 100%; width: 72%; background: linear-gradient(90deg, var(--brand), color-mix(in oklab, var(--brand) 55%, white)); border-radius: 9px }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--rail-line) }
.me .who { font-size: 13px; color: #eef1f8; font-weight: 600; min-width: 0 }
.me .who small { display: block; color: #667087; font-weight: 500; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.me .online { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; margin-left: auto; box-shadow: 0 0 0 3px rgb(61 220 151 / .18) }

main { min-width: 0; padding-block: 0 56px; padding-inline: clamp(16px, 3vw, 40px);
  background: radial-gradient(900px 320px at 70% -160px, color-mix(in oklab, var(--brand) 13%, transparent), transparent 70%) no-repeat }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 calc(-1 * clamp(16px, 3vw, 40px)) 22px; padding: calc(16px + env(safe-area-inset-top, 0px)) clamp(16px, 3vw, 40px) 14px;
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent) }
.crumbs { font-size: 12.5px; color: var(--subtle); display: flex; align-items: center; gap: 6px }
.crumbs i { font-style: normal; opacity: .5 }
h1 { font: 700 clamp(22px, 2.3vw, 28px)/1.15 var(--display); letter-spacing: -.035em; margin: 3px 0 0; text-wrap: balance }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 10px 0 12px; height: 40px; min-width: 0; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s }
.search:focus-within { border-color: color-mix(in oklab, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent) }
.search input { border: 0; outline: 0; background: none; width: 230px; max-width: 40vw }
.search svg { width: 16px; height: 16px; color: var(--subtle); flex: none }
.cmdk-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--subtle); box-shadow: var(--shadow-sm); font-size: 13px }
.cmdk-btn svg { width: 16px; height: 16px }
.sync { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--subtle); padding: 0 6px }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 20%, transparent); animation: beat 2.4s ease-in-out infinite }
@keyframes beat { 50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--good) 0%, transparent) } }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; box-shadow: var(--shadow-sm) }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow) }
.btn:active { transform: translateY(0) }
.btn:disabled { opacity: .55; transform: none; cursor: default }
.btn.primary { background: linear-gradient(180deg, #2a3145, #0b1020); color: #fff; border-color: #0b1020; box-shadow: inset 0 1px 0 rgb(255 255 255 / .15), var(--shadow) }
.btn.accent { background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 88%, white), color-mix(in oklab, var(--brand) 78%, black)); color: #fff; border-color: color-mix(in oklab, var(--brand) 70%, black);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), 0 8px 20px -8px color-mix(in oklab, var(--brand) 70%, transparent) }
:root[data-theme="dark"] .btn.primary { background: linear-gradient(180deg, #fff, #dfe3ec); color: #0b1020; border-color: #fff }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: linear-gradient(180deg, #fff, #dfe3ec); color: #0b1020; border-color: #fff } }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px }
.btn svg { width: 16px; height: 16px }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; position: relative; flex: none; box-shadow: var(--shadow-sm); color: var(--muted); transition: .2s }
.iconbtn:hover { color: var(--fg); box-shadow: var(--shadow) }
.iconbtn svg { width: 18px; height: 18px }
.iconbtn .badge { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface) }
.avatar-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; padding: 0; display: grid; place-items: center; color: #fff; font: 700 13px var(--display); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px color-mix(in oklab, var(--brand) 60%, transparent) }
.menu-toggle { display: none }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; position: relative }
.panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgb(255 255 255 / .6) }
:root[data-theme="dark"] .panel::before { box-shadow: inset 0 1px 0 rgb(255 255 255 / .04) }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel::before { box-shadow: inset 0 1px 0 rgb(255 255 255 / .04) } }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap }
.panel-h h2 { font: 600 15px/1.3 var(--display); margin: 0; letter-spacing: -.015em }
.meta { font-size: 12px; color: var(--subtle) }
.panel-b { padding: 16px 20px 20px }
.grid { display: grid; gap: 18px }
.gap-top { margin-top: 18px }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.two { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr) }
.halves { grid-template-columns: repeat(2, minmax(0, 1fr)) }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }

.kpi { padding: 18px 20px 0; overflow: hidden; transition: transform .25s, box-shadow .25s }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg) }
.kpi .label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); font-weight: 500 }
.kpi .value { font: 700 30px/1.1 var(--display); letter-spacing: -.04em; margin-top: 12px; font-variant-numeric: tabular-nums }
.kpi .delta { display: inline-flex; font-size: 12px; font-weight: 600; margin-top: 8px }
.kpi .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand) 18%, transparent) }
.kpi .ic svg { width: 16px; height: 16px }
.kpi .spark { display: block; width: calc(100% + 40px); height: 46px; margin: 10px -20px 0 }
.up { color: var(--good) } .down { color: var(--bad) } .flat { color: var(--subtle) } .warnc { color: var(--warn) }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 18%, transparent) }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.p-good { background: var(--good-soft); color: var(--good) } .p-warn { background: var(--warn-soft); color: var(--warn) }
.p-bad { background: var(--bad-soft); color: var(--bad) } .p-info { background: var(--indigo-soft); color: var(--indigo) }
.p-accent { background: var(--accent-soft); color: var(--accent) } .p-muted { background: var(--sunken); color: var(--muted) }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px }
.panel-b.table-wrap, .drawer .table-wrap { margin: 0; padding: 16px 20px 20px }
table { width: 100%; border-collapse: collapse; font-size: 13px }
th { text-align: left; font-weight: 500; color: var(--subtle); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2) }
th:first-child { border-top-left-radius: 10px } th:last-child { border-top-right-radius: 10px }
th.r, td.r { text-align: right }
td { padding: 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap }
tbody tr { transition: background .15s }
tbody tr.clickable { cursor: pointer }
tbody tr:hover { background: color-mix(in oklab, var(--brand) 4%, var(--surface)) }
tr:last-child td { border-bottom: 0 }
.person { display: flex; align-items: center; gap: 10px; min-width: 0 }
.av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: #fff; flex: none;
  background-image: linear-gradient(135deg, rgb(255 255 255 / .28), rgb(0 0 0 / .12)) !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2) }
.person b { display: block; font-weight: 600 }
.person small { color: var(--subtle); font-size: 12px }
.bar { height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; width: 90px }
.bar i { display: block; height: 100%; border-radius: 99px; animation: grow-x .9s cubic-bezier(.22,1,.36,1) both; transform-origin: left }
@keyframes grow-x { from { transform: scaleX(0) } }
.pct { display: flex; align-items: center; gap: 10px }

.chips { display: flex; gap: 6px; flex-wrap: wrap }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); box-shadow: var(--shadow-sm); transition: .2s }
.chip:hover { color: var(--fg) }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg) }

.chart { width: 100%; height: auto; display: block; overflow: visible }
.chart text { fill: var(--subtle); font: 11px var(--mono) }
.chart .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.65,0,.35,1) .1s forwards }
.chart .area { animation: fade .9s ease .6s both }
.chart .br { transform-box: fill-box; transform-origin: bottom; animation: grow-y .8s cubic-bezier(.22,1,.36,1) both; transition: opacity .2s }
.chart:hover .br { opacity: .55 } .chart .br:hover { opacity: 1 }
.chart .pt { opacity: 0; transition: opacity .15s } .chart .pt:hover { opacity: 1 }
.chart .hit { fill: transparent }
@keyframes draw { to { stroke-dashoffset: 0 } }
@keyframes grow-y { from { transform: scaleY(0) } }
@keyframes fade { from { opacity: 0 } }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; background: var(--c) }
.tip { position: fixed; z-index: 90; pointer-events: none; background: #0b1020; color: #fff; font: 600 12px var(--body); padding: 7px 10px; border-radius: 9px; box-shadow: var(--shadow-lg); transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; opacity: 0; transition: opacity .12s }
.tip.show { opacity: 1 }

.list { display: flex; flex-direction: column }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); min-width: 0 }
.row:last-child { border-bottom: 0 }
.row .t { font-weight: 600 }
.row .s { font-size: 12.5px; color: var(--subtle) }
.sev { width: 4px; align-self: stretch; border-radius: 99px; flex: none }

.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px }
.col { background: var(--sunken); border-radius: var(--r); padding: 12px; min-width: 0; border: 1px solid var(--line-2) }
.col h3 { display: flex; justify-content: space-between; font: 600 13px var(--display); margin: 2px 4px 12px }
.col h3 span { font: 500 11px var(--mono); color: var(--subtle); background: var(--surface); border-radius: 6px; padding: 1px 7px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg) }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 700 13px var(--display); flex: none }

.ring { --p: 80; --c: var(--accent-strong); width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunken) 0); display: grid; place-items: center; flex: none }
.ring::before { content: attr(data-label); width: 86px; height: 86px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 20px var(--display); letter-spacing: -.03em }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
.kv div { background: var(--sunken); border-radius: 12px; padding: 12px 14px; min-width: 0; border: 1px solid var(--line-2) }
.kv small { display: block; color: var(--subtle); font-size: 11.5px }
.kv b { font-weight: 600 }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted) }
.field input, .field select, .field textarea { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 12px; outline: 0; min-width: 0; box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s }
.field textarea { height: auto; padding: 10px 12px; resize: vertical }
.field input:focus, .field select:focus, .field textarea:focus { border-color: color-mix(in oklab, var(--brand) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 14%, transparent) }

/* ---------- Overlays ---------- */
.scrim { position: fixed; inset: 0; background: rgb(6 9 16 / .5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40 }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(500px, calc(100% - 20px)); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; z-index: 50; transform: translateX(calc(100% + 20px)); transition: transform .45s cubic-bezier(.22,1,.36,1); overflow-y: auto; padding: calc(22px + env(safe-area-inset-top, 0px)) 26px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--shadow-lg) }
.drawer-open .scrim { opacity: 1; pointer-events: auto }
.drawer-open .drawer { transform: none }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 30px) scale(.96); opacity: 0; background: #0b1020; color: #fff; padding: 11px 16px 11px 12px; border-radius: 14px; font-weight: 500; font-size: 13px; transition: .35s cubic-bezier(.22,1,.36,1); z-index: 95; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); border: 1px solid rgb(255 255 255 / .08) }
.toast.show { opacity: 1; transform: translate(-50%, 0) }
.toast svg { width: 14px; height: 14px; flex: none; padding: 4px; box-sizing: content-box; border-radius: 50%; background: var(--good); color: #fff }

.pop { position: fixed; z-index: 80; width: min(380px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; transform-origin: top right; animation: pop .22s cubic-bezier(.22,1,.36,1) }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-6px) } }
.pop h4 { margin: 8px 10px 6px; font: 600 13px var(--display); display: flex; justify-content: space-between; align-items: center }
.pop h4 button { border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600 }
.pop .n { display: flex; gap: 12px; padding: 10px; border-radius: 10px; align-items: flex-start }
.pop .n:hover { background: var(--sunken) }
.pop .n .dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none }
.pop .n .dot svg { width: 15px; height: 15px }
.pop .n b { display: block; font-size: 13px; font-weight: 600 }
.pop .n small { color: var(--subtle); font-size: 12px }
.pop .n .unread { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin: 6px 0 0 auto; flex: none }

.cmdk { position: fixed; inset: 0; z-index: 85; display: grid; place-items: start center; padding: 12vh 16px 16px; background: rgb(6 9 16 / .45); backdrop-filter: blur(6px) }
.cmdk .box { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .22s cubic-bezier(.22,1,.36,1) }
.cmdk .in { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line) }
.cmdk .in svg { width: 18px; height: 18px; color: var(--subtle) }
.cmdk input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px }
.cmdk ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto }
.cmdk li small { display: block; padding: 8px 10px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle) }
.cmdk li button { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 10px; border-radius: 10px; text-align: left; font-weight: 500 }
.cmdk li button svg { width: 17px; height: 17px; color: var(--subtle) }
.cmdk li button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent) }
.cmdk li button[aria-selected="true"] svg { color: var(--accent) }
.cmdk li button span { margin-left: auto; font-size: 12px; color: var(--subtle) }
.cmdk .foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--subtle) }

/* Built-by badge (replaces the old demo ribbon) */
.built { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 999px;
  background: rgb(11 16 32 / .88); color: #cfd6e4; font-size: 12px; backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .1); box-shadow: var(--shadow-lg) }
.built b { color: #fff; font-weight: 600 }
.built a { color: #0b1020; background: #fff; text-decoration: none; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap }
.built a:hover { background: color-mix(in oklab, var(--brand) 25%, white) }

/* ---------- Sign-in splash ---------- */
.auth { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); transition: opacity .5s, transform .5s }
.auth.leaving { opacity: 0; transform: scale(1.02); pointer-events: none }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(700px 500px at 20% 10%, color-mix(in oklab, var(--brand) 55%, transparent), transparent 60%), radial-gradient(600px 500px at 90% 90%, color-mix(in oklab, var(--brand) 35%, #4f46e5), transparent 60%), #070a13 }
.auth-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .04) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 40% 40%, #000, transparent 75%); pointer-events: none }
.auth-art > * { position: relative; z-index: 1 }
.auth-art .brand { padding: 0; font-size: 20px }
.auth-art h2 { font: 700 clamp(30px, 3.4vw, 46px)/1.08 var(--display); letter-spacing: -.04em; margin: 0; max-width: 14em; text-wrap: balance }
.auth-art p { color: rgb(255 255 255 / .72); font-size: 16px; max-width: 30em; margin: 16px 0 0 }
.auth-feats { display: grid; gap: 12px; margin-top: 30px }
.auth-feats div { display: flex; gap: 12px; align-items: center; font-size: 14px; color: rgb(255 255 255 / .85) }
.auth-feats svg { width: 16px; height: 16px; padding: 5px; box-sizing: content-box; border-radius: 8px; background: rgb(255 255 255 / .1); color: #fff; flex: none }
.auth-card { margin-top: 32px; width: min(420px, 100%); border-radius: 18px; padding: 18px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); backdrop-filter: blur(12px); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .8); animation: float 6s ease-in-out infinite }
@keyframes float { 50% { transform: translateY(-8px) } }
.auth-card small { color: rgb(255 255 255 / .6); font-size: 12px }
.auth-card strong { display: block; font: 700 28px var(--display); letter-spacing: -.03em; margin-top: 4px }
.auth-card svg { display: block; width: 100%; height: 60px; margin-top: 8px }
.auth-foot { font-size: 12px; color: rgb(255 255 255 / .5) }
.auth-form { display: grid; place-items: center; padding: 32px 24px; background: var(--surface) }
.auth-form form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px }
.auth-form h3 { font: 700 28px/1.15 var(--display); letter-spacing: -.035em; margin: 0 }
.auth-form .sub { color: var(--subtle); margin: -8px 0 8px }
.auth-form .btn { height: 46px; justify-content: center; border-radius: 12px; font-size: 14px }
.auth-form .sso { background: var(--surface) }
.auth-form .or { display: flex; align-items: center; gap: 12px; color: var(--subtle); font-size: 12px }
.auth-form .or::before, .auth-form .or::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.auth-form .field input { height: 46px }
.auth-form .row2 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted) }
.auth-form .row2 a { color: var(--accent); font-weight: 600; text-decoration: none }
.auth-form .note { font-size: 12px; color: var(--subtle); text-align: center; margin-top: 4px }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .35); border-top-color: #fff; animation: rot .7s linear infinite }
@keyframes rot { to { transform: rotate(360deg) } }

.view { animation: rise .5s cubic-bezier(.22,1,.36,1) both }
.view > * { animation: rise .55s cubic-bezier(.22,1,.36,1) both }
.view > *:nth-child(2) { animation-delay: .05s } .view > *:nth-child(3) { animation-delay: .1s } .view > *:nth-child(4) { animation-delay: .15s }
.kpis > * { animation: rise .55s cubic-bezier(.22,1,.36,1) both }
.kpis > *:nth-child(2) { animation-delay: .04s } .kpis > *:nth-child(3) { animation-delay: .08s } .kpis > *:nth-child(4) { animation-delay: .12s }
@keyframes rise { from { opacity: .001; transform: translateY(10px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } .chart .ln { stroke-dashoffset: 0 } }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) } .two, .three, .halves { grid-template-columns: minmax(0, 1fr) } .sync { display: none } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr) }
  .rail { position: fixed; inset: 0 auto 0 0; width: 280px; height: 100%; z-index: 60; transform: translateX(-100%); transition: transform .35s cubic-bezier(.22,1,.36,1); padding-top: calc(20px + env(safe-area-inset-top, 0px)) }
  .menu-open .rail { transform: none; box-shadow: 0 0 0 100vmax rgb(6 9 16 / .5) }
  .menu-toggle { display: grid }
  .search input { width: 130px }
  .cmdk-btn .lbl, .cmdk-btn kbd { display: none }
  .auth { grid-template-columns: minmax(0, 1fr) } .auth-art { display: none }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr) } .kv { grid-template-columns: minmax(0, 1fr) } .kpi .value { font-size: 26px }
  .search, #themeBtn { display: none } .built span { display: none } .topbar { gap: 10px; flex-wrap: nowrap } .tools { flex-wrap: nowrap } h1 { font-size: 20px }
}
