/* Gatehouse design system. One stylesheet for the console and auth pages. */
@font-face { font-family: "Geist"; src: url("/static/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #f6f7f9;
  --bg-sunken: #eef0f3;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --sidebar: #fbfbfc;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #16191d;
  --text-2: #475467;
  --text-3: #8a94a6;
  --hover: #f1f3f6;
  --active: #e9f5f2;

  --brand: #0d9488;
  --brand-strong: #0b7c72;
  --brand-soft: #e6f6f3;
  --brand-ink: #0a5f57;
  --ring: rgba(13, 148, 136, .35);

  --green: #12a150;   --green-soft: #e7f7ee;
  --amber: #c27803;   --amber-soft: #fdf4e3;
  --red: #dc3545;     --red-soft: #fdecee;
  --blue: #2f6fed;    --blue-soft: #eaf1fe;
  --violet: #7c4ddb;  --violet-soft: #f2edfd;
  --orange: #e5630f;  --orange-soft: #fdf0e7;
  --gray-soft: #f0f2f5;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 48px -12px rgba(16, 24, 40, .22), 0 4px 12px rgba(16, 24, 40, .06);
  --radius: 12px;
  --radius-sm: 8px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1012; --bg-sunken: #0a0c0e; --surface: #14181b; --surface-2: #181d20; --sidebar: #111417;
    --border: #252b30; --border-strong: #343b42; --text: #e8ebed; --text-2: #a9b2bb; --text-3: #6f7a85;
    --hover: #1c2226; --active: #11302c; --brand: #2dd4bf; --brand-strong: #5eead4; --brand-soft: #0f2e2a; --brand-ink: #7af0dc; --ring: rgba(45, 212, 191, .35);
    --green: #3ccf7e; --green-soft: #12301f; --amber: #f2b33d; --amber-soft: #33270f; --red: #f26b75; --red-soft: #3a1a1e;
    --blue: #6d9cff; --blue-soft: #16244a; --violet: #a888f5; --violet-soft: #251c40; --orange: #fb8b4a; --orange-soft: #36200f; --gray-soft: #1e2428;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 3px rgba(0,0,0,.5); --shadow-lg: 0 24px 56px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1012; --bg-sunken: #0a0c0e; --surface: #14181b; --surface-2: #181d20; --sidebar: #111417;
  --border: #252b30; --border-strong: #343b42; --text: #e8ebed; --text-2: #a9b2bb; --text-3: #6f7a85;
  --hover: #1c2226; --active: #11302c; --brand: #2dd4bf; --brand-strong: #5eead4; --brand-soft: #0f2e2a; --brand-ink: #7af0dc; --ring: rgba(45, 212, 191, .35);
  --green: #3ccf7e; --green-soft: #12301f; --amber: #f2b33d; --amber-soft: #33270f; --red: #f26b75; --red-soft: #3a1a1e;
  --blue: #6d9cff; --blue-soft: #16244a; --violet: #a888f5; --violet-soft: #251c40; --orange: #fb8b4a; --orange-soft: #36200f; --gray-soft: #1e2428;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 3px rgba(0,0,0,.5); --shadow-lg: 0 24px 56px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 13.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
[hidden] { display: none !important; }
::selection { background: var(--ring); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; overflow-y: auto; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6 0%, #0d9488 45%, #155e75 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 2px 6px rgba(13,148,136,.35); flex: none; }
.logo svg { width: 18px; height: 18px; }
.workspace b { display: block; font-size: 14px; font-weight: 650; line-height: 1.2; }
.workspace span { font-size: 12px; color: var(--text-3); }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; position: relative; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--active); color: var(--brand-ink); font-weight: 600; }
.nav a.on svg { color: var(--brand); }
.nav .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.helpcard { border-radius: 12px; padding: 12px; background: linear-gradient(140deg, var(--brand-soft), var(--surface)); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.helpcard b { color: var(--text); display: block; margin-bottom: 2px; font-size: 13px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-weight: 500; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; }
.searchbtn { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 34px; min-width: 280px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); cursor: pointer; box-shadow: var(--shadow-sm); }
.searchbtn:hover { border-color: var(--border-strong); }
.searchbtn kbd { margin-left: auto; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3); }
.live { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); animation: pulse 2.4s infinite; }

.live.bad i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.mobile-only { display: none; }

.content { padding: 28px; max-width: 1320px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.page-head p { color: var(--text-2); margin-top: 4px; max-width: 70ch; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none; box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--hover); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(13,148,136,.3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
:root[data-theme="dark"] .btn.primary, :root:not([data-theme="light"]) .btn.primary { color: #fff; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--gray-soft); color: var(--text-2); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.orange { background: var(--orange-soft); color: var(--orange); }
.chip.brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip.outline { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.chip.mono { font-family: var(--mono); font-weight: 500; font-size: 11.5px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; }
.badge.soft { background: var(--amber-soft); color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; font-weight: 650; color: #fff; flex: none; box-shadow: 0 0 0 2px var(--surface); letter-spacing: .02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div > b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person > div > span { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head p { color: var(--text-3); font-size: 12.5px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 550; font-size: 12.5px; }
.kpi .label .ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; }
.kpi .value { font-size: 28px; font-weight: 680; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .sub { font-size: 12px; color: var(--text-3); }
.kpi svg.spark { position: absolute; right: 16px; top: 54px; width: 92px; height: 32px; }
.kpi .sub { position: relative; z-index: 1; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
table.t th { position: sticky; top: 0; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .1s; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t .muted { color: var(--text-3); font-size: 12.5px; }
tr.clickable { cursor: pointer; }
.group-row td { background: var(--bg-sunken); font-weight: 600; color: var(--text-2); font-size: 12.5px; padding: 8px 16px; }

.bar-inline { display: flex; align-items: center; gap: 10px; }
.bar-inline .track { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; min-width: 60px; }
.bar-inline .fill { height: 100%; border-radius: 99px; background: var(--brand); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label-text { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.with-icon { position: relative; }
.with-icon svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.with-icon .input { padding-left: 32px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-sunken); border: 1px solid var(--border); gap: 2px; }
.seg button, .seg label { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: var(--text-2); font-weight: 550; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.seg button.on, .seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg label { padding: 0; }
.seg label span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 7px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

.check-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--surface-2); }
.check-list label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.check-list label:hover { background: var(--hover); }
.check-list input { accent-color: var(--brand); width: 15px; height: 15px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chips label { cursor: pointer; }
.pick-chips input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chips span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--text-2); font-weight: 550; font-size: 12.5px; background: var(--surface); }
.pick-chips input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.pick-chips input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--brand); outline-offset: 2px; }

.cond-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 150px minmax(0, 1.2fr) 34px; gap: 8px; align-items: center; }

/* ---------- misc blocks ---------- */
.code { background: var(--bg-sunken); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; margin: 0; color: var(--text); }
.copybox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }
.copybox code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; color: var(--text); }
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 11px; border: 1px solid; font-size: 13px; }
.banner.green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--text); }
.banner.amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); color: var(--text); }
.banner.red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--text); }
.banner.blue { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--text); }
.banner svg { margin-top: 1px; }
.banner.green svg { color: var(--green); } .banner.amber svg { color: var(--amber); } .banner.red svg { color: var(--red); } .banner.blue svg { color: var(--blue); }
.banner b { font-weight: 650; }
.banner .grow { flex: 1; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .art { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty h4 { font-size: 15px; font-weight: 650; color: var(--text); }
.empty p { max-width: 46ch; font-size: 13px; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .meta { color: var(--text-3); font-size: 12px; }
.feed-item { display: flex; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); font-size: 13px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .when { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.feed-item .ev-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .on { color: var(--text); border-bottom-color: var(--brand); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .with-icon { flex: 1; min-width: 220px; max-width: 360px; }

/* approval cards */
.approval { display: grid; grid-template-columns: minmax(0, 1fr) 280px; border-bottom: 1px solid var(--border); }
.approval:last-child { border-bottom: 0; }
.approval .body { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.approval .side { padding: 18px; border-left: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.approval .headline { font-size: 14px; }
.approval .headline b { font-weight: 650; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--amber); font-weight: 600; font-size: 12.5px; }

/* server cards */
.server { display: flex; flex-direction: column; }
.server .top { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; }
.server .sico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.server .stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); }
.server .stats div { padding: 10px 18px; border-right: 1px solid var(--border); }
.server .stats div:last-child { border-right: 0; }
.server .stats b { display: block; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.server .stats span { font-size: 11.5px; color: var(--text-3); }
.server .foot { display: flex; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.statusdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.statusdot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.statusdot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.statusdot.gray { background: var(--text-3); box-shadow: 0 0 0 3px var(--gray-soft); }

/* diff */
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff .code.old { border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.diff .code.new { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: color-mix(in srgb, var(--red-soft) 50%, var(--bg-sunken)); }

/* steps */
.steps { display: grid; gap: 14px; counter-reset: s; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.step::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 12.5px; }
.step b { display: block; margin-bottom: 6px; }

/* ---------- dialogs: drawers, modals, palette ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(10, 14, 18, .42); backdrop-filter: blur(2px); }
dialog.drawer { position: fixed; inset: 0 0 0 auto; height: 100vh; width: min(560px, 100vw); margin: 0; background: var(--surface); box-shadow: var(--shadow-lg); border-left: 1px solid var(--border); }
dialog.drawer[open] { display: flex; flex-direction: column; animation: slide .2s ease-out; }
dialog.drawer.wide { width: min(760px, 100vw); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 17px; font-weight: 650; }
.drawer-head p { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer form { display: contents; }
dialog.modal { margin: auto; width: min(440px, calc(100vw - 32px)); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
dialog.modal[open] { animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.modal-body h3 { font-size: 16px; font-weight: 650; }
.modal-body p { color: var(--text-2); }
dialog.palette { margin: 12vh auto auto; width: min(620px, calc(100vw - 32px)); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; height: 52px; border: 0; background: transparent; outline: none; font-size: 15px; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 10px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text); text-decoration: none; }
.palette-item .hint { margin-left: auto; }
.palette-item.sel, .palette-item:hover { background: var(--active); text-decoration: none; }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 11.5px; background: var(--surface-2); }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 11px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; animation: toastin .2s ease-out; }
.toast.err { background: var(--red); color: #fff; }
.toast svg { flex: none; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--border); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: fixed; pointer-events: none; z-index: 120; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(900px 600px at 20% 10%, #1b8f84 0%, transparent 55%), radial-gradient(700px 500px at 90% 90%, #164e63 0%, transparent 60%), #071a1a; color: #e6fffb; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .brandline { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.auth-art h2 { font-size: 34px; line-height: 1.12; letter-spacing: -.03em; font-weight: 650; max-width: 16ch; }
.auth-art p { color: #a7d9d1; font-size: 15px; max-width: 44ch; margin-top: 12px; }
.flowviz { display: grid; gap: 10px; max-width: 440px; }
.flowviz .row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); font-size: 13px; }
.flowviz .row .chip { margin-left: auto; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 26px; font-weight: 680; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-2); }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.consent-perms { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.consent-perms div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.consent-perms svg { color: var(--brand); margin-top: 2px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .grid.two, .grid.halves { grid-template-columns: minmax(0, 1fr); } .approval { grid-template-columns: minmax(0, 1fr); } .approval .side { border-left: 0; border-top: 1px solid var(--border); } }
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .mobile-only { display: inline-grid; }
  .searchbtn { min-width: 0; }
  .searchbtn span, .searchbtn kbd, .live { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .diff { grid-template-columns: minmax(0, 1fr); }
  .cond-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* =====================================================================
   Enterprise pass: calmer surfaces, neutral metadata, status as dot + text
   ===================================================================== */
:root { --radius: 10px; --radius-sm: 7px; }
.card { box-shadow: none; }
.chip { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 500; border-radius: 6px; }
.chip.green, .chip.amber, .chip.red, .chip.blue, .chip.violet, .chip.orange, .chip.brand { border-color: transparent; }
.chip.blue, .chip.violet { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.status.green::before { background: var(--green); } .status.green { color: var(--text); }
.status.amber::before { background: var(--amber); } .status.amber { color: var(--amber); }
.status.red::before { background: var(--red); } .status.red { color: var(--red); }
.status.gray::before { background: var(--border-strong); } .status.gray { color: var(--text-3); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-3); font-size: 12.5px; }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- accordion (servers and their tools) ---------- */
.acc-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: visible; }
.acc { border-bottom: 1px solid var(--border); }
.acc:last-child { border-bottom: 0; }
.acc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; }
.acc.open > .acc-head { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.acc:first-child .acc-head { border-radius: var(--radius) var(--radius) 0 0; }
.acc-toggle { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr); align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; color: inherit; }
.acc-toggle .chev { color: var(--text-3); transition: transform .15s; }
.acc.open .acc-toggle .chev { transform: rotate(90deg); }
.acc-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.acc-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-title b { font-size: 14px; font-weight: 650; }
.acc-sub { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.acc-right { display: flex; align-items: center; gap: 18px; }
.acc-stat { text-align: right; min-width: 64px; }
.acc-stat b { display: block; font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.acc-stat span { font-size: 11.5px; color: var(--text-3); }
.acc-body { background: var(--surface); }
.acc:last-child .acc-body { border-radius: 0 0 var(--radius) var(--radius); }
.acc-error { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--red); }
.bulkbar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface); min-height: 46px; flex-wrap: wrap; }
.bulkbar .count { font-size: 12.5px; color: var(--text-3); margin-right: auto; }
.bulkbar .count b { color: var(--text); }
.cb { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
table.t td.sel, table.t th.sel { width: 40px; padding-right: 0; }
table.t.compact td { padding-top: 9px; padding-bottom: 9px; }
.tool-name { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text); }
.tool-desc { font-size: 12.5px; color: var(--text-3); max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-row td { text-align: center; color: var(--text-3); padding: 18px; }

/* ---------- overflow menu ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 7px; font-size: 13px; color: var(--text); cursor: pointer; text-decoration: none; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--hover); text-decoration: none; }
.menu-pop .danger { color: var(--red); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

/* ---------- large dialog (policy editor) ---------- */
dialog.modal-xl { margin: auto; width: min(1200px, calc(100vw - 32px)); height: min(860px, calc(100vh - 40px)); background: var(--surface); border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
dialog.modal-xl[open] { display: flex; flex-direction: column; animation: pop .16s ease-out; }
dialog.modal-xl form { display: contents; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: 400px minmax(0, 1fr); }
.split > .pane { overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.split > .pane + .pane { border-left: 1px solid var(--border); background: var(--bg); }
.picker-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.picker-head .with-icon { flex: 1; min-width: 220px; }
.pick-row td:first-child { width: 40px; }
.pick-row.hit .tool-name { background: var(--amber-soft); border-radius: 4px; }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } .split > .pane + .pane { border-left: 0; border-top: 1px solid var(--border); } .acc-right .acc-stat { display: none; } }
.acc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 196px; }
.acc-actions form { display: contents; }

.me .who { flex: 1 1 auto; }
.me .icon-btn { width: 26px; height: 26px; }
.me { gap: 6px; }

/* ---------- groups ---------- */
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar + .avatar { margin-left: -4px; }
.avatar-stack .more { margin-left: 4px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.check-list.tall { max-height: 340px; }
.check-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.row-link:hover b { text-decoration: underline; }
.row-link svg { color: var(--text-3); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); text-decoration: none; margin-bottom: 6px; }
.back-link svg { transform: rotate(180deg); }
.back-link:hover { color: var(--text); }
.who-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.who-pick .label-text { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; display: flex; justify-content: space-between; }
.who-pick .check-list { max-height: 210px; }
.who-summary { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 760px) { .who-pick { grid-template-columns: minmax(0, 1fr); } }

/* ---------- tiles: server and group icons ---------- */
.tile { width: 34px; height: 34px; flex: none; border-radius: 9px; display: inline-grid; place-items: center; color: var(--tile-fg); background: var(--tile-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-fg) 18%, transparent); }
.tile .i { width: 17px; height: 17px; stroke-width: 1.9; }
.tile.sm { width: 26px; height: 26px; border-radius: 7px; }
.tile.sm .i { width: 14px; height: 14px; }
.tone-teal { --tile-fg: var(--brand); --tile-bg: var(--brand-soft); }
.tone-blue { --tile-fg: var(--blue); --tile-bg: var(--blue-soft); }
.tone-violet { --tile-fg: var(--violet); --tile-bg: var(--violet-soft); }
.tone-amber { --tile-fg: var(--amber); --tile-bg: var(--amber-soft); }
.tone-rose { --tile-fg: var(--red); --tile-bg: var(--red-soft); }
.tone-green { --tile-fg: var(--green); --tile-bg: var(--green-soft); }
.tone-orange { --tile-fg: var(--orange); --tile-bg: var(--orange-soft); }
.tone-slate { --tile-fg: var(--text-2); --tile-bg: var(--gray-soft); }

/* ---------- floating selection bar ---------- */
.selbar { position: fixed; left: 50%; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 2px; padding: 6px; max-width: calc(100vw - 32px); flex-wrap: wrap; justify-content: center;
  background: #15191d; color: #f2f4f6; border-radius: 12px; box-shadow: 0 18px 50px -10px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06) inset; transform: translateX(-50%); animation: selbar-in .18s ease-out; }
.selbar[hidden] { display: none; }
@keyframes selbar-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.selbar-count { padding: 0 10px 0 8px; font-size: 13px; color: #aab3bc; white-space: nowrap; }
.selbar-count b { color: #fff; font-weight: 650; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-right: 4px; border-radius: 6px; background: var(--brand); color: #04231f; font-size: 12px; }
.selbar-sep { width: 1px; height: 20px; background: rgba(255,255,255,.12); margin: 0 4px; }
.selbar-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #e9edf0; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; list-style: none; }
.selbar-btn::-webkit-details-marker { display: none; }
.selbar-btn:hover, .selbar-menu[open] > .selbar-btn { background: rgba(255,255,255,.1); color: #fff; }
.selbar-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.selbar-btn.danger { color: #ff9aa2; }
.selbar-btn.danger:hover { background: rgba(242,107,117,.16); color: #ffc2c7; }
.selbar-btn.icon-only { width: 32px; padding: 0; justify-content: center; color: #aab3bc; }
.selbar-menu { position: relative; }
.selbar-pop { position: absolute; bottom: calc(100% + 10px); left: 0; min-width: 200px; max-height: 300px; overflow-y: auto; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.selbar-pop button { text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.selbar-pop button:hover { background: var(--hover); }
.selbar-pop .muted { padding: 8px 10px; font-size: 13px; }
body.has-selbar .content { padding-bottom: 110px; }
tr:has(> td [data-bulk-item]:checked) td { background: var(--brand-soft); }
@media (max-width: 760px) { .selbar { bottom: 12px; } .selbar-btn { padding: 0 8px; } }
@media (prefers-reduced-motion: reduce) { .selbar { animation: none; } }
.side-links { display: flex; flex-direction: column; gap: 1px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.side-links a, .side-links button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; }
.side-links a:hover, .side-links button:hover { background: var(--hover); color: var(--text); }
.side-links span { flex: 1; }
.side-links .i { width: 16px; height: 16px; color: var(--text-3); }
.side-links .ext { width: 13px; height: 13px; }
.side-links kbd { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--surface); }
.selbar { width: max-content; flex-wrap: nowrap; }
@media (min-width: 861px) { .selbar { left: calc(50% + 124px); } }
@media (max-width: 860px) { .selbar { flex-wrap: wrap; width: auto; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .selbar { background: #232a30; box-shadow: 0 18px 50px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.1) inset; } }
:root[data-theme="dark"] .selbar { background: #232a30; box-shadow: 0 18px 50px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.1) inset; }

/* ---------- test connection ---------- */
.token-row { display: flex; gap: 8px; }
.token-row .input:first-child { flex: 1; min-width: 0; }
.token-row .token-as { width: auto; flex: none; font-size: 12.5px; }
@media (max-width: 560px) { .token-row { flex-direction: column; } .token-row .token-as { width: 100%; } }
.test-result { position: relative; display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.test-result.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.test-result.bad { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.test-result .tr-head { display: flex; align-items: flex-start; gap: 8px; color: var(--text); padding-right: 36px; }
.test-result .tr-head b { font-weight: 650; line-height: 1.4; }
.test-result.ok .tr-head svg { color: var(--green); flex: none; margin-top: 1px; }
.test-result.bad .tr-head svg { color: var(--red); flex: none; margin-top: 1px; }
.test-result .tr-hint { margin: 0; color: var(--text-2); line-height: 1.5; }
.test-result .tr-detail { display: grid; gap: 3px; }
.test-result .tr-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.test-result .tr-label:empty { display: none; }
.test-result code { font-size: 12px; white-space: pre-wrap; word-break: break-word; background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 7px; padding: 6px 8px; color: var(--text); }
.test-result .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.test-result > .btn { justify-self: start; }
.test-result .tr-ms { position: absolute; top: 12px; right: 14px; font-size: 11.5px; color: var(--text-3); }
.drawer-foot [data-test-connection] .spin, .test-result .spin { animation: gh-spin .8s linear infinite; }
@keyframes gh-spin { to { transform: rotate(360deg); } }
.acc-error { align-items: flex-start; line-height: 1.45; }
.acc-error > svg { flex: none; margin-top: 2px; }
.acc-error b { font-weight: 650; }
