/* Layout: emerald sidebar + ivory workspace; gold used only for brand, focus and the one primary action per screen. */
:root {
  --emerald: #102C24; --emerald-2: #173d32; --emerald-3: #1f5243; --gold: #D6BB85; --gold-deep: #a8884c; --ivory: #F8F4EA; --charcoal: #18201D;
  --bg: #F8F4EA; --surface: #fffdf8; --surface-2: #f1ecdf; --border: #e4dccb; --text: #18201D; --muted: #67705f; --faint: #8f9686;
  --accent: #1f5243; --accent-soft: #e3eee8; --gold-soft: #f4ead3; --gold-text: #8a6a2c;
  --side-bg: #102C24; --side-text: #cfd9d2; --side-muted: #7f978b; --side-hover: rgba(214,187,133,.10);
  --ok: #1f7a4d; --ok-soft: #dcefe3; --warn: #9a6512; --warn-soft: #f7e8c8; --bad: #b4372c; --bad-soft: #f6dcd7; --info: #2f5f8a; --info-soft: #dde8f2; --idle: #6b6f68; --idle-soft: #ebe8e0;
  --shadow: 0 1px 2px rgba(24,32,29,.05), 0 2px 8px rgba(24,32,29,.05);
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --ui: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --r-sm: 9px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1714; --surface: #16211d; --surface-2: #1c2a25; --border: #2a3b34; --text: #eef0e8; --muted: #a3ae9f; --faint: #7d8a80;
  --accent: #8cc7a8; --accent-soft: #1d3a2f; --gold-soft: #3a3220; --gold-text: #e2c98f;
  --side-bg: #0a120f; --side-text: #cfd9d2; --side-muted: #6f877b; --side-hover: rgba(214,187,133,.08);
  --ok: #6fcf97; --ok-soft: #173b2a; --warn: #e8b45a; --warn-soft: #3b2e14; --bad: #f08a7e; --bad-soft: #43201b; --info: #8db8e0; --info-soft: #1a2c3e; --idle: #a3a69e; --idle-soft: #25302b;
  --shadow: 0 1px 2px rgba(0,0,0,.35); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1714; --surface: #16211d; --surface-2: #1c2a25; --border: #2a3b34; --text: #eef0e8; --muted: #a3ae9f; --faint: #7d8a80;
  --accent: #8cc7a8; --accent-soft: #1d3a2f; --gold-soft: #3a3220; --gold-text: #e2c98f;
  --side-bg: #0a120f; --side-text: #cfd9d2; --side-muted: #6f877b; --side-hover: rgba(214,187,133,.08);
  --ok: #6fcf97; --ok-soft: #173b2a; --warn: #e8b45a; --warn-soft: #3b2e14; --bad: #f08a7e; --bad-soft: #43201b; --info: #8db8e0; --info-soft: #1a2c3e; --idle: #a3a69e; --idle-soft: #25302b;
  --shadow: 0 1px 2px rgba(0,0,0,.35); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--ui); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tnum { font-variant-numeric: tabular-nums; }

/* shell */
.shell { display: grid; grid-template-columns: 264px minmax(0,1fr); min-height: 100%; }
.side { background: var(--side-bg); color: var(--side-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 20px 12px 16px; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 10px 18px; border-bottom: 1px solid rgba(214,187,133,.16); margin-bottom: 6px; }
.brand svg { flex: none; }
.brand b { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--gold); letter-spacing: .04em; display: block; line-height: 1.1; }
.brand span { font-size: 10.5px; color: var(--side-muted); letter-spacing: .14em; text-transform: uppercase; }
.nav-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--side-muted); padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--side-text); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(214,187,133,.22), rgba(214,187,133,.06)); color: #fff; box-shadow: inset 2px 0 0 #D6BB85; }
.nav a.active svg { opacity: 1; color: #D6BB85; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: #D6BB85; color: #102C24; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.nav .count.red { background: #c8513f; color: #fff; }
.side-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(214,187,133,.16); font-size: 12px; color: var(--side-muted); }
.side-foot b { color: var(--side-text); display: block; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top .crumb { font-weight: 600; }
.top .spacer { flex: 1; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--emerald); color: var(--ivory); }
:root[data-theme="dark"] .seg button.on { background: var(--gold); color: var(--emerald); }
.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* page head */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.ph .t { flex: 1; min-width: 240px; }
.ph h1 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: .01em; line-height: 1.15; }
.ph .sub { color: var(--muted); margin-top: 4px; max-width: 70ch; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; margin-bottom: 4px; }

/* primitives */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-h h2 { font-size: 15px; font-weight: 700; flex: 1; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--gold-deep); }
.btn.primary { background: var(--emerald); border-color: var(--emerald); color: var(--ivory); }
:root[data-theme="dark"] .btn.primary { background: var(--gold); border-color: var(--gold); color: #102C24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--gold); border-color: var(--gold); color: #102C24; } :root:not([data-theme="light"]) .seg button.on { background: var(--gold); color: #102C24; } }
.btn.ok { color: var(--ok); } .btn.bad { color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; line-height: 18px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.s-ok { background: var(--ok-soft); color: var(--ok); } .s-warn { background: var(--warn-soft); color: var(--warn); } .s-bad { background: var(--bad-soft); color: var(--bad); }
.s-info { background: var(--info-soft); color: var(--info); } .s-idle { background: var(--idle-soft); color: var(--idle); } .s-gold { background: var(--gold-soft); color: var(--gold-text); }
.tag { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--gold-text); background: var(--gold-soft); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.sample { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--warn); background: var(--warn-soft); padding: 1px 6px; border-radius: 5px; }
.bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar.gold > i { background: var(--gold-deep); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; font-size: 13px; }
.note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.avatar { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; color: #fff; }
.a-fareed { background: #1f5243; } .a-chatgpt { background: #2f6f5e; } .a-codex { background: #3d4a8a; } .a-claude { background: #b8683f; } .a-auditor { background: #6b5b8a; } .a-boss { background: #a8884c; } .a-system { background: #5b635e; }

/* tables */
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

/* KPI tiles */
.kpi { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .f { font-size: 11.5px; color: var(--faint); }
.kpi.alert { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.kpi.alert .v { color: var(--bad); }

/* hero */
.hero { background: radial-gradient(120% 140% at 100% 0%, #1f5243 0%, #102C24 55%, #0b1f19 100%); color: #F8F4EA; border-radius: 18px; padding: 24px 26px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(214,187,133,.18), transparent 65%); pointer-events: none; }
.hero h2 { font-family: var(--display); font-weight: 400; font-size: 26px; color: #fff; }
.hero p { color: #c6d3cb; margin: 6px 0 0; max-width: 60ch; }
.hero .stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.hero .stats div { display: flex; flex-direction: column; }
.hero .stats b { font-size: 22px; font-variant-numeric: tabular-nums; color: #D6BB85; font-weight: 800; }
.hero .stats span { font-size: 11.5px; color: #9fb3a8; letter-spacing: .04em; }
.ring { position: relative; width: 150px; height: 150px; z-index: 1; }
.ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font-size: 28px; font-weight: 800; display: block; color: #fff; font-variant-numeric: tabular-nums; }
.ring .c span { font-size: 11px; color: #9fb3a8; }

/* action list */
.action { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.action:last-child { border-bottom: 0; }
.action .body { flex: 1; min-width: 220px; }
.action .body b { display: block; }
.action .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 5px; font-size: 12px; color: var(--muted); }
.action .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.sev { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.sev.bad { background: var(--bad); } .sev.warn { background: var(--warn); } .sev.info { background: var(--info); } .sev.ok { background: var(--ok); }

/* agents */
.agent { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.agent .hd { display: flex; gap: 10px; align-items: center; }
.agent .hd b { display: block; font-size: 14px; }
.agent .hd span { font-size: 11.5px; color: var(--muted); }
.agent .row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.agent .row span:first-child { color: var(--muted); }
.agent .now { font-size: 12.5px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.lane { background: var(--surface-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 150px; scroll-snap-align: start; min-width: 0; }
.lane h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; display: flex; gap: 6px; align-items: center; padding: 2px 4px 4px; }
.lane h3 .n { margin-left: auto; font-family: var(--mono); color: var(--muted); }
.lane h3 small { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.kc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 11px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.kc b { font-size: 13px; }
.kc .foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }

/* comms */
.comms { display: grid; grid-template-columns: 230px minmax(0,1fr) 280px; min-height: 620px; }
.ch-list { border-right: 1px solid var(--border); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.ch-list button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 13px; }
.ch-list button.on { background: var(--accent-soft); font-weight: 700; }
.ch-list button .n { margin-left: auto; font-size: 11px; color: var(--muted); }
.ch-list .lbl { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.msgs { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 620px; }
.msg { display: flex; gap: 10px; }
.msg .bd { min-width: 0; flex: 1; }
.msg .who { display: flex; gap: 8px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.msg .who b { font-size: 13px; }
.msg .txt { margin-top: 4px; font-size: 13.5px; }
.msg .att { margin-top: 6px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 5px 9px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); }
.mt-BRIEF { background: var(--info-soft); color: var(--info); } .mt-ACK { background: var(--ok-soft); color: var(--ok); } .mt-BLOCKER { background: var(--bad-soft); color: var(--bad); } .mt-UPDATE { background: var(--idle-soft); color: var(--idle); } .mt-HANDOFF { background: var(--gold-soft); color: var(--gold-text); } .mt-EVIDENCE { background: var(--ok-soft); color: var(--ok); } .mt-APPROVAL { background: var(--warn-soft); color: var(--warn); }
.composer { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.composer .r { display: flex; gap: 8px; flex-wrap: wrap; }
.composer textarea { width: 100%; min-height: 64px; resize: vertical; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; background: var(--bg); }
.composer select { border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; background: var(--surface); font-size: 12.5px; }
.ctx { border-left: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; gap: 14px; font-size: 12.5px; }
.ctx h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* catalogue */
.prod { overflow: hidden; display: flex; flex-direction: column; }
.prod .sw { aspect-ratio: 4/3; max-width: 100%; position: relative; display: grid; place-items: end start; padding: 10px; }
.prod .sw svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.prod .bd { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod .bd b { font-size: 13.5px; }
.prod .pr { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prod .price { font-weight: 800; font-variant-numeric: tabular-nums; }

/* misc */
.list { display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.li:last-child { border-bottom: 0; }
.li .body { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.ladder { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 4px; }
.ladder div { padding: 9px 8px; border-radius: 8px; font-size: 11.5px; }
.ladder b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: 0 12px; }
.tabs button { border: 0; background: none; padding: 10px 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--gold-deep); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 4px 11px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--emerald); color: var(--ivory); border-color: var(--emerald); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-family: var(--ui); font-size: 11px; }
.chart .grid-l { stroke: var(--border); }
.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--emerald); color: var(--ivory); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 50; }
.banner { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 11px; background: var(--gold-soft); color: var(--gold-text); font-size: 13px; flex-wrap: wrap; }
.banner b { color: var(--text); }
.scrim { display: none; }

@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g-main { grid-template-columns: minmax(0,1fr); } .comms { grid-template-columns: 200px minmax(0,1fr); } .ctx { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 272px; height: auto; transform: translateX(-100%); transition: transform .2s ease; padding-top: calc(20px + env(safe-area-inset-top, 0px)); padding-left: calc(12px + env(safe-area-inset-left, 0px)); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; }
  .menu-btn { display: inline-grid; }
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .content { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 60px; }
  .g2, .g3 { grid-template-columns: minmax(0,1fr); }
  .hero { grid-template-columns: minmax(0,1fr); }
  .comms { grid-template-columns: minmax(0,1fr); }
  .ch-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .ch-list .lbl { display: none; }
  .ch-list button { white-space: nowrap; }
  .ladder { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .top .hide-sm { display: none; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: minmax(0,1fr); } .ph h1 { font-size: 25px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Additions for the live app (auth, forms, modal, loading, empty states) ---------- */
[hidden] { display: none !important; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top, 0px)) 16px 24px; background: radial-gradient(120% 90% at 50% 0%, #1f5243 0%, #102C24 60%, #0b1f19 100%); }
.auth-card { width: 100%; max-width: 420px; padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-brand { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.auth-brand b { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--gold-text); letter-spacing: .04em; display: block; line-height: 1.1; }
.auth-brand span { font-size: 10.5px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.auth-card h1 { font-family: var(--display); font-weight: 400; font-size: 26px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin: -6px 0 0; }
.auth-card .btn.primary { justify-content: center; padding: 10px 14px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 12.5px; text-decoration: underline; }
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.field.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.field .hint { font-weight: 500; color: var(--faint); font-size: 11.5px; }
.in { border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; background: var(--bg); color: var(--text); font-size: 14px; font-weight: 500; width: 100%; min-width: 0; }
textarea.in { min-height: 76px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-err { color: var(--bad); background: var(--bad-soft); padding: 8px 11px; border-radius: 9px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.bad.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
dialog.modal { border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(10,18,15,.55); }
.modal-f { display: flex; flex-direction: column; max-height: calc(100vh - 50px); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-h h2 { flex: 1; font-size: 16px; font-weight: 700; }
.modal-b { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-a { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px dashed var(--gold-deep); border-radius: 9px; padding: 10px 12px; word-break: break-all; user-select: all; }
.side-logout { margin-top: 10px; display: inline-flex; gap: 6px; align-items: center; background: none; border: 1px solid rgba(214,187,133,.28); color: var(--side-text); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.side-logout svg { width: 14px; height: 14px; }
.side-logout:hover { border-color: #D6BB85; color: #fff; }
.skel { background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 40%, var(--surface)), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 12px; min-height: 18px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.prod .sw img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prod .sw .pill { position: relative; z-index: 1; }
a.tag { text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.kc .acts { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-sel { border: 1px solid var(--border); border-radius: 7px; padding: 3px 6px; background: var(--surface); font-size: 12px; max-width: 100%; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.btn:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.toast.err { background: var(--bad); color: #fff; }
.links { display: flex; flex-direction: column; gap: 3px; font-size: 12px; word-break: break-all; }
@media (max-width: 520px) { .form-row { grid-template-columns: minmax(0,1fr); } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
