/* PatrolBot console: readable first. 16px base, strong contrast, status always shown as text + colour. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --brand: #1d4ed8;
  --brand-ink: #ffffff;
  --brand-soft: #e8efff;
  --crit: #c81e1e;
  --crit-soft: #fde8e8;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok: #047857;
  --ok-soft: #d1fae5;
  --info: #1d4ed8;
  --info-soft: #e0eaff;
  --neutral-soft: #eef2f6;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --radius: 12px;
  --sidebar: 240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121b2d; --surface-2: #0f1828; --text: #e8eef7; --muted: #a9b6c9; --faint: #6b7a90;
    --border: #22304a; --border-strong: #31415f; --brand: #5b8cff; --brand-ink: #0b1220; --brand-soft: #1a2747;
    --crit: #ff6b6b; --crit-soft: #3a1820; --warn: #f5b041; --warn-soft: #36291a; --ok: #3ddc97; --ok-soft: #12302a;
    --info: #7aa2ff; --info-soft: #1a2747; --neutral-soft: #1a2436; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121b2d; --surface-2: #0f1828; --text: #e8eef7; --muted: #a9b6c9; --faint: #6b7a90;
  --border: #22304a; --border-strong: #31415f; --brand: #5b8cff; --brand-ink: #0b1220; --brand-soft: #1a2747;
  --crit: #ff6b6b; --crit-soft: #3a1820; --warn: #f5b041; --warn-soft: #36291a; --ok: #3ddc97; --ok-soft: #12302a;
  --info: #7aa2ff; --info-soft: #1a2747; --neutral-soft: #1a2436; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--brand); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: .875rem; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 700; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; flex: none;
}
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-weight: 550;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav .count {
  margin-left: auto; background: var(--crit); color: #fff; border-radius: 999px; padding: 0 8px;
  font-size: .8rem; font-weight: 700; min-width: 22px; text-align: center;
}
.sidebar-foot { margin-top: auto; display: grid; gap: 6px; padding: 8px 4px 0; border-top: 1px solid var(--border); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 500; flex-wrap: wrap;
}
.topbar .title { font-weight: 700; font-size: 1.15rem; }
.topbar .spacer { flex: 1; }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; color: var(--muted); }
.conn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.conn.bad::before { background: var(--crit); }
.content { padding: 24px 28px 48px; display: grid; gap: 20px; }

.mobile-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav {
    display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; background: var(--surface);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 600; scrollbar-width: none;
  }
  .mobile-nav a {
    flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted);
    font-weight: 600; font-size: .95rem; border: 1px solid var(--border); display: inline-flex; gap: 6px; align-items: center;
  }
  .mobile-nav a[aria-current="page"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
  .topbar { padding: 12px 16px; position: static; }
  .content { padding: 16px 16px 40px; }
}

/* ---------- Building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2 { font-size: 1.05rem; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .spacer { flex: 1; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; } .kpi .value { font-size: 1.6rem; }
}
.kpi { padding: 16px 18px; display: grid; gap: 2px; }
.kpi .label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.kpi .value { font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .sub { color: var(--muted); font-size: .875rem; }
.kpi.crit { border-color: var(--crit); background: var(--crit-soft); }
.kpi.crit .value { color: var(--crit); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  font-size: .95rem; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 42px;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 6px 12px; font-size: .875rem; min-height: 34px; }
.btn.lg { padding: 12px 22px; font-size: 1.05rem; min-height: 50px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .82rem;
  font-weight: 700; white-space: nowrap; background: var(--neutral-soft); color: var(--muted);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.crit { background: var(--crit-soft); color: var(--crit); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .big { font-size: 2rem; }

/* ---------- Alerts ---------- */
.alert-list { display: grid; gap: 12px; }
.alert {
  border: 1px solid var(--border); border-left: 6px solid var(--warn); border-radius: 10px; padding: 14px 16px;
  background: var(--surface); display: grid; gap: 8px;
}
.alert.critical { border-left-color: var(--crit); }
.alert.open.critical { background: var(--crit-soft); animation: pulse 2s ease-in-out infinite; }
.alert.acked { border-left-color: var(--ok); opacity: .9; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--crit) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .alert.open.critical { animation: none; } }
.alert-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.alert-title { font-size: 1.1rem; font-weight: 750; }
.alert-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.timeline { color: var(--muted); line-height: 1.6; }
.timeline b { color: var(--text); font-weight: 650; }
.alert-summary { font-size: 1rem; }
.notes { border-left: 3px solid var(--border-strong); padding-left: 10px; display: grid; gap: 2px; font-size: .9rem; color: var(--muted); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; background: var(--surface-2); }

/* ---------- Sites board ---------- */
.site-list { display: grid; gap: 10px; }
.site-row { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.site-row .line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.site-row .line.small { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.site-row .line.small svg { flex: none; margin-top: 2px; }
.site-row .name { font-weight: 700; font-size: 1.02rem; }
.progress { height: 10px; border-radius: 999px; background: var(--neutral-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.progress.warn > span { background: var(--warn); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .82rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.chip.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); font-weight: 600; }

.feed { display: grid; }
.feed-item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); font-size: .94rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-item time { color: var(--muted); font-variant-numeric: tabular-nums; }

.map { height: 340px; border-radius: 0 0 var(--radius) var(--radius); z-index: 0; }
.map.tall { height: 320px; border-radius: 10px; border: 1px solid var(--border); }
.map-fallback { padding: 24px; color: var(--muted); text-align: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.inactive td { color: var(--faint); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--surface-2); }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.bar-cell .progress { flex: 1; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: start; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-weight: 650; font-size: .92rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=date], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; flex-wrap: wrap; justify-self: start; align-self: start; }
.segmented button { font: inherit; font-weight: 600; padding: 8px 14px; background: var(--surface); color: var(--muted); border: 0; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--border-strong); }
.segmented button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.method-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.method-card { border: 2px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; display: grid; gap: 4px; }
.method-card input { position: absolute; opacity: 0; pointer-events: none; }
.method-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.method-card b { font-size: 1rem; }
.method-card span { color: var(--muted); font-size: .85rem; }
.error-text { color: var(--crit); font-weight: 600; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { font: inherit; font-weight: 650; padding: 10px 16px; border: 0; background: none; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- Modal & toast ---------- */
dialog.modal {
  border: 1px solid var(--border); border-radius: 14px; padding: 0; width: min(620px, calc(100vw - 24px));
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); max-height: calc(100vh - 32px);
}
dialog.modal::backdrop { background: rgba(10, 15, 25, .55); }
dialog.modal.wide { width: min(880px, calc(100vw - 24px)); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px 20px; overflow: auto; max-height: calc(100vh - 190px); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; }
.secret { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px dashed var(--border-strong); padding: 10px 12px; border-radius: 8px; word-break: break-all; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 2000; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.toast.error { background: var(--crit); color: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(440px, 100%); padding: 28px; display: grid; gap: 18px; }

/* ---------- Routing ---------- */
.ladder { display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.step .when { font-weight: 650; }
@media (max-width: 640px) { .step { grid-template-columns: 1fr auto; } .step .when { grid-column: 1 / -1; } }

/* ---------- Reports ---------- */
.daily-chart { display: flex; gap: 6px; align-items: flex-end; height: 160px; padding: 10px 4px 0; overflow-x: auto; }
.daily-chart .col { flex: 1 0 28px; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: flex-end; height: 100%; }
.daily-chart .bar { width: 100%; max-width: 36px; background: var(--ok); border-radius: 6px 6px 0 0; min-height: 2px; }
.daily-chart .bar.warn { background: var(--warn); } .daily-chart .bar.crit { background: var(--crit); } .daily-chart .bar.none { background: var(--neutral-soft); }
.daily-chart .lbl { font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* ---------- Schedule editor ---------- */
fieldset.sched { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; min-width: 0; }
fieldset.sched legend { font-weight: 700; padding: 0 6px; }
.windows { display: grid; gap: 8px; }
.window-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.day-toggles { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.day { font: inherit; font-weight: 650; font-size: .85rem; min-width: 44px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); cursor: pointer; }
.day[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.time-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.time-field input, input[type=time] { width: auto; min-height: 40px; padding: 6px 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; }
.time-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; font-weight: 650; color: var(--text); padding: 4px 6px 4px 12px; }
.time-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .85rem; padding: 2px 6px; border-radius: 6px; }
.time-chip button:hover { background: var(--crit-soft); color: var(--crit); }

/* Control-room board: five questions */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.board-q { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border-left: 5px solid var(--ok); }
.board-q.warn { border-left-color: var(--warn); }
.board-q.crit { border-left-color: var(--crit); background: var(--crit-soft, rgba(220, 38, 38, .06)); }
.board-q .label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.board-q .value { font-size: 1.45rem; font-weight: 800; }
.board-q .sub { font-size: .85rem; color: var(--muted); }
/* Attention queue */
.attention { display: flex; flex-direction: column; }
.att-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; border-top: 1px solid var(--border); }
.att-item:first-child { border-top: 0; }
.att-item .att-body { flex: 1; min-width: 0; }
.att-item.critical { background: var(--crit-soft, rgba(220, 38, 38, .06)); }
@media (max-width: 640px) { .att-item { flex-direction: column; gap: 6px; } }
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr 1fr; gap: 8px; }
  .board-q { padding: 10px 12px; }
  .board-q .value { font-size: 1.1rem; }
  .board-q .sub { display: none; }
  .board-q:last-child { grid-column: 1 / -1; }
}

/* Wizard */
.wz-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 12px 20px 0; flex-wrap: wrap; }
.wz-steps li { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--faint); font-weight: 600; }
.wz-steps li + li::before { content: ''; width: 18px; height: 1px; background: var(--border); }
.wz-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); font-size: .8rem; }
.wz-steps li.current { color: var(--text); } .wz-steps li.current span { background: var(--brand); border-color: var(--brand); color: #fff; }
.wz-steps li.done span { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.invite-box { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.invite-box .qr svg { width: 180px; height: 180px; background: #fff; border-radius: 8px; }
.secret { font: 700 1.6rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
@media (max-width: 640px) { .invite-box { grid-template-columns: 1fr; } }
/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.sup-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; cursor: pointer; }
.sup-card.open { grid-column: 1 / -1; cursor: default; }
.sup-top { display: flex; gap: 12px; align-items: flex-start; }
.sup-score { margin-left: auto; text-align: right; } .sup-score b { display: block; font-size: 1.8rem; line-height: 1; }
.sup-stats { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }

/* The hidden attribute always wins over layout classes (.form, .btn, …). */
[hidden] { display: none !important; }
.btn-row select { width: auto; }

/* Terms acceptance (first console use) */
.login .card.terms { width: min(620px, 100%); }
.terms .notice { background: var(--surface-2, rgba(127,127,127,.08)); border-radius: 10px; padding: 12px 14px; line-height: 1.5; max-height: 46vh; overflow: auto; }
.terms .notice ul { margin: 8px 0; padding-left: 20px; }
.terms .notice p { margin: 6px 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* Sign-up links */
.signup-intro { display: flex; gap: 16px; align-items: center; padding: 16px; flex-wrap: wrap; }
.signup-intro p { flex: 1 1 360px; }
.section-title { font-size: 1rem; margin: 18px 16px 8px; display: flex; gap: 8px; align-items: center; }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn, #b45309); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }

/* Sign-in */
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
button.link { background: none; border: 0; padding: 4px 0; color: var(--brand); font: inherit; font-size: .92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.code-input { font-size: 1.6rem !important; letter-spacing: .3em; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mfa-choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.mfa-choice .check { align-items: flex-start; }
.totp-setup { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 12px; }
.totp-setup .qr svg { width: 150px; height: 150px; background: #fff; border-radius: 8px; display: block; }
.totp-setup .key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; user-select: all; }
@media (max-width: 520px) { .totp-setup { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.console-box { padding: 14px; display: grid; gap: 10px; }
.console-head { display: flex; gap: 8px; align-items: center; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.terms .danger-note { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); color: var(--text); max-height: none; }
