/* ==========================================================================
   TPCC — TransactionPoint Control Center — design system
   --------------------------------------------------------------------------
   Visual language taken from the PFI Management designs: a deep navy
   sidebar whose active item is a white pill, white cards with an icon tile
   in their header, KPI tiles, underlined icon tabs, a side "Important"
   callout beside forms, and status pills.

   Light is the default (as in the designs); dark uses the same tokens.
   Status colours are never the brand accent, and no status is shown by
   colour alone: every pill carries a word.
   ========================================================================== */

:root,
[data-theme="light"] {
    color-scheme: light;

    --bg: #eef2f8;
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --surface-3: #edf2fa;
    --border: #e1e7f0;
    --border-strong: #cbd5e3;

    --text: #0e1a2f;
    --text-muted: #55657f;
    --text-faint: #8492a8;

    --accent: #1d5fe0;
    --accent-strong: #1748b0;
    --accent-soft: rgba(29, 95, 224, 0.09);
    --accent-ring: rgba(29, 95, 224, 0.28);
    --on-accent: #ffffff;
    --heading: #10306b;

    --nav-bg: linear-gradient(180deg, #0a1a36 0%, #0d2348 55%, #0a1a36 100%);
    --nav-text: #c7d3ea;
    --nav-heading: #6f84aa;
    --nav-hover: rgba(255, 255, 255, 0.07);
    --nav-active-bg: #ffffff;
    --nav-active-text: #0d2348;

    --ok: #0f8a47;
    --ok-soft: #e3f6eb;
    --info: #1d5fe0;
    --info-soft: #e6eefd;
    --warn: #b45309;
    --warn-soft: #fdf1dc;
    --bad: #c62828;
    --bad-soft: #fde8e8;
    --idle: #5b6b84;
    --idle-soft: #edf1f6;

    --shadow: 0 1px 2px rgba(14, 26, 47, 0.05), 0 6px 20px -10px rgba(14, 26, 47, 0.16);
    --shadow-lg: 0 24px 60px -18px rgba(10, 26, 54, 0.45);
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #080f1e;
    --surface: #0f1a2e;
    --surface-2: #132038;
    --surface-3: #182843;
    --border: #1f2f4e;
    --border-strong: #2b3f65;

    --text: #e5ecf8;
    --text-muted: #9aabc8;
    --text-faint: #6e7f9e;

    --accent: #5b9bff;
    --accent-strong: #84b4ff;
    --accent-soft: rgba(91, 155, 255, 0.13);
    --accent-ring: rgba(91, 155, 255, 0.35);
    --on-accent: #06111f;
    --heading: #cfe0ff;

    --nav-bg: linear-gradient(180deg, #050b17 0%, #081329 100%);
    --nav-text: #a9b8d6;
    --nav-heading: #5a6d92;
    --nav-hover: rgba(255, 255, 255, 0.05);
    --nav-active-bg: #1a2c4d;
    --nav-active-text: #ffffff;

    --ok: #3ddc84;
    --ok-soft: rgba(61, 220, 132, 0.12);
    --info: #6aa6ff;
    --info-soft: rgba(106, 166, 255, 0.13);
    --warn: #f5b544;
    --warn-soft: rgba(245, 181, 68, 0.13);
    --bad: #ff7272;
    --bad-soft: rgba(255, 114, 114, 0.13);
    --idle: #9aabc8;
    --idle-soft: rgba(154, 171, 200, 0.12);

    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 28px -14px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.8);
}

:root {
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --mono: "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    --r-sm: 6px;
    --r: 10px;
    --r-lg: 14px;
    --sidebar: 268px;
    --topbar: 64px;
}

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

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--heading); letter-spacing: -0.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); border-radius: var(--r-sm); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
    position: sticky; top: 0; height: 100vh;
    background: var(--nav-bg);
    color: var(--nav-text);
    display: flex; flex-direction: column;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: linear-gradient(135deg, #2f7bff 0%, #12b5a6 100%);
    box-shadow: 0 8px 18px -8px rgba(47, 123, 255, 0.9);
}
.brand-name { display: block; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; line-height: 1.1; }
.brand-sub { display: block; font-size: 11.5px; color: #8fa3c7; letter-spacing: 0.02em; }

.nav { padding: 6px 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.nav-heading { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--nav-heading); padding: 0 12px 6px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 9px;
    color: var(--nav-text); font-weight: 500; font-size: 14px;
}
.nav-item:hover { background: var(--nav-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 650; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.6); }
.nav-item .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); }
.nav-item.active .count { background: var(--accent-soft); color: var(--accent); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 22px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.08); }
.nav-sub .nav-item { padding: 6px 10px; font-size: 13px; }

.sidebar-foot { margin-top: auto; padding: 18px 20px 22px; font-size: 12px; color: #8195ba; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.sidebar-foot strong { color: #d5def0; font-weight: 600; }
.sidebar-tagline { font-size: 18px; font-weight: 800; line-height: 1.25; color: #e8eefb; margin-bottom: 10px; letter-spacing: -0.01em; }
.sidebar-tagline span { color: #5fd3c6; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    height: var(--topbar);
    display: flex; align-items: center; gap: 16px;
    padding: 0 28px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; }
.topbar-title strong { font-size: 15.5px; color: var(--heading); white-space: nowrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.crumbs a { color: var(--accent); }
.spacer { flex: 1; }

.search {
    display: flex; align-items: center; gap: 8px;
    width: min(360px, 32vw); padding: 8px 12px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text-faint);
}
.search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; font: inherit; }

.profile-chip {
    display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.avatar {
    width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
    background: linear-gradient(135deg, #1d5fe0, #12b5a6); color: #fff; font-weight: 700; font-size: 12.5px;
}
.profile-chip .who { display: flex; flex-direction: column; line-height: 1.15; }
.profile-chip .who strong { font-size: 13px; }
.profile-chip .who span { font-size: 11.5px; color: var(--text-muted); }

.content { padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 20px; max-width: 1560px; width: 100%; }

.demo-ribbon {
    display: flex; align-items: center; gap: 10px; padding: 9px 28px;
    background: repeating-linear-gradient(135deg, var(--warn-soft), var(--warn-soft) 14px, transparent 14px, transparent 28px), var(--surface);
    border-bottom: 1px solid var(--border); color: var(--warn); font-weight: 600; font-size: 13px;
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; }
.head-icon {
    flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent) 0%, #1aa59a 120%); color: #fff;
    box-shadow: 0 12px 24px -14px var(--accent);
}
.page-head h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.page-head p { color: var(--text-muted); margin-top: 4px; font-size: 14.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Tabs ---------- */
.tabs {
    display: flex; gap: 4px; overflow-x: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 0 10px; box-shadow: var(--shadow);
}
.tab {
    display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px; white-space: nowrap;
    color: var(--text-muted); font-weight: 550; border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--accent); text-decoration: none; }
.tab.active { color: var(--heading); border-bottom-color: var(--accent); font-weight: 700; }
.tab .badge { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); font-weight: 700; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 16.5px; font-weight: 750; }
.card-head .sub { font-size: 12.5px; color: var(--text-muted); }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card-body { padding: 18px 20px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.kpi-icon { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.kpi-icon.blue { background: linear-gradient(135deg, #2f7bff, #1d5fe0); }
.kpi-icon.green { background: linear-gradient(135deg, #22c06b, #0f8a47); }
.kpi-icon.amber { background: linear-gradient(135deg, #f7b23b, #d97706); }
.kpi-icon.teal { background: linear-gradient(135deg, #22c3b4, #0e8f86); }
.kpi-icon.red { background: linear-gradient(135deg, #f05a5a, #c62828); }
.kpi-label { font-size: 13px; color: var(--text-muted); font-weight: 550; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--heading); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* ---------- Pills and chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.info { color: var(--info); background: var(--info-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.idle { color: var(--idle); background: var(--idle-soft); }
.pill.plain::before { display: none; }
.pill.updating::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); white-space: nowrap; }
.chip.k-backend { color: #6d28d9; background: color-mix(in srgb, #6d28d9 9%, var(--surface)); border-color: color-mix(in srgb, #6d28d9 22%, var(--surface)); }
.chip.k-frontend { color: #0e7490; background: color-mix(in srgb, #0e7490 9%, var(--surface)); border-color: color-mix(in srgb, #0e7490 22%, var(--surface)); }
.chip.k-gateway { color: #b45309; background: color-mix(in srgb, #b45309 9%, var(--surface)); border-color: color-mix(in srgb, #b45309 22%, var(--surface)); }
.chip.k-tpdirect { color: #be185d; background: color-mix(in srgb, #be185d 9%, var(--surface)); border-color: color-mix(in srgb, #be185d 22%, var(--surface)); }
.chip.k-tpm { color: #1d5fe0; background: color-mix(in srgb, #1d5fe0 9%, var(--surface)); border-color: color-mix(in srgb, #1d5fe0 22%, var(--surface)); }
.chip.k-batch { color: #4338ca; background: color-mix(in srgb, #4338ca 9%, var(--surface)); border-color: color-mix(in srgb, #4338ca 22%, var(--surface)); }
.chip.k-lbm { color: #0f766e; background: color-mix(in srgb, #0f766e 9%, var(--surface)); border-color: color-mix(in srgb, #0f766e 22%, var(--surface)); }
[data-theme="dark"] .chip[class*="k-"] { filter: brightness(1.45) saturate(0.9); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13.5px;
    cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 8px 18px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn-dark { background: #0d2348; border-color: #0d2348; color: #fff; }
.btn-dark:hover { background: #10306b; color: #fff; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; border-color: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 8px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 650; color: var(--heading); }
.field .help { font-size: 12px; color: var(--text-faint); }
.input, select.input, textarea.input {
    width: 100%; padding: 9px 12px; font: inherit; font-size: 14px;
    color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-muted); }
.input.mono { font-family: var(--mono); font-size: 13px; }
.input.changed { border-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.input.invalid { border-color: var(--bad); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filters .field { min-width: 160px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 0.15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-ring); }
.switch input:disabled + .track { opacity: 0.5; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--heading); background: var(--surface-3); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a.rowlink { font-weight: 650; color: var(--heading); }

/* ---------- Callouts and banners ---------- */
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.callout .ci { flex: none; color: var(--info); margin-top: 1px; }
.callout h4 { font-size: 14px; margin-bottom: 4px; color: var(--heading); }
.callout p, .callout li { font-size: 13px; color: var(--text-muted); }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.warn .ci { color: var(--warn); }
.callout.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.callout.bad .ci { color: var(--bad); }
.callout.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.callout.ok .ci { color: var(--ok); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: var(--r); font-size: 13.5px; border: 1px solid; }
.banner.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.banner.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.banner .text { color: var(--text); }
.banner ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-muted); }
.banner .close { margin-left: auto; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 46px 20px; color: var(--text-muted); }
.empty .ei { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.empty h3 { font-size: 16px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(8, 16, 32, 0.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fade 0.15s ease-out; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); animation: rise 0.18s ease-out; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 16px; }
.modal-head .mi { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #0d2348; color: #fff; }
.modal-head .mi.danger { background: var(--bad); }
.modal-head .mi.warn { background: var(--warn); }
.modal-head h2 { font-size: 20px; font-weight: 800; }
.modal-head p { color: var(--text-muted); font-size: 13.5px; margin-top: 2px; }
.modal-body { padding: 4px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 10px; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

.diff { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.diff .side { padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.diff .side .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 2px; }
.diff .before { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--text-muted); }
.diff .after { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); font-weight: 650; }

/* ---------- Parameter rows ---------- */
.param { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 22px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.param:last-child { border-bottom: 0; }
.param.dirty { background: color-mix(in srgb, var(--warn-soft) 40%, transparent); }
.param-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--heading); font-size: 14.5px; }
.param-name { font-family: var(--mono); font-size: 12px; color: var(--text-faint); margin-top: 2px; word-break: break-all; }
.param-desc { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.param-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.param-meta .chip { font-weight: 550; }
.param-editor { display: flex; flex-direction: column; gap: 8px; }
.param-current { font-size: 12px; color: var(--text-muted); }
.param-current strong { color: var(--text); }
.advice { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--warn); }
.caution { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-muted); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 8px 10px; margin-top: 10px; }
details.usages { margin-top: 10px; font-size: 12.5px; }
details.usages summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.usages summary::-webkit-details-marker { display: none; }
details.usages ul { margin: 8px 0 0; padding: 10px 12px 10px 28px; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border); }
details.usages li { font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); word-break: break-all; }

.group-nav { position: sticky; top: calc(var(--topbar) + 16px); display: flex; flex-direction: column; gap: 2px; }
.group-nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 8px; color: var(--text-muted); font-weight: 550; font-size: 13.5px; }
.group-nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.group-nav a .chip { font-size: 11px; padding: 0 7px; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; color: var(--heading); text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); }

/* ---------- Settings editor ---------- */
.setting { display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr) auto; gap: 16px; align-items: start; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.setting:last-child { border-bottom: 0; }
.setting.dirty { background: color-mix(in srgb, var(--warn-soft) 45%, transparent); }
.setting.removed { opacity: 0.55; }
.setting.removed .input { text-decoration: line-through; }
.setting-key { font-family: var(--mono); font-size: 12.5px; font-weight: 650; color: var(--heading); word-break: break-all; }
.setting-title { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.setting-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 12px; }
.input-group { display: flex; gap: 6px; }
.input-group .input { flex: 1; }

.savebar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #0d2348; color: #fff; box-shadow: var(--shadow-lg); }
.savebar .grow { flex: 1; }
.savebar .btn { border-color: rgba(255, 255, 255, 0.25); }
.savebar .btn-ghost { color: #d7e2f7; }

/* ---------- Bank cards ---------- */
.bank-card { display: flex; flex-direction: column; }
.bank-card .card-head { border-bottom: 0; padding-bottom: 6px; }
.bank-avatar { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 16px; background: linear-gradient(135deg, #0d2348, #1d5fe0); text-transform: uppercase; }
.bank-meta { padding: 0 20px 14px; display: flex; flex-direction: column; gap: 10px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bank-actions { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.bank-actions a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-right: 1px solid var(--border); }
.bank-actions a:last-child { border-right: 0; }
.bank-actions a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 36px; gap: 12px; align-items: center; font-size: 13px; }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.bar span { display: block; height: 100%; }
.bar .ok { background: var(--ok); }
.bar .info { background: var(--info); }
.bar .warn { background: var(--warn); }
.bar .bad { background: var(--bad); }
.bar .idle { background: var(--idle); opacity: 0.5; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.region-list { display: flex; flex-direction: column; gap: 8px; }
.region { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.region .grow { flex: 1; min-width: 0; }

.timeline { display: flex; flex-direction: column; }
.timeline .item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 8px 0; font-size: 13px; }
.timeline .dot { width: 10px; height: 10px; border-radius: 999px; margin-top: 5px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline .dot.bad { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.timeline .dot.warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }

.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: grid; grid-template-columns: 22px 150px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.check .ct { font-weight: 650; }
.check.passed .ci { color: var(--ok); }
.check.warning .ci { color: var(--warn); }
.check.failed { background: var(--bad-soft); }
.check.failed .ci { color: var(--bad); }

.compare { display: grid; grid-template-columns: 150px repeat(2, minmax(0, 1fr)); font-size: 13px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.compare > div { padding: 8px 12px; border-bottom: 1px solid var(--border); min-width: 0; overflow-wrap: anywhere; }
.compare .h { background: var(--surface-3); font-weight: 700; color: var(--heading); font-size: 12px; }
.compare .k { color: var(--text-faint); }
.compare .diffv { color: var(--warn); font-weight: 700; }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #1aa59a); transition: width 0.4s; }

.scanbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.region-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; background: var(--surface); }
.region-toggle input { accent-color: var(--accent); }
.region-toggle.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 12px 20px; background: var(--bad); color: #fff; }
#blazor-error-ui .reload { color: #fff; font-weight: 700; margin-left: 10px; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media (max-width: 1200px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-side { grid-template-columns: minmax(0, 1fr); }
    .group-nav { position: static; }
}

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .grid-2, .grid-3, .kpis { grid-template-columns: minmax(0, 1fr); }
    .param, .setting { grid-template-columns: minmax(0, 1fr); }
    .search { display: none; }
    .content { padding: 18px 16px 40px; }
    .topbar { padding: 0 16px; }
}

/* FocusOnNavigate moves focus to the page title for screen readers; it needs no ring. */
h1:focus, h1:focus-visible { outline: none; box-shadow: none; }

/* A list of choices that keeps every choice visible (payment-type id lists). */
.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; max-height: 210px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); }
.multi.changed { border-color: var(--warn); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.multi-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.multi-item input { accent-color: var(--accent); }

/* Long addresses and keys wrap instead of pushing a panel wider than its column. */
.callout, .callout p, .callout li { overflow-wrap: anywhere; }

/* ==========================================================================
   Interbank Pulse (banks/{id}/pulse). Series colours are categorical slots
   validated for both themes (blue volume, orange did-not-succeed; routes keep
   one colour each whatever their rank). Status stays in the status tokens and
   always carries its word.
   ========================================================================== */
.pulse {
    --s1: #2a78d6; --s1-strong: #1c5cab; --s1-soft: #b7d3f6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s0: #8492a8;
    --lv1: #cde2fb; --lv2: #86b6ef; --lv3: #3987e5; --lv4: #1c5cab; --lv-ink: #0e1a2f; --lv-ink-strong: #ffffff;
    display: flex; flex-direction: column; gap: 20px;
}
[data-theme="dark"] .pulse {
    --s1: #3987e5; --s1-strong: #86b6ef; --s1-soft: #184f95; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s0: #6e7f9e;
    --lv1: #184f95; --lv2: #256abf; --lv3: #3987e5; --lv4: #86b6ef; --lv-ink: #e5ecf8; --lv-ink-strong: #0b1a33;
}
.pulse .num { font-variant-numeric: tabular-nums; }
.pulse .ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse .pill.live::before { animation: pulse-beat 2s ease-in-out infinite; }
@keyframes pulse-beat { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse .pill.live::before { animation: none; } }

.pulse-bar, .pulse-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 2px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; }
.seg button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); background: transparent; border: 0; border-radius: 7px; padding: 6px 11px; min-height: 32px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(14, 26, 47, .14); }
.pulse-find { display: flex; gap: 8px; flex: 0 1 460px; min-width: 0; }
.pulse-find .input { flex: 1 1 auto; min-width: 0; }

.pulse-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pulse-row > .card { min-width: 0; }
.pulse-wide { flex: 999 1 640px; }
.pulse-side { flex: 1 1 400px; }
.pulse-half { flex: 1 1 480px; }
.pulse .card-head { flex-wrap: wrap; }
.pulse .card-head > div:not(.seg):not(.spacer) { flex: 1 1 260px; min-width: 0; }
.pulse .card-head .seg { margin-left: auto; flex-wrap: nowrap; }
.pulse .ptile .pill { white-space: normal; }

.pulse-strip { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; }
.pulse-strip-title { flex: 1 1 170px; max-width: 220px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 4px; }
.pulse-strip-title h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pulse-strip-title span { font-size: 12px; color: var(--text-muted); }
.pulse-tiles { flex: 999 1 640px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pulse-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.ptile { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ptile .k { font-size: 12px; font-weight: 550; color: var(--text-muted); }
.ptile .v { font-size: 22px; font-weight: 750; letter-spacing: -.02em; color: var(--heading); font-variant-numeric: tabular-nums; }
.ptile .s { font-size: 12px; color: var(--text-muted); }

/* Bar charts: one bar per slot; the slot is the hover and focus target, bigger than the bar. */
.pb { position: relative; padding-left: 52px; }
.pb.pb-wide { padding-left: 0; }
.pb-axis { position: absolute; left: 0; top: 0; width: 44px; height: var(--pb-h); }
.pb-axis span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.pb-plot { position: relative; height: var(--pb-h); display: flex; align-items: flex-end; border-bottom: 1px solid var(--border-strong); }
.pb-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--border); pointer-events: none; }
.pb-slot { position: relative; flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 1px; outline: none; }
.pb-bar { width: 100%; max-width: 46px; border-radius: 4px 4px 0 0; background: var(--s1); }
.pb-s2 .pb-bar { background: var(--s2); }
.pb-bar.now { background: var(--s1-soft); outline: 1px dashed var(--s1); outline-offset: -1px; }
.pb-s2 .pb-bar.now { background: color-mix(in srgb, var(--s2) 40%, var(--surface)); outline-color: var(--s2); }
.pb-slot:hover .pb-bar, .pb-slot:focus-visible .pb-bar { background: var(--s1-strong); }
.pb-s2 .pb-slot:hover .pb-bar, .pb-s2 .pb-slot:focus-visible .pb-bar { background: var(--bad); }
.pb-slot:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); border-radius: 4px; }
.pb-slot::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid var(--border-strong); opacity: 0; pointer-events: none; }
.pb-slot:hover::after, .pb-slot:focus-visible::after { opacity: 1; }
.pb-tip { display: none; position: absolute; bottom: calc(100% - 8px); left: 50%; z-index: 5; min-width: 180px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 12.5px; pointer-events: none; white-space: nowrap; }
.pb-tip.left { left: auto; right: 50%; }
.pb-tip b { display: block; margin-bottom: 4px; color: var(--heading); }
.pb-tip div { display: flex; justify-content: space-between; gap: 18px; }
.pb-tip div span:first-child { color: var(--text-muted); }
.pb-tip div span:last-child { font-weight: 650; font-variant-numeric: tabular-nums; }
.pb-slot:hover .pb-tip, .pb-slot:focus-visible .pb-tip { display: block; }
.pb-plot .pb-slot:hover, .pb-plot .pb-slot:focus-visible { z-index: 4; }
.pb-x { position: relative; height: 22px; }
.pb-x span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: var(--text-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pulse-subhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 6px 52px; }
.pulse-subhead h3 { font-size: 13px; }
.pulse-subhead span { font-size: 12px; color: var(--text-muted); }
.pulse-hist { position: relative; padding-top: 20px; }
.pmark { position: absolute; top: 0; bottom: 22px; width: 0; border-left: 1.5px dashed var(--text); opacity: .6; z-index: 2; pointer-events: none; }
.pmark b { position: absolute; top: 0; left: 0; transform: translateX(-50%); font-size: 11px; background: var(--surface); padding: 0 3px; }

/* Routes: a fixed colour per route. */
.r-nip { --rc: var(--s1); } .r-nomba { --rc: var(--s2); } .r-monnify { --rc: var(--s3); } .r-nps { --rc: var(--s4); } .r-habaripay { --rc: var(--s5); } .r-unknown { --rc: var(--s0); }
.route-stack { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 14px; }
.route-stack span { display: block; height: 100%; background: var(--rc); min-width: 2px; }
.route-key { display: inline-flex; align-items: center; gap: 8px; }
.route-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--rc); flex: none; }
.table.compact td, .table.compact th { padding: 8px 10px; }

.code-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.code-big { font-size: 22px; font-weight: 750; color: var(--heading); font-variant-numeric: tabular-nums; }
.code-list { display: flex; flex-direction: column; gap: 10px; }
.code-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 64px 52px; gap: 10px; align-items: center; font-size: 13px; }
.code-row .num { text-align: right; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 4px; }
.meter i { display: block; height: 6px; border-radius: 3px; background: var(--s2); }
.rate { display: flex; align-items: center; gap: 10px; }
.rate .num { width: 58px; font-weight: 650; }
.rate .meter { flex: 1 1 80px; min-width: 80px; margin: 0; }
.rate .meter i { background: var(--s1); }

.age-grid { display: grid; grid-template-columns: 104px repeat(6, minmax(32px, 1fr)); gap: 4px; min-width: 320px; }
.age-head { font-size: 11px; color: var(--text-faint); text-align: center; }
.age-state { font-size: 12px; font-weight: 550; align-self: center; overflow-wrap: anywhere; }
.age-cell { height: 32px; border-radius: 6px; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--text-faint); }
.age-cell.old { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.age-cell.lv1 { background: var(--lv1); color: var(--lv-ink); }
.age-cell.lv2 { background: var(--lv2); color: var(--lv-ink); }
.age-cell.lv3 { background: var(--lv3); color: var(--lv-ink-strong); }
.age-cell.lv4 { background: var(--lv4); color: var(--lv-ink-strong); }
.age-cell.old.lv1, .age-cell.old.lv2, .age-cell.old.lv3, .age-cell.old.lv4 { box-shadow: inset 0 0 0 2px var(--warn); }
.pulse-h3 { font-size: 13px; margin: 18px 0 8px; }
.item-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; text-align: left; height: auto; }
.item-btn > .ellipsis { display: flex; flex-direction: column; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed-row { font: inherit; color: inherit; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); padding: 9px 20px; min-height: 44px; cursor: pointer;
    display: grid; grid-template-columns: 70px minmax(0, 1.6fr) 110px 70px 100px 130px; gap: 10px; align-items: center; font-size: 13px; }
.feed li:last-child .feed-row { border-bottom: 0; }
.feed-row:hover { background: var(--surface-2); }
.feed-row[aria-pressed="true"] { background: var(--accent-soft); }
.feed-row:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--accent-ring); }
.feed-row > .num:not(.muted) { text-align: right; }
.feed-state { text-align: right; }

.pulse-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pulse-timeline li { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pulse-timeline li::before { content: ""; position: absolute; left: 0; top: 3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); }
.pulse-timeline li.done::before { border-color: var(--ok); background: var(--ok); }
.pulse-timeline li.bad.done::before { border-color: var(--bad); background: var(--bad); }
.pulse-timeline li.warn::before { border-color: var(--warn); background: var(--warn); }
.pulse-timeline li span { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.pulse-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 12px; color: var(--text-muted); padding: 0 4px; }

@media (max-width: 860px) {
    .pulse-tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feed-row { grid-template-columns: 64px minmax(0, 1fr) 90px; padding: 9px 14px; }
    .feed-row .hide-sm, .feed-row .feed-state { display: none; }
    .pb { padding-left: 40px; }
    .pulse-subhead { margin-left: 40px; }
    .pulse-strip-title { max-width: none; }
}

/* Performance notes (catalogue PerformanceNote): the same four parts on every page. */
.perf-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.perf-head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.perf-note dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.perf-note dt { color: var(--text-faint); }
.perf-note dd { margin: 0; }
.chip.perf-chip { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 860px) { .perf-note dl { grid-template-columns: minmax(0, 1fr); } }
.unset-list > summary { padding: 10px 20px; cursor: pointer; font-weight: 600; color: var(--accent); border-top: 1px solid var(--border); }
.nav-item .count.warn { background: rgba(240, 163, 65, 0.25); color: #ffd18a; }
.pending-restart ul { margin: 6px 0 10px; padding-left: 18px; }
.chip.restart-chip { color: var(--warn); background: var(--warn-soft); }

/* Sign-in pages (accounts on). */
.account-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.account-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px; }
.account-card h1 { font-size: 22px; margin: 18px 0 6px; }
.account-brand { display: flex; align-items: center; gap: 12px; }
.account-brand .brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, #2f7bff, #1d5fe0); }
.account-brand .brand-name { display: block; font-weight: 800; color: var(--heading); }
.account-brand .brand-sub { display: block; font-size: 12px; color: var(--text-muted); }
.account-form { margin: 16px 0; }
.account-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.account-demo { margin-top: 14px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.demo-mail { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.demo-mail pre { white-space: pre-wrap; font-size: 12.5px; background: var(--surface-2); padding: 10px; border-radius: 8px; }
.sign-out { margin: 0; }
a.profile-chip { text-decoration: none; color: inherit; }
