/* Skorpion Health Licensing Admin — single stylesheet (CSP: no inline styles).
   Brand palette sampled directly from the official logo (src/PathoFixLIMS.App/Assets/
   skorpion-health-logo-transparent.png): a rich royal purple wordmark ("sKorpion") and a
   cyan/teal wordmark ("HEALTH"). --brand/--accent (with their -dark/-light steps) are the
   single source of truth for brand colour — every brand-coloured rule below reads one of
   them rather than a hard-coded hex, so the palette only ever needs to change here. */
:root {
  --brand: #7c3aed;        /* Skorpion Health primary — deep royal purple (logo wordmark) */
  --brand-dark: #6d28d9;
  --brand-light: #ede9fe;
  --accent: #00a3c0;       /* Skorpion Health accent — cyan/teal (logo wordmark) */
  --accent-dark: #027a91;
  --accent-light: #ccfbf1;
  --sidebar: #1e1147;      /* deep purple-black, not flat black — dominant sidebar branding */
  --sidebar-text: #c9c3e0;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --amber: #d97706;
  --amber-bg: #fef3c7;
  --green: #059669;
  --green-bg: #d1fae5;
  --orange: #ea580c;
  --orange-bg: #ffedd5;
  --gray-bg: #e5e7eb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30, 17, 71, .06), 0 4px 16px rgba(30, 17, 71, .05);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
code, .mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.inline { display: inline; }
.hidden, [hidden] { display: none !important; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
body { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: 0 0 240px; background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { width: 100%; max-width: 190px; height: auto; display: block; object-fit: contain; background: #fff; border-radius: 8px; padding: 8px 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; padding-left: 2px; }
.brand-text span { font-size: 12px; color: var(--sidebar-text); }
.sidebar nav { display: flex; flex-direction: column; padding: 12px; gap: 2px; flex: 1; }
.sidebar nav a { color: var(--sidebar-text); padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar-footer { padding: 16px 18px; font-size: 11.5px; color: #94a3b8; display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar .user { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 600; }
.user-role { font-size: 12px; color: var(--muted); background: var(--gray-bg); padding: 2px 8px; border-radius: 999px; }
.content { padding: 28px 32px 48px; max-width: 1400px; width: 100%; }
body.anon .main { align-items: center; justify-content: center; }
body.anon .content { max-width: 440px; }

/* ── Cards / grid ───────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-header h2 { font-size: 15px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.stat.accent { border-left: 4px solid var(--brand); }
.stat.warn { border-left: 4px solid var(--amber); }
.stat.danger { border-left: 4px solid var(--danger); }
.stat a { display: block; }

/* ── Dashboard ──────────────────────────────────────────────────────────── */
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 10px; }
.section-head .muted { font-size: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--text); min-width: 0; }
.kpi:hover { text-decoration: none; border-color: #cbd5e1; border-left-color: var(--brand); }
.kpi .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 22px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.accent { border-left-color: var(--brand); }
.kpi.green { border-left-color: var(--green); }
.kpi.warn { border-left-color: var(--amber); }
.kpi.danger { border-left-color: var(--danger); }
.kpi.orange { border-left-color: var(--orange); }
.kpi .split { display: flex; gap: 14px; }
.kpi .split a { color: var(--text); }
.kpi .split small { display: block; font-size: 11px; color: var(--muted); }
.kpi-section { margin-bottom: 22px; }
.pills { display: flex; gap: 6px; }
.pills a { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); }
.pills a:hover { text-decoration: none; color: var(--text); }
.pills a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chart { width: 100%; height: 170px; display: block; }
.chart .bar { fill: var(--brand); opacity: .85; }
.chart .bar:hover { opacity: 1; }
.chart .bar.alt { fill: var(--accent); }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart-labels { display: flex; margin-top: 4px; }
.chart-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.chart-total { font-size: 13px; color: var(--muted); margin-top: 6px; }
.chart-total strong { color: var(--text); }

/* ── Dashboard widgets (2 × 2 analytical layout) ───────────────────────── */
.dash-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -10px 0 18px; font-size: 13px; color: var(--muted); }
.dash-clock { font-size: 12.5px; white-space: nowrap; }
.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.widget { display: flex; flex-direction: column; min-width: 0; min-height: 420px; margin-bottom: 0; padding: 20px 22px 18px; }
.widget-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.widget-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.widget-title h2 { font-size: 16px; }
.widget-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.widget-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: var(--brand-light); color: var(--brand); }
.widget-icon svg { width: 20px; height: 20px; }
.widget-icon.green { background: var(--green-bg); color: var(--green); }
.widget-icon.blue { background: var(--accent-light); color: var(--accent-dark); }
.widget-icon.slate { background: #f1f0f5; color: #6b7280; }
.widget .btn-sm { padding: 5px 10px; font-size: 12px; }
.seg { display: flex; gap: 2px; padding: 3px; background: #f1f5f9; border-radius: 999px; flex: 0 0 auto; }
.seg a { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.active { background: var(--brand); color: #fff; }
.widget-primary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.widget-primary .value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.widget-primary .caption { font-size: 12.5px; color: var(--muted); }
.widget-primary .delta { font-size: 12.5px; font-weight: 600; color: var(--green); }

/* Trend charts: an axis column beside the plot; sizes are viewBox attributes (CSP: no inline styles). */
.trend { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.trend-axis { display: flex; flex-direction: column; justify-content: space-between; height: 200px; padding-top: 10px; font-size: 10.5px; color: var(--muted); text-align: right; }
.trend-axis span { line-height: 1; transform: translateY(-50%); white-space: nowrap; }
.trend-plot { min-width: 0; }
.trend-svg { width: 100%; height: 200px; display: block; }
.trend-svg .gridline { stroke: #eef2f6; stroke-width: 1; }
.trend-svg .area { fill: var(--brand); opacity: .12; }
.trend-svg .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-svg .point { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.trend-svg .bar { fill: var(--accent); opacity: .85; }
.trend-svg .bar:hover { opacity: 1; }
.trend-empty { flex: 1; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed var(--border); border-radius: 10px; background: #fafbfc; color: var(--muted); font-size: 12.5px; text-align: center; padding: 16px; }
.trend-empty span { font-weight: 600; font-size: 13.5px; color: #4b5563; }
.trend-note { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* Compact label/value context strips at the foot of a widget. */
.context-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.context-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.context-row > a, .context-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text); padding: 0 14px; border-left: 1px solid var(--border); }
.context-row > :first-child { border-left: 0; padding-left: 0; }
.context-row > a:hover { text-decoration: none; }
.context-row > a:hover .v { color: var(--brand); }
.context-row .k { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.context-row .v { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.context-row .hint { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.orange { background: var(--orange); }
.dot.red { background: var(--danger); }
.dot.gray { background: #9ca3af; }
.dot.purple { background: var(--brand); }
.dot.blue { background: var(--accent); }

/* License portfolio: ring + legend; zeros stay muted, the expiring row is the one that must catch the eye. */
.portfolio { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: center; margin-bottom: 14px; }
.donut { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut .track { fill: none; stroke: #eef2f6; stroke-width: 14; }
.donut .slice { fill: none; stroke-width: 14; stroke: #cbd5e1; }
.donut .slice.green { stroke: var(--green); }
.donut .slice.blue { stroke: var(--accent); }
.donut .slice.amber { stroke: var(--amber); }
.donut .slice.gray { stroke: #9ca3af; }
.donut .slice.red { stroke: var(--danger); }
.donut .slice.purple { stroke: var(--brand); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center strong { font-size: 28px; font-weight: 700; line-height: 1; }
.donut-center span { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: 13px; border: 1px solid transparent; }
.legend li a:hover { background: #f8fafc; text-decoration: none; }
.legend .name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.legend .nums { display: flex; align-items: center; gap: 10px; }
.legend strong { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 18px; text-align: right; }
.legend strong.zero { color: #9ca3af; font-weight: 600; }
.legend .pct { display: inline-block; min-width: 46px; text-align: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #f1f5f9; color: #6b7280; }
.legend .pct.green { background: var(--green-bg); color: var(--green); }
.legend .pct.blue { background: var(--accent-light); color: var(--accent-dark); }
.legend .pct.amber { background: var(--amber-bg); color: var(--amber); }
.legend .pct.orange { background: var(--orange-bg); color: var(--orange); }
.legend .pct.gray { background: var(--gray-bg); color: #374151; }
.legend .pct.red { background: var(--danger-bg); color: var(--danger); }
.legend .pct.purple { background: var(--brand-light); color: var(--brand-dark); }
.legend li.expiring a { border-color: #fed7aa; background: #fffaf5; }
.legend li.expiring .name { font-weight: 600; }
.legend li.expiring.on a { background: #fff7ed; }
.legend li.expiring.on strong { color: var(--orange); }
.notice { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: #fafbfc; font-size: 12.5px; color: var(--muted); }
.notice strong { font-size: 13px; color: var(--text); }
.notice.ok { background: #f0fdf4; border-color: #bbf7d0; }
.notice.ok strong { color: #166534; }
.notice.warn { background: #fff7ed; border-color: #fed7aa; }
.notice.warn strong { color: #9a3412; }
a.notice:hover { text-decoration: none; filter: brightness(.98); }

/* Business activity: a compact timeline, one row per event. */
.feed { list-style: none; margin: 0; padding: 0; position: relative; }
.feed::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 2px; background: #eef2f6; }
.feed li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.feed li:last-child { border-bottom: 0; }
.feed .marker { position: relative; z-index: 1; display: block; width: 12px; height: 12px; margin: 4px 5px 0; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 4px #f1f5f9; }
.feed li.payment .marker { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.feed li.license .marker { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.feed li.customer .marker { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
.feed li.activation .marker { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-light); }
.feed li.revocation .marker { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.feed .body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.feed .title { font-weight: 600; font-size: 13px; color: var(--text); }
.feed .detail { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .when { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--text); white-space: nowrap; }
.feed .when small { font-size: 11px; color: #9ca3af; }
@media (max-width: 1100px) {
  .widgets { grid-template-columns: 1fr; }
  .widget { min-height: 0; }
  .portfolio { grid-template-columns: 1fr; }
  .context-row, .context-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .context-row > :nth-child(odd) { border-left: 0; padding-left: 0; }
}
.compact th, .compact td { padding: 7px 10px; font-size: 12.5px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.totals div { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.totals .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.totals .value { font-size: 17px; font-weight: 700; }
.required { color: var(--danger); font-weight: 700; }
.picker-results td { padding: 8px 10px; }
.customer-chip { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.customer-chip strong { font-size: 14px; }
fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px 4px; margin: 0 0 16px; }
fieldset legend { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 6px; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; background: #fafbfc; }
tr:hover td { background: #fbfcfd; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 180px 1fr; row-gap: 8px; column-gap: 12px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-gray { background: var(--gray-bg); color: #374151; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
label { display: block; margin-bottom: 12px; }
label > span, .field-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .03em; }
label em { font-weight: 400; text-transform: none; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; margin: 6px 0 14px; }
.checks label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; text-transform: none; }
.checks label span { text-transform: none; font-weight: 500; margin: 0; }
.help { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.validation-summary-errors ul, .field-validation-error { color: var(--danger); font-size: 12.5px; }
.validation-summary-errors ul { margin: 0 0 12px; padding-left: 18px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: var(--danger-bg); color: #991b1b; }
.alert-info { background: var(--brand-light); color: var(--brand-dark); }
.alert-warn { background: var(--amber-bg); color: #92400e; }
.alert-success { background: var(--green-bg); color: #065f46; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; background: var(--gray-bg); color: var(--text); white-space: nowrap; }
.btn:hover { filter: brightness(.97); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warn { background: var(--amber); color: #fff; }
.btn-ghost { background: transparent; border-color: #d1d5db; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; }
.toolbar label { margin: 0; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 240px; }
.toolbar .btn { align-self: end; }

/* ── Pager / empty / toast / dialog ─────────────────────────────────────── */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.pager-links { display: flex; align-items: center; gap: 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { font-size: 32px; margin-bottom: 8px; }
.toast { position: fixed; top: 18px; right: 24px; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 500; background: #fff; border-left: 4px solid var(--green); transition: opacity .5s; }
.toast-error { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--amber); }
.toast-info { border-left-color: var(--brand); }
.toast-hide { opacity: 0; }
.toast-close { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--muted); }
.dialog { border: 0; border-radius: 12px; padding: 0; width: 460px; max-width: 92vw; box-shadow: 0 20px 60px rgba(15,23,42,.35); }
.dialog::backdrop { background: rgba(15, 23, 42, .55); }
.dialog form { padding: 24px; }
.dialog h2 { margin-bottom: 8px; }
.dialog p { color: var(--muted); margin: 0 0 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ── Special ────────────────────────────────────────────────────────────── */
.code-reveal { background: var(--sidebar); color: var(--accent-light); padding: 18px 20px; border-radius: 10px; font-family: Consolas, monospace; font-size: 24px; letter-spacing: .12em; text-align: center; margin: 12px 0; }
.summary-box { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.login-card { margin-top: 10vh; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; text-align: center; }
.login-brand img { width: 100%; max-width: 260px; height: auto; object-fit: contain; }
.login-brand strong { font-size: 18px; display: block; }
.login-brand span { color: var(--muted); font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.timeline .when { color: var(--muted); font-size: 12px; }
.key-block { font-family: Consolas, monospace; font-size: 18px; letter-spacing: .15em; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; word-break: break-all; }

/* ── QR-code TOTP enrollment (Account → Enable Authenticator) ─────────────── */
.qr-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 4px 0 18px; padding: 24px; background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius); }
.qr-code { width: 240px; height: 240px; flex: 0 0 auto; padding: 14px; background: #fff; border-radius: 8px; box-shadow: var(--shadow); }
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr-account { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qr-account-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.qr-account-value { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 14px; font-weight: 600; color: var(--text); text-align: center; word-break: break-all; }

/* Native <details>/<summary> — no script needed, so it works within the page's own CSP. */
.disclosure { margin-top: 6px; }
.disclosure summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--brand); list-style: none; padding: 6px 0; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "▸"; display: inline-block; width: 14px; transition: transform .15s ease; }
.disclosure[open] summary::before { transform: rotate(90deg); }
.disclosure[open] summary { margin-bottom: 6px; color: var(--text); }
.disclosure ol { margin: 4px 0 0; padding-left: 20px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 600; }
.tabs a.active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.progress { height: 6px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); }
