/* PhoenixSoar design system
   Calm dark console. One accent (ember). Every other colour means status and nothing else.
   Sans for interface text, mono only for data (IPs, keys, log lines, numbers in tables). */

:root {
    --bg: #0d1014;
    --surface: #141920;
    --surface-2: #1a212a;
    --surface-3: #222b36;
    --border: #232c37;
    --border-strong: #33404e;

    --text: #e7eaef;
    --text-muted: #9ba7b6;
    --text-faint: #697586;

    --accent: #e9874b;
    --accent-hover: #f09a63;
    --accent-soft: rgba(233, 135, 75, 0.13);
    --accent-ring: rgba(233, 135, 75, 0.45);

    --ok: #4cc38a;
    --ok-soft: rgba(76, 195, 138, 0.13);
    --warn: #e2b84d;
    --warn-soft: rgba(226, 184, 77, 0.13);
    --danger: #ee6a66;
    --danger-soft: rgba(238, 106, 102, 0.13);
    --info: #6fa8e6;
    --info-soft: rgba(111, 168, 230, 0.13);

    --radius-sm: 5px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(4, 8, 14, 0.35);

    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Geist Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

    --z-header: 100;
    --z-overlay: 200;

    /* Bootstrap is still loaded for its grid and utilities; point its theme variables at ours so
       shared class names (.card, .table, headings) never fall back to Bootstrap's light theme */
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-heading-color: var(--text);
    --bs-secondary-color: var(--text-muted);
    --bs-border-color: var(--border);
    --bs-link-color-rgb: 233, 135, 75;
    --bs-link-hover-color-rgb: 240, 154, 99;
}

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

body {
    /* a faint ember glow at the top keeps the page from feeling like a flat rectangle */
    background:
        radial-gradient(1200px 380px at 18% -140px, rgba(233, 135, 75, 0.07), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100dvh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: 1.65rem; letter-spacing: -0.025em; }
h2 { font-size: 1.12rem; }
h3 { font-size: 0.98rem; }
p { text-wrap: pretty; }

.mono, code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #14100c; padding: 6px 12px; border-radius: var(--radius-sm); z-index: 300; }
.skip-link:focus { left: 8px; }

/* ---------- App header ---------- */

.app-header {
    position: sticky; top: 0; z-index: var(--z-header);
    display: flex; align-items: center; gap: 28px;
    padding: 0 28px; height: 56px;
    background: rgba(13, 16, 20, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.app-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
.app-brand:hover { color: var(--text); }
.app-brand-mark {
    width: 22px; height: 22px; border-radius: 6px;
    background: linear-gradient(145deg, #f3a36c, #d8642b);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 4px 14px rgba(233, 135, 75, 0.35);
}
.app-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.app-nav a {
    color: var(--text-muted); padding: 7px 12px; border-radius: var(--radius-sm);
    font-weight: 500; font-size: 0.95rem; transition: background 0.15s ease, color 0.15s ease;
}
.app-nav a:hover { color: var(--text); background: var(--surface-2); }
.app-nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.app-nav .nav-spacer { flex: 1; }
.app-user { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text-muted); }
.app-user a { color: var(--text-muted); }
.app-user a:hover { color: var(--text); }
.app-user form { margin: 0; }

.role-badge {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
    padding: 2px 7px; border-radius: 4px;
    color: var(--accent); background: var(--accent-soft);
}

.page { max-width: 1320px; margin: 0 auto; padding: 28px 28px 64px; }
.page-wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); max-width: 68ch; }

/* ---------- Settings shell ---------- */

.settings { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 36px; align-items: start; }
.settings-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav .group { font-size: 0.72rem; font-weight: 600; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; padding: 14px 10px 6px; }
.settings-nav .group:first-child { padding-top: 0; }
.settings-nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    color: var(--text-muted); padding: 7px 10px; border-radius: var(--radius-sm); font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav-count { font-size: 0.72rem; font-weight: 600; padding: 0 6px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); }

@media (max-width: 900px) {
    .settings { grid-template-columns: 1fr; gap: 16px; }
    .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .settings-nav .group { display: none; }
    .app-header { gap: 12px; padding: 0 14px; overflow-x: auto; }
    .page { padding: 18px 14px 48px; }
}

/* ---------- Surfaces ---------- */

.card { --bs-card-color: var(--text); --bs-card-bg: var(--surface); --bs-card-border-color: var(--border); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 0.9rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.012); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; }

/* ---------- Status ---------- */

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.danger { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.off { background: var(--text-faint); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 0.93rem; }
.notice strong { font-weight: 600; }
.notice.ok { border-color: rgba(76, 195, 138, 0.35); background: var(--ok-soft); }
.notice.warn { border-color: rgba(226, 184, 77, 0.35); background: var(--warn-soft); }
.notice.danger { border-color: rgba(238, 106, 102, 0.35); background: var(--danger-soft); }
.notice .dot { margin-top: 7px; }
.notice-body { flex: 1; min-width: 0; }
.notice-body p { margin: 2px 0 0; color: var(--text-muted); }

.toast-line { margin-bottom: 16px; animation: rise 0.25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Checklist on the settings overview */
.check { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.check:last-child { border-bottom: 0; }
.check .dot { margin-top: 7px; }
.check-title { font-weight: 500; }
.check-detail { color: var(--text-muted); font-size: 0.9rem; margin-top: 1px; }
.check-action { margin-left: auto; white-space: nowrap; font-size: 0.9rem; }

.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.stat-label { color: var(--text-muted); font-size: 0.82rem; }
.stat-value { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-sub { color: var(--text-faint); font-size: 0.8rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .stats, .stats.three { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */

.btn-x {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font: inherit; font-weight: 500; font-size: 0.92rem; line-height: 1;
    padding: 9px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
    cursor: pointer; white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease, color 0.15s ease;
}
.btn-x:hover { background: var(--surface-3); border-color: #44525f; color: var(--text); }
.btn-x:active { transform: translateY(1px); }
.btn-x:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-x.primary { background: var(--accent); border-color: var(--accent); color: #1a110a; font-weight: 600; }
.btn-x.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #1a110a; }
.btn-x.danger { color: var(--danger); border-color: rgba(238, 106, 102, 0.4); background: transparent; }
.btn-x.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-x.danger-solid { background: var(--danger); border-color: var(--danger); color: #1c0b0a; font-weight: 600; }
.btn-x.ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-x.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-x.sm { padding: 6px 10px; font-size: 0.85rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-btn:hover { color: var(--accent-hover); }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 0.84rem; font-weight: 500; color: var(--text-muted); }
.field .hint { font-size: 0.82rem; color: var(--text-faint); }
.field .error { font-size: 0.82rem; color: var(--danger); }

.input, select.input, textarea.input {
    width: 100%; font: inherit; color: var(--text);
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    padding: 8px 11px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--text-faint); }
.input:hover { border-color: #44525f; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { font-family: var(--font-mono); font-size: 0.88rem; min-height: 92px; resize: vertical; }
select.input { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 34px; height: 20px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background 0.18s ease, border-color 0.18s ease; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-muted); transition: transform 0.18s ease, background 0.18s ease; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); background: #1a110a; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-ring); }
.switch input:disabled + .track { opacity: 0.4; }

/* Choice cards (pick a source type) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice { text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 13px 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border-strong); transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease; }
.choice:hover { border-color: #4a5867; background: var(--surface-2); }
.choice:active { transform: translateY(1px); }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-title { font-weight: 600; }
.choice-desc { color: var(--text-muted); font-size: 0.86rem; margin-top: 3px; }

/* ---------- Data ---------- */

.table { --bs-table-color: var(--text); --bs-table-bg: transparent; --bs-table-border-color: var(--border); --bs-table-hover-bg: transparent; width: 100%; border-collapse: collapse; margin: 0; color: var(--text); }
.table > :not(caption) > * > * { background: transparent; box-shadow: none; color: inherit; }
.table th { text-align: left; font-size: 0.78rem; font-weight: 500; color: var(--text-faint); padding: 10px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
.table .right { text-align: right; }
.table-scroll { overflow-x: auto; }

.codebox { position: relative; font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.55; background: #0a0d11; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; white-space: pre-wrap; word-break: break-all; color: #cfd6df; }
.codebox .copy { position: absolute; top: 8px; right: 8px; }
.keybox { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); background: #0a0d11; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; word-break: break-all; }
.keybox span { flex: 1; min-width: 0; }

.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; font-size: 0.93rem; }
.kv dt { color: var(--text-muted); font-family: var(--font-sans); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 52ch; margin: 0 auto 14px; }

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 16px; }
.step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; }
.step::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.8rem; display: grid; place-items: center; margin-top: 1px; }
.step-title { font-weight: 500; margin-bottom: 6px; }

.meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 90px; }
.meter > span { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width 0.4s ease; }
.meter.warn > span { background: var(--warn); }
.meter.danger > span { background: var(--danger); }

.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }

/* Permission matrix */
.matrix td, .matrix th { text-align: center; padding: 9px 12px; }
.matrix td:first-child, .matrix th:first-child { text-align: left; padding-left: 20px; }
.matrix .yes { color: var(--ok); font-weight: 600; }
.matrix .no { color: var(--text-faint); }

/* ---------- Sign-in ---------- */

.auth-wrap { min-height: calc(100dvh - 56px); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(420px, 100%); }
.auth-card .card-body { padding: 28px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 4px; }

/* Bootstrap form bits still used by the Identity pages */
.form-control, .form-select { background: var(--bg) !important; color: var(--text) !important; border-color: var(--border-strong) !important; }
.form-control:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important; }
.form-floating > label { color: var(--text-faint) !important; }
.form-floating > .form-control:focus ~ label::after, .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: transparent !important; }
.btn-primary { background: var(--accent) !important; border-color: var(--accent) !important; color: #1a110a !important; font-weight: 600; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--ok) !important; }
.nav-pills .nav-link { color: var(--text-muted); }
.nav-pills .nav-link.active { background: var(--accent-soft); color: var(--accent); }

/* ==========================================================================
   Bridge: class names still used by the operational pages (live, events,
   incidents, metrics) until their own redesign. Same tokens, no neon.
   ========================================================================== */

.cyber-hud { color: var(--text); }
.font-monospace { font-family: var(--font-mono) !important; }
.text-cyan { color: var(--accent) !important; }
.text-amber { color: var(--warn) !important; }
.text-secondary, .text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text) !important; }
.bg-black { background: #0a0d11 !important; }

.hud-grid { padding: 24px 28px !important; }
.hud-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.hud-panel-header { padding: 12px 16px; border-bottom: 1px solid var(--border) !important; }
.hud-panel-header .panel-title { font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; color: var(--text); }

.hud-alert-row { display: flex; align-items: stretch; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: var(--radius); transition: border-color 0.15s ease, background 0.15s ease; }
.hud-alert-row:hover { background: var(--surface-3); }
.hud-alert-row.critical-threat { border-left-color: var(--danger); }
.hud-alert-row .alert-indicator { display: none; }
.hud-alert-row .alert-ip { font-size: 1rem; }
.critical-threat .alert-score { color: var(--danger); font-weight: 600; }
.warning-threat .alert-score { color: var(--warn); font-weight: 600; }

.hud-btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-weight: 500; font-size: 0.85rem; padding: 6px 11px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease; }
.hud-btn:hover { background: var(--surface-3); color: var(--text); }
.hud-btn:active { transform: translateY(1px); }
.hud-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.hud-btn.btn-danger { color: var(--danger) !important; border-color: rgba(238, 106, 102, 0.4) !important; background: transparent; }
.hud-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.hud-table { width: 100%; font-size: 0.88rem; border-collapse: collapse; font-family: var(--font-mono); }
.hud-table th { font-family: var(--font-sans); color: var(--text-faint); font-size: 0.78rem; font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); white-space: nowrap; text-align: left; }
.hud-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.hud-table tr:hover td { background: rgba(255, 255, 255, 0.018); }
.hud-table .truncate, .truncate { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hud-input { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 7px 10px; }
.hud-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hud-label { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }

.hud-metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.metric-box { background: var(--surface-2); border: 1px solid var(--border); padding: 11px 12px; border-radius: var(--radius); }
.metric-title { font-family: var(--font-sans); font-size: 0.76rem; color: var(--text-muted) !important; }
.metric-value { font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }

.hud-target-bracket { display: inline-block; padding: 8px; position: relative; }
.target-crosshair, .target-frame-label, .pulse-indicator { display: none; }
.brand-glowing, .tracking-glowing { text-shadow: none; color: var(--text); }

.log-line { white-space: nowrap; font-family: var(--font-mono); }
.log-line .t { color: var(--text-faint); }
.ev-block { color: var(--warn); }
.ev-alert { color: var(--danger); font-weight: 600; }
.ev-allow { color: var(--ok); opacity: 0.8; }
.ev-info { color: var(--text-muted); }

.tag { display: inline-block; font-size: 0.72rem; padding: 0 5px; border: 1px solid currentColor; border-radius: 3px; }
.sev-0 { color: var(--text-muted); }
.sev-1 { color: var(--info); }
.sev-2 { color: var(--warn); }
.sev-3 { color: #ee9a55; }
.sev-4 { color: var(--danger); }

.raw-log { background: #0a0d11; border: 1px solid var(--border); border-radius: var(--radius-sm); color: #cfd6df; font-family: var(--font-mono); font-size: 0.82rem; padding: 9px 11px; white-space: pre-wrap; word-break: break-all; }

.z-index-top { z-index: var(--z-overlay) !important; }
.cursor-pointer { cursor: pointer; }
.blink-fast { animation: blinker 1s ease-in-out infinite; }
@keyframes blinker { 50% { opacity: 0.35; } }

/* Blazor error bar */
#blazor-error-ui { background: var(--surface-2); color: var(--danger); border-top: 1px solid var(--danger); bottom: 0; display: none; left: 0; padding: 0.6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

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