:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e3e6eb;
    --text: #1b1f24;
    --muted: #5f6b7a;
    --accent: #2f5bd3;
    --accent-hover: #2449ad;
    --accent-soft: #e8eefc;
    --ok: #157347;
    --ok-soft: #e3f4ea;
    --warn: #8a5a00;
    --warn-soft: #fdf3dc;
    --danger: #c0392b;
    --danger-soft: #fbe9e7;
    --sidebar: #141a24;
    --sidebar-text: #c3cad6;
    --sidebar-active: #ffffff;
    --radius: 8px;
    --control-h: 36px;
    --statusbar-h: 30px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1319;
        --surface: #171c24;
        --surface-2: #1e252f;
        --border: #2a323e;
        --text: #e6e9ee;
        --muted: #95a0b0;
        --accent: #6d8ff0;
        --accent-hover: #8aa6f5;
        --accent-soft: #1f2a45;
        --ok: #4fc483;
        --ok-soft: #173326;
        --warn: #e0b04c;
        --warn-soft: #3a2f15;
        --danger: #ef6f62;
        --danger-soft: #3d1d1a;
        --sidebar: #0b0e13;
        --shadow: none;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 650; margin: 0 0 2px; letter-spacing: -.01em; }
/* Blazor moves focus to the page heading after navigation (for screen readers); it is not interactive, so no ring. */
h1:focus, [tabindex="-1"]:focus { outline: none; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; font-weight: 400; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 232px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-text);
    display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: calc(100vh - var(--statusbar-h));
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 15px; padding: 0 8px 18px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6f7a8a; padding: 16px 10px 6px; }
.nav-item { color: var(--sidebar-text); padding: 7px 10px; border-radius: 6px; }
.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-item.active { background: rgba(255,255,255,.1); color: var(--sidebar-active); font-weight: 500; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.user-name { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .link-button { color: var(--sidebar-text); }
.content { flex: 1; padding: 28px 32px 48px; min-width: 0; max-width: 1280px; }
.page-pad { padding: 28px 32px; }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head p { margin: 0; }
.back { display: inline-block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.table-card { padding: 0; overflow-x: auto; }
.form-card { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 36px; text-align: center; color: var(--muted); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table.compact td { padding: 7px 4px; }
.table.compact tbody tr:hover td { background: none; }
.row-disabled td { opacity: .55; }

/* ---------- pills ---------- */
.pill { display: inline-block; vertical-align: middle; line-height: 18px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-off { background: var(--surface-2); color: var(--muted); }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.key { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 12px; margin-right: 6px; }
.dir { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.dir-in { background: var(--accent-soft); color: var(--accent); }
.dir-out { background: var(--ok-soft); color: var(--ok); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .grow, .field.grow { flex: 1; }
.input {
    width: 100%; height: var(--control-h); padding: 0 10px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--text); font: inherit; line-height: normal;
}
textarea.input { height: auto; padding: 8px 10px; line-height: 1.5; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.input.narrow { max-width: 140px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.validation-message, .field-error { color: var(--danger); font-size: 12px; }
.invalid { border-color: var(--danger) !important; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.kv span { color: var(--muted); }
details { margin: 4px 0 14px; }
summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }
.quote { margin: -6px 0 14px; padding: 8px 12px; border-left: 3px solid var(--border); color: var(--muted); font-style: italic; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px 0; }
.filters .btn { margin-bottom: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }

.dest-picker { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.dest-picker .input { flex: 1; min-width: 150px; }
.option-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.key-select { width: 64px; flex: 0 0 64px; text-align: center; font-weight: 600; }
.member-list { list-style: none; padding: 0; margin: 0 0 12px; counter-reset: m; }
.member-list li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.member-list li::before { counter-increment: m; content: counter(m); color: var(--muted); width: 18px; font-size: 12px; }
.hours-row { border: 1px solid var(--border); border-radius: 6px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 10px; }
.day-picks { display: flex; gap: 4px; flex-wrap: wrap; }
.day { padding: 4px 9px; border: 1px solid var(--border); border-radius: 5px; cursor: pointer; font-size: 12px; user-select: none; }
.day input { display: none; }
.day.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 14px; line-height: 1;
    border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(.92); }
.btn-danger-ghost { color: var(--danger); }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--muted); width: var(--control-h); height: var(--control-h); padding: 0; border-radius: 6px; cursor: pointer; flex-shrink: 0; vertical-align: middle; }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.confirm-group { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- alerts ---------- */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-of { font-size: 16px; color: var(--muted); font-weight: 500; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { margin-bottom: 4px; }
.login-stack { width: 100%; max-width: 380px; }
.card h2 .net-detect { float: right; margin-top: -6px; padding: 4px 12px; font-size: 13px; }
.net-detected { margin: -6px 0 14px; }
.login-powered { text-align: center; margin: 16px 0 0; font-size: 13px; }
/* the status-bar link styles assume the dark bar; on the light login page use page ink */
.login-powered .sb-brand { color: var(--muted); }
.login-powered .sb-brand strong { color: var(--text); }
.login-powered .sb-brand:hover, .login-powered .sb-brand:focus-visible { color: var(--text); }
.login-card p { margin: 0 0 22px; }

/* ---------- blazor ---------- */
#blazor-error-ui { background: var(--warn-soft); color: var(--warn); bottom: 0; display: none; left: 0; padding: 10px 20px; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 8px; }

@media (max-width: 820px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .nav-section { display: none; }
    .content { padding: 20px 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---- System status (dashboard) ---- */
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 6px; }
.health-card { padding: 14px 18px; }
.health-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.health-head h2 { margin: 0; font-size: 15px; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.health-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.health-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.health-dot.down { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.health-state { margin-left: auto; font-size: 12px; font-weight: 600; }
.health-state.ok { color: var(--ok); }
.health-state.warn { color: var(--warn); }
.health-state.down { color: var(--danger); }
.health-details { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.health-details dt { color: var(--muted); }
.health-details dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.health-updated { margin: 0 0 16px; }

/* ---- Live logs ---- */
.log-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 2px 8px; }
.log-follow { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: live-pulse 1.6s ease-in-out infinite; }
.live-dot.paused { background: var(--muted); animation: none; }
@keyframes live-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.log-view { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); height: calc(100vh - 290px); min-height: 320px;
    overflow: auto; padding: 6px 0; font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace; font-size: 12.5px; line-height: 1.5; }
.log-line { display: grid; grid-template-columns: max-content 84px 1fr; gap: 10px; padding: 1px 12px; border-left: 3px solid transparent; }
.log-line:hover { background: var(--surface-2); }
.log-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-src { font-size: 11px; font-weight: 600; white-space: nowrap; align-self: start; padding-top: 1px; }
.src-pbx { color: var(--accent); }
.src-sql { color: #8a4fd0; }
.src-web { color: var(--ok); }
.src-dog { color: var(--warn); }
.log-msg { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.log-line.lvl-warning { border-left-color: var(--warn); background: var(--warn-soft); }
.log-line.lvl-error { border-left-color: var(--danger); background: var(--danger-soft); }
.log-line.lvl-debug .log-msg { color: var(--muted); }
.log-empty { padding: 12px; font-family: inherit; }
@media (prefers-color-scheme: dark) { .src-sql { color: #b48cf0; } }
@media (max-width: 820px) {
    .log-line { grid-template-columns: 1fr; gap: 0; padding: 4px 12px; }
    .log-view { height: calc(100vh - 380px); }
}

/* ---- Firewall ---- */
.fw-master { margin-bottom: 16px; }
.fw-master-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fw-master-head h2 { margin: 0; }
.fw-master p { margin: 0; max-width: 820px; }
.fw-builtin { margin-left: 8px; }
.fw-any { margin-left: 0; }
.fw-add { margin-top: 12px; }
.fw-add .input:first-child { flex: 1.2; }
.fw-add .input { flex: 1; min-width: 0; }
.fw-sources { margin: 12px 0 8px; }
.fw-sources td { padding-left: 0; }
.fw-sources .input { width: 100%; }
.radio-list { display: grid; gap: 10px; }
.radio-list label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.lockout { display: flex; align-items: center; gap: 16px; }
.lockout > div { flex: 1; }
@media (max-width: 820px) {
    .lockout { flex-direction: column; align-items: stretch; }
    .fw-add { flex-wrap: wrap; }
}

/* ---- Server resources (dashboard) ---- */
.section-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }
.resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.res-tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.res-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.res-label { color: var(--muted); font-size: 13px; }
.res-flag { margin-left: auto; }
.res-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
/* meter: fill carries severity; the track is a lighter step of the same hue */
.res-meter { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.res-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }
.res-warn .res-meter { background: var(--warn-soft); }   .res-warn .res-fill { background: var(--warn); }
.res-danger .res-meter { background: var(--danger-soft); } .res-danger .res-fill { background: var(--danger); }
.res-warn .res-flag { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.res-danger .res-flag { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.res-sub { color: var(--muted); font-size: 12.5px; }
.res-procs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.res-procs strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.res-trend { position: relative; height: 44px; margin-top: auto; padding-top: 4px; }
.res-trend svg { width: 100%; height: 100%; display: block; overflow: visible; }
.res-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.res-line { fill: none; stroke: var(--muted); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.res-hit { fill: transparent; }
.res-hit:hover { fill: var(--surface-2); }
.res-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.res-warn .res-dot { background: var(--warn); }
.res-danger .res-dot { background: var(--danger); }
.res-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .res-fill { transition: none; } }
/* ---- Modal (Components/Shared/Modal.razor, native <dialog>) ---- */
dialog.modal {
    padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text);
    width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in .16s ease-out; }
dialog.modal-narrow { width: min(480px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(10, 14, 20, .55); backdrop-filter: blur(2px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.modal[open] { animation: none; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--border); background: var(--surface); }
.modal-head h2 { margin: 0; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 18px 22px 0; overflow-y: auto; }
/* sections inside a modal: flat panels, not floating cards */
.modal-body .card { box-shadow: none; }
.modal-body .grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
/* the action row stays reachable while the form scrolls */
.modal-body .form-actions {
    position: sticky; bottom: 0; z-index: 1; margin: 18px -22px 0; padding: 14px 22px;
    background: var(--surface); border-top: 1px solid var(--border);
}
.modal-body > form > .form-actions:last-child, .modal-body > .form-actions:last-child { margin-bottom: 0; }
@media (max-width: 820px) {
    dialog.modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .modal-body .grid-2 { grid-template-columns: 1fr; }
}
/* ---- Prompt picker (recordings) ---- */
.prompt-picker { display: flex; flex-direction: column; gap: 8px; }
.prompt-picker .input-row .input { flex: 1; min-width: 0; }
.upload-btn { position: relative; cursor: pointer; }
.upload-btn.disabled { opacity: .5; cursor: default; pointer-events: none; }
.upload-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prompt-player { width: 100%; height: 36px; }
.field > .prompt-picker { margin-top: 0; }
/* ---- Footer status bar (Components/Layout/StatusBar.razor + js/statusbar.js) ---- */
body { padding-bottom: var(--statusbar-h); }
.shell { min-height: calc(100vh - var(--statusbar-h)); }
.status-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--statusbar-h);
    display: flex; align-items: center; gap: 10px; padding: 0 14px;
    font-size: 12px; color: var(--sidebar-text); background: var(--sidebar); border-top: 1px solid rgba(255,255,255,.08);
    transition: background-color .25s ease, color .25s ease;
}
.sb-conn { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a94a6; }
.sb-spacer { flex: 1; }
.sb-clock, .sb-version { font-variant-numeric: tabular-nums; }
.sb-sep { opacity: .5; }
.sb-app { color: #fff; font-weight: 500; }
.sb-version { color: var(--sidebar-text); font-weight: 400; margin-left: 4px; }
.sb-brand { color: var(--sidebar-text); text-decoration: none; white-space: nowrap; }
.sb-brand strong { color: #fff; font-weight: 600; }
.sb-brand:hover, .sb-brand:focus-visible { color: #fff; text-decoration: underline; }
.status-bar[data-state="connected"] .sb-dot { background: #4fc483; }
.status-bar[data-state="connecting"] .sb-dot { background: #8a94a6; animation: sb-pulse 1.2s ease-in-out infinite; }
/* not connected: the whole bar takes the state colour so it is noticed without blocking the page */
.status-bar[data-state="retrying"] { background: #8a5a00; color: #fff; }
.status-bar[data-state="reloading"] { background: #2f5bd3; color: #fff; }
.status-bar[data-state="offline"], .status-bar[data-state="paused"] { background: #b42318; color: #fff; cursor: pointer; }
.status-bar:is([data-state="retrying"], [data-state="reloading"], [data-state="offline"], [data-state="paused"]) :is(.sb-app, .sb-version) { color: #fff; }
.status-bar:is([data-state="retrying"], [data-state="reloading"], [data-state="offline"], [data-state="paused"]) .sb-dot { background: #fff; animation: sb-pulse 1s ease-in-out infinite; }
@keyframes sb-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .sb-dot { animation: none !important; } .status-bar { transition: none; } }
@media (max-width: 820px) { .sb-app .sb-version, .sb-sep { display: none; } }
/* Blocked numbers: options row above the list */
.block-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-bottom: 16px; padding: 14px 20px; }
.block-options .check, .block-options .field { margin-bottom: 0; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline > span { white-space: nowrap; }
.field.inline .input { width: auto; min-width: 280px; }
/* Platform services pages (email, backups, security, queues, hold music, voicemail, audit) */
.card h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; }
.card + .card, .grid-2 + .card, form + .card { margin-top: 16px; }
/* cards laid out by a grid get their spacing from the grid gap - a top margin would push all but the first one down */
:is(.grid-2, .health, .resources, .stats) > .card { margin-top: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; }
.field-row .field.grow { flex: 1 1 200px; }
.field-row .check { margin-bottom: 14px; }
.field-row > span { margin-bottom: 14px; }
.input.tiny { width: 70px; margin-bottom: 14px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 12px; }
.mail-queue { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.backup-last { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 16px; padding: 12px 20px; }
.backup-failed { border-color: var(--danger); }
.warn-text { color: var(--warn); margin: -6px 0 12px; }
.link-button.danger { color: var(--danger); }
.provision { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.provision .qr svg { width: 180px; height: 180px; display: block; border-radius: 6px; }
.qr-link { word-break: break-all; }
audio { height: 32px; max-width: 260px; vertical-align: middle; }
.row-player { max-width: 220px; }
.audit-details { max-width: 480px; overflow-wrap: anywhere; color: var(--muted); }
tr.vm-new td { font-weight: 500; }
.live-calls { margin-bottom: 16px; }
.live-calls h2 .pill { margin-left: 6px; vertical-align: middle; }
.central-status { margin-top: 16px; }
.central-status p { margin: 6px 0; }
