
/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #16181d;
  --ink-2: #5b616e;
  --ink-3: #868d99;
  --line: #e2e5ea;
  --brand: #2f5bea;
  --brand-ink: #ffffff;
  --brand-soft: #eaf0ff;
  --ok: #0f7a52;
  --ok-soft: #e4f5ee;
  --warn: #8a5a00;
  --warn-soft: #fdf1dc;
  --danger: #a32222;
  --danger-soft: #fdeaea;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --nav-w: 232px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f25;
    --surface-2: #23272f;
    --ink: #eceef2;
    --ink-2: #a8aeba;
    --ink-3: #7d8492;
    --line: #2c313a;
    --brand: #6c8dff;
    --brand-ink: #0d1016;
    --brand-soft: #1e2740;
    --ok: #4ecf9e;
    --ok-soft: #143129;
    --warn: #e3b25f;
    --warn-soft: #34291356;
    --danger: #f3888a;
    --danger-soft: #3a1c1e;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; font-weight: 640; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .96rem; }
p { margin: 0 0 .9em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: var(--mono); font-size: .86em; }
code { background: var(--surface-2); padding: .12em .38em; border-radius: 5px; }
pre { margin: 0; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem;
}
.skip:focus { left: 0; }

.muted { color: var(--ink-2); }
.small { font-size: .84rem; }
.wrap { overflow-wrap: anywhere; }

/* ── Shell ───────────────────────────────────────────────────────────────── */
.shell { min-height: 100vh; }

.navtoggle { position: absolute; opacity: 0; pointer-events: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .7rem;
  height: 54px; padding: 0 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: -.02em; }
.env-chip {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  background: var(--warn-soft); color: var(--warn);
  padding: .16rem .42rem; border-radius: 5px;
}
.spacer { margin-left: auto; }

.account { position: relative; }
.account > summary {
  display: flex; align-items: center; gap: .5rem; cursor: pointer;
  padding: .25rem .4rem; border-radius: 8px; list-style: none;
}
.account > summary::-webkit-details-marker { display: none; }
.account > summary:hover { background: var(--surface-2); }
.avatar {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  font-size: .7rem; font-weight: 700;
}
.account-name { font-size: .88rem; font-weight: 560; }
@media (max-width: 560px) { .account-name { display: none; } }

.account .menu {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30;
  min-width: 16rem; padding: .35rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(16,24,40,.14);
}
.menu-head { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.menu-head strong { display: block; font-size: .9rem; }
.menu-head span { font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.menu-section {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); font-weight: 680; padding: .5rem .6rem .2rem;
}
.menu-item {
  display: block; width: 100%; text-align: left;
  padding: .42rem .6rem; border: 0; border-radius: 7px;
  background: none; color: var(--ink); font-size: .88rem;
}
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.is-current { color: var(--brand); font-weight: 620; }
.menu-item small { color: var(--ink-3); font-weight: 400; }

.ws { padding: .1rem .65rem .8rem; }
.ws-name { display: block; font-weight: 640; font-size: .95rem; }
.ws-role { font-size: .76rem; color: var(--ink-3); text-transform: capitalize; }

.flash {
  border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1rem;
  font-size: .9rem; border: 1px solid currentColor; overflow-wrap: anywhere;
}
.flash.tone-ok { background: var(--ok-soft); color: var(--ok); }
.flash.tone-warn { background: var(--warn-soft); color: var(--warn); }
.flash.tone-danger { background: var(--danger-soft); color: var(--danger); }

.burger {
  display: inline-flex; padding: .35rem; margin-left: -.35rem;
  border-radius: 7px; cursor: pointer; color: var(--ink-2);
}
.burger svg { width: 22px; height: 22px; fill: currentColor; }
.burger:hover { background: var(--surface-2); }

.sidebar {
  position: fixed; top: 54px; bottom: 0; left: 0; width: var(--nav-w);
  padding: 1rem .7rem; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .18s ease;
}
.navtoggle:checked ~ .sidebar { transform: none; }

.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar a {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .65rem; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: .92rem;
}
.sidebar a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sidebar a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar svg { width: 17px; height: 17px; fill: currentColor; flex: none; opacity: .85; }

.plan-badge {
  margin-top: 1rem; padding: .6rem .7rem; border-radius: var(--radius);
  background: var(--surface-2); font-size: .82rem;
}
.plan-badge { display: block; color: var(--ink-2); }
.plan-badge:hover { text-decoration: none; background: var(--brand-soft); }
.plan-badge.tone-warn { background: var(--warn-soft); color: var(--warn); }
.plan-badge.tone-danger { background: var(--danger-soft); color: var(--danger); }
.plan-badge strong { display: block; font-size: .9rem; color: var(--ink); }
.plan-badge.tone-warn strong, .plan-badge.tone-danger strong { color: inherit; }

.main { padding: 1.1rem 1rem 3rem; }

@media (min-width: 900px) {
  .burger { display: none; }
  .sidebar { transform: none; }
  .main { margin-left: var(--nav-w); padding: 1.6rem 1.8rem 4rem; }
  .topbar { padding-left: 1.4rem; }
}

.page-head { margin-bottom: 1.2rem; display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-start; }
.page-head > div { flex: 1 1 18rem; }
.page-head .sub { margin: 0; color: var(--ink-2); }

/* ── Cards, tiles ────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.1rem; margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
.card > h2 { margin-bottom: .8rem; }

.two-col { display: grid; gap: 1.1rem; }
@media (min-width: 1040px) { .two-col { grid-template-columns: 1.4fr 1fr; } }

.tiles { display: grid; gap: .8rem; margin-bottom: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: .9rem 1rem; box-shadow: var(--shadow);
}
.tile-label { font-size: .8rem; color: var(--ink-2); }
.tile-value { font-size: 1.7rem; font-weight: 680; letter-spacing: -.02em; margin: .1rem 0; }
.tile-hint { font-size: .78rem; color: var(--ink-3); }

.banner {
  border-radius: var(--radius); padding: .75rem .9rem; margin-bottom: 1rem;
  font-size: .9rem; border: 1px solid transparent;
}
.banner.ok { background: var(--ok-soft); color: var(--ok); border-color: currentColor; }
.banner.warn { background: var(--warn-soft); color: var(--warn); border-color: currentColor; }
.banner.danger { background: var(--danger-soft); color: var(--danger); border-color: currentColor; }
.banner a { color: inherit; text-decoration: underline; }

.empty { text-align: center; padding: 2.4rem 1rem; color: var(--ink-2); }
.empty h3 { color: var(--ink); font-size: 1.05rem; }
.empty.tone-danger h3 { color: var(--danger); }
.empty p { max-width: 46ch; margin: 0 auto 1rem; }

.field-error {
  background: var(--danger-soft); color: var(--danger);
  border-radius: var(--radius); padding: .6rem .8rem; font-size: .9rem;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
label { display: block; font-size: .85rem; font-weight: 560; color: var(--ink-2); margin-bottom: .7rem; }
label small { display: block; font-weight: 400; color: var(--ink-3); margin-top: .22rem; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%; margin-top: .3rem; padding: .52rem .65rem;
  font: inherit; font-size: .92rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
textarea { resize: vertical; min-height: 4.5rem; }
input:disabled, select:disabled { opacity: .55; }

.row-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.row-form label { margin-bottom: 0; flex: 0 1 15rem; }
.row-form label.grow { flex: 1 1 20rem; }
.stack-form { max-width: 34rem; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.form-actions { margin-top: .4rem; }

button { font: inherit; cursor: pointer; }
.btn-primary, .btn-secondary, .btn-danger-quiet {
  display: inline-block; padding: .52rem 1rem; border-radius: 8px;
  font-size: .9rem; font-weight: 580; border: 1px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); text-decoration: none; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); text-decoration: none; }
.btn-danger-quiet { background: none; color: var(--danger); border-color: transparent; }
.btn-danger-quiet:hover { background: var(--danger-soft); }
.small.btn-primary, .btn-secondary.small, .btn-danger-quiet.small { padding: .3rem .6rem; font-size: .82rem; }

.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.filters input, .filters select { width: auto; min-width: 8.5rem; margin-top: 0; }
.filters input[type=search] { flex: 1 1 14rem; }

/* ── Pills, tags, badges ─────────────────────────────────────────────────── */
.pill, .tag {
  display: inline-block; font-size: .74rem; font-weight: 620;
  padding: .12rem .45rem; border-radius: 5px; vertical-align: middle;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.quiet { background: var(--surface-2); color: var(--ink-2); }
.badge {
  display: inline-block; font-size: .74rem; font-weight: 620;
  padding: .12rem .45rem; border-radius: 5px; vertical-align: middle;
  background: var(--surface-2); color: var(--ink-2); text-transform: capitalize;
}
.badge.role-owner { background: var(--brand-soft); color: var(--brand); }
.badge.role-admin { background: var(--brand-soft); color: var(--brand); }
.badge.role-billing, .badge.role-readonly { background: var(--warn-soft); color: var(--warn); }
.tag { background: var(--brand-soft); color: var(--brand); }
.tag.removable { border: 0; cursor: pointer; font-family: inherit; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -.3rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.data th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); font-weight: 640; padding: .45rem .5rem; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr.inactive { opacity: .55; }
table.data td.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
table.data td.actions select { width: auto; min-width: 7rem; margin: 0; }

dl.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; font-size: .89rem; }
dl.kv dt { color: var(--ink-2); }
dl.kv dd { margin: 0; }

.facts { margin: 0; padding-left: 1.1rem; font-size: .89rem; color: var(--ink-2); }
.facts li { margin-bottom: .35rem; }
.facts strong { color: var(--ink); }

/* ── Meters ──────────────────────────────────────────────────────────────── */
.meter { margin-bottom: .75rem; font-size: .85rem; }
.meter-head { display: flex; justify-content: space-between; margin-bottom: .22rem; }
.meter-track { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter-fill.tone-warn { background: var(--warn); }
.meter-fill.tone-danger { background: var(--danger); }

/* ── Sites ───────────────────────────────────────────────────────────────── */
.site-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.site-card header { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.site-card header h2 { margin: 0; flex: 1; }
.site-card.highlight { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.site-meta { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; font-size: .86rem; margin: 0 0 .9rem; }
.site-meta dt { color: var(--ink-2); }
.site-meta dd { margin: 0; overflow-wrap: anywhere; }
.copyable { cursor: pointer; user-select: all; }

details.install, details.settings { border-top: 1px solid var(--line); padding-top: .7rem; margin-top: .5rem; }
details summary { cursor: pointer; font-weight: 580; font-size: .89rem; padding: .2rem 0; }
.snippet {
  background: var(--surface-2); border-radius: 8px; padding: .7rem;
  overflow-x: auto; font-size: .78rem; line-height: 1.45; margin-bottom: .6rem;
}
.snippet code { background: none; padding: 0; }

.steps { margin: 0; padding-left: 1.3rem; }
.steps li { margin-bottom: .45rem; }
.steps li.done { color: var(--ink-3); text-decoration: line-through; }

/* ── Inbox ───────────────────────────────────────────────────────────────── */
.conv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.conv-list > li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.conv-list > li.unread { border-left: 3px solid var(--brand); }
.conv-list a { display: block; padding: .75rem .9rem; color: inherit; }
.conv-list a:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius); }
.conv-top { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .3rem; }
.conv-site { font-weight: 620; font-size: .88rem; }
.conv-top time { margin-left: auto; font-size: .78rem; color: var(--ink-3); }
.conv-preview {
  margin: 0; font-size: .89rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.conv-foot { margin: .3rem 0 0; font-size: .78rem; color: var(--ink-3); }
.conv-list.compact a { padding: .5rem .2rem; display: flex; gap: .6rem; align-items: baseline; }
.conv-list.compact > li { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.conv-list.compact > li:last-child { border-bottom: 0; }
.conv-list.compact .conv-preview { flex: 1; -webkit-line-clamp: 1; }

.conv-view { display: grid; gap: 1.1rem; }
@media (min-width: 1040px) { .conv-view { grid-template-columns: 1fr 320px; align-items: start; } }
.conv-header { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.conv-header h1 { margin: 0; font-size: 1.2rem; }
.back { font-size: .88rem; }

.msg-translation {
  margin-top: 4px;
  font-size: 13px;
}

.msg-translation summary {
  cursor: pointer;
  opacity: 0.6;
}

.msg-translation summary:hover {
  opacity: 1;
}

.msg-translation .msg-body {
  margin-top: 4px;
  opacity: 0.85;
}

ul.plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

ul.plain > li {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

ul.plain > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.transcript {
  list-style: none; margin: 0 0 1rem; padding: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  display: grid; gap: .8rem; max-height: 60vh; overflow-y: auto;
}
.msg { max-width: 82%; }
.msg-visitor { justify-self: start; }
.msg-agent, .msg-ai { justify-self: end; text-align: right; }
.msg-system { justify-self: center; text-align: center; font-size: .8rem; color: var(--ink-3); }
.msg-meta { font-size: .74rem; color: var(--ink-3); margin-bottom: .2rem; display: flex; gap: .5rem; }
.msg-agent .msg-meta, .msg-ai .msg-meta { justify-content: flex-end; }
.msg-body {
  padding: .55rem .8rem; border-radius: 12px; font-size: .92rem;
  background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; text-align: left;
}
.msg-agent .msg-body { background: var(--brand); color: var(--brand-ink); }

.reply-form textarea { margin-bottom: .5rem; }
.canned-bar { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .6rem; }
.chip {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px;
  padding: .18rem .6rem; font-size: .8rem; color: var(--ink-2);
}
.chip:hover { background: var(--brand-soft); color: var(--brand); }

.tag-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; align-items: center; }
.notes { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .5rem; }
.notes li { background: var(--warn-soft); border-radius: 8px; padding: .5rem .65rem; }
.note-meta { font-size: .74rem; color: var(--warn); margin-bottom: .15rem; }
.note-body { font-size: .87rem; white-space: pre-wrap; }

.canned-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.canned-list li { border-bottom: 1px solid var(--line); padding-bottom: .55rem; }
.canned-list p { margin: .2rem 0 0; }

.invite-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .45rem; }
.invite-list li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .88rem; }

/* ── Charts ──────────────────────────────────────────────────────────────── */
.chart {
  display: flex; align-items: flex-end; gap: 2px; height: 150px;
  padding: .5rem 0; border-bottom: 1px solid var(--line);
}
.chart .bar {
  flex: 1; min-width: 3px; min-height: 2px;
  background: var(--brand); border-radius: 3px 3px 0 0; opacity: .85;
}
.chart .bar:hover { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-3); padding-top: .3rem; }

.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .88rem; }
.bar-list li { display: grid; grid-template-columns: 8rem 1fr auto; gap: .6rem; align-items: center; }
.bar-track { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); }

/* ── Billing ─────────────────────────────────────────────────────────────── */
.plan-now { display: flex; flex-wrap: wrap; gap: .8rem; align-items: baseline; margin-bottom: .9rem; }
.plan-name { font-size: 1.3rem; font-weight: 680; margin-right: .5rem; }
.plan-price { margin-left: auto; font-size: 1.3rem; font-weight: 680; }

.plan-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.plan-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1rem;
  display: flex; flex-direction: column; background: var(--surface);
}
.plan-card.current { border-color: var(--brand); background: var(--brand-soft); }
.plan-cost { font-size: 1.5rem; font-weight: 680; margin: 0 0 .7rem; letter-spacing: -.02em; }
.plan-features { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .85rem; display: grid; gap: .28rem; flex: 1; }
.plan-features li { padding-left: 1.2rem; position: relative; }
.plan-features li::before { content: "•"; position: absolute; left: .25rem; color: var(--ink-3); }
.plan-features li.yes::before { content: "✓"; color: var(--ok); }
.plan-features li.no { color: var(--ink-3); }
.plan-features li.no::before { content: "—"; color: var(--ink-3); }
.plan-current { font-size: .85rem; font-weight: 620; color: var(--brand); margin: 0; }
.downgrade-warning {
  background: var(--warn-soft); color: var(--warn); border-radius: 8px;
  padding: .5rem .65rem; font-size: .8rem; display: grid; gap: .25rem;
}

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1.2rem; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 25rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: 1.2rem; }
.auth-sub { color: var(--ink-2); font-size: .92rem; margin-bottom: 1.2rem; }
.auth-form { margin-top: 1rem; }
.auth-form .btn-primary { width: 100%; margin-top: .3rem; }
.auth-alt { font-size: .86rem; color: var(--ink-2); margin: .8rem 0 0; text-align: center; }
.note {
  background: var(--surface-2); border-radius: 8px; padding: .6rem .7rem;
  font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere;
}

/* ── Width / height utilities ────────────────────────────────────────────── */
/* Meters and chart bars need a computed size, and every dashboard page is
   served under style-src 'self' with no unsafe-inline, so a style attribute
   would simply be dropped by the browser. The sizes are enumerated here in 2%
   steps and the markup picks a class: 102 rules is a small price for not
   opening unsafe-inline on every page in the product. */
.w-0 { width: 0%; }
.w-2 { width: 2%; }
.w-4 { width: 4%; }
.w-6 { width: 6%; }
.w-8 { width: 8%; }
.w-10 { width: 10%; }
.w-12 { width: 12%; }
.w-14 { width: 14%; }
.w-16 { width: 16%; }
.w-18 { width: 18%; }
.w-20 { width: 20%; }
.w-22 { width: 22%; }
.w-24 { width: 24%; }
.w-26 { width: 26%; }
.w-28 { width: 28%; }
.w-30 { width: 30%; }
.w-32 { width: 32%; }
.w-34 { width: 34%; }
.w-36 { width: 36%; }
.w-38 { width: 38%; }
.w-40 { width: 40%; }
.w-42 { width: 42%; }
.w-44 { width: 44%; }
.w-46 { width: 46%; }
.w-48 { width: 48%; }
.w-50 { width: 50%; }
.w-52 { width: 52%; }
.w-54 { width: 54%; }
.w-56 { width: 56%; }
.w-58 { width: 58%; }
.w-60 { width: 60%; }
.w-62 { width: 62%; }
.w-64 { width: 64%; }
.w-66 { width: 66%; }
.w-68 { width: 68%; }
.w-70 { width: 70%; }
.w-72 { width: 72%; }
.w-74 { width: 74%; }
.w-76 { width: 76%; }
.w-78 { width: 78%; }
.w-80 { width: 80%; }
.w-82 { width: 82%; }
.w-84 { width: 84%; }
.w-86 { width: 86%; }
.w-88 { width: 88%; }
.w-90 { width: 90%; }
.w-92 { width: 92%; }
.w-94 { width: 94%; }
.w-96 { width: 96%; }
.w-98 { width: 98%; }
.w-100 { width: 100%; }
.h-0 { height: 0%; }
.h-2 { height: 2%; }
.h-4 { height: 4%; }
.h-6 { height: 6%; }
.h-8 { height: 8%; }
.h-10 { height: 10%; }
.h-12 { height: 12%; }
.h-14 { height: 14%; }
.h-16 { height: 16%; }
.h-18 { height: 18%; }
.h-20 { height: 20%; }
.h-22 { height: 22%; }
.h-24 { height: 24%; }
.h-26 { height: 26%; }
.h-28 { height: 28%; }
.h-30 { height: 30%; }
.h-32 { height: 32%; }
.h-34 { height: 34%; }
.h-36 { height: 36%; }
.h-38 { height: 38%; }
.h-40 { height: 40%; }
.h-42 { height: 42%; }
.h-44 { height: 44%; }
.h-46 { height: 46%; }
.h-48 { height: 48%; }
.h-50 { height: 50%; }
.h-52 { height: 52%; }
.h-54 { height: 54%; }
.h-56 { height: 56%; }
.h-58 { height: 58%; }
.h-60 { height: 60%; }
.h-62 { height: 62%; }
.h-64 { height: 64%; }
.h-66 { height: 66%; }
.h-68 { height: 68%; }
.h-70 { height: 70%; }
.h-72 { height: 72%; }
.h-74 { height: 74%; }
.h-76 { height: 76%; }
.h-78 { height: 78%; }
.h-80 { height: 80%; }
.h-82 { height: 82%; }
.h-84 { height: 84%; }
.h-86 { height: 86%; }
.h-88 { height: 88%; }
.h-90 { height: 90%; }
.h-92 { height: 92%; }
.h-94 { height: 94%; }
.h-96 { height: 96%; }
.h-98 { height: 98%; }
.h-100 { height: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
