/*
 * MSP Sentinel console theme (1.1.0): an ember-accented "operations console" on top of AdminLTE 4 / Bootstrap 5.3.
 * Dark by default; light is a per-user choice (html[data-bs-theme]). Fonts are bundled locally (CSP: font-src 'self').
 * Severity colours are never the only signal: every badge keeps its icon and word.
 */
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/chakra-petch-500.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/chakra-petch-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-display: swap; src: url("../vendor/fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  --st-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --st-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --st-ember: #ff5a1f;
  --st-ember-rgb: 255, 90, 31;
  --st-ember-hot: #ff8a3d;
  --st-ember-deep: #c2410c;
  --st-cut: 10px; /* size of the clipped card corner */
}

/* ---------- dark (default) ---------- */
[data-bs-theme="dark"] {
  --bs-body-bg: #0a0c0f;
  --bs-body-bg-rgb: 10, 12, 15;
  --bs-body-color: #d5dbe2;
  --bs-body-color-rgb: 213, 219, 226;
  --bs-emphasis-color: #f4f6f8;
  --bs-secondary-color: #8d97a3;
  --bs-secondary-bg: #12161b;
  --bs-tertiary-bg: #0e1115;
  --bs-tertiary-bg-rgb: 14, 17, 21;
  --bs-border-color: #232a33;
  --bs-border-color-translucent: rgba(255, 255, 255, .08);
  --bs-heading-color: #f1f4f7;
  --bs-link-color: var(--st-ember-hot);
  --bs-link-color-rgb: 255, 138, 61;
  --bs-link-hover-color: #ffb07a;
  --bs-link-hover-color-rgb: 255, 176, 122;
  --bs-code-color: #ffb07a;
  --bs-primary-text-emphasis: var(--st-ember-hot);
  --st-panel: #10141a;
  --st-panel-edge: rgba(var(--st-ember-rgb), .22);
  --st-glow: 0 0 0 1px rgba(var(--st-ember-rgb), .35), 0 0 18px rgba(var(--st-ember-rgb), .18);
  --st-grid: rgba(255, 255, 255, .025);
}
/* ---------- light ---------- */
[data-bs-theme="light"] {
  --bs-body-bg: #eef1f4;
  --bs-body-bg-rgb: 238, 241, 244;
  --bs-tertiary-bg: #e6eaee;
  --bs-tertiary-bg-rgb: 230, 234, 238;
  --bs-primary-text-emphasis: #9a3412;
  --bs-link-hover-color-rgb: 154, 52, 18;
  --bs-border-color: #cfd6de;
  --bs-link-color: var(--st-ember-deep);
  --bs-link-color-rgb: 194, 65, 12;
  --bs-link-hover-color: #9a3412;
  --bs-code-color: #9a3412;
  --st-panel: #ffffff;
  --st-panel-edge: rgba(194, 65, 12, .22);
  --st-glow: 0 0 0 1px rgba(194, 65, 12, .35), 0 2px 10px rgba(194, 65, 12, .12);
  --st-grid: rgba(15, 23, 42, .035);
}
[data-bs-theme] {
  --bs-primary: var(--st-ember);
  --bs-primary-rgb: var(--st-ember-rgb);
  --bs-primary-bg-subtle: rgba(var(--st-ember-rgb), .12);
  --bs-primary-border-subtle: rgba(var(--st-ember-rgb), .4);
  --bs-focus-ring-color: rgba(var(--st-ember-rgb), .35);
  --bs-font-monospace: var(--st-mono);
}

/* ---------- base ---------- */
a { text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(var(--bs-link-color-rgb), .4); }
a:hover { text-decoration-color: currentColor; }
.table a, .list-group a, .card-title a { text-decoration: none; }
.table a:hover, .list-group a:hover { text-decoration: underline; }
/* Light "status" chips would glare on the dark console: show them as outlined chips instead. */
[data-bs-theme="dark"] .badge.text-bg-light { background: transparent !important; color: #e6ebf0 !important; border: 1px solid rgba(255, 255, 255, .35) !important; }
[data-bs-theme="dark"] .badge.text-bg-dark { background: #2a3038 !important; color: #f1f4f7 !important; border: 1px solid rgba(var(--st-ember-rgb), .45); }
body { background-color: var(--bs-body-bg); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .card-title, .brand-text, .small-box h3 { font-family: var(--st-display); letter-spacing: .02em; }
code, kbd, pre, .font-monospace { font-family: var(--st-mono); }
.app-main {
  background-image:
    linear-gradient(var(--st-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--st-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.app-content-header h1 { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.app-content-header h1::before { content: ""; display: inline-block; width: .55em; height: .55em; margin-right: .6em; background: var(--st-ember); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); vertical-align: .08em; box-shadow: 0 0 10px rgba(var(--st-ember-rgb), .7); }

/* ---------- header and sidebar ---------- */
.app-header { border-bottom: 1px solid var(--st-panel-edge) !important; box-shadow: 0 1px 0 rgba(var(--st-ember-rgb), .08); }
[data-bs-theme="dark"] .app-header { background: rgba(10, 12, 15, .92) !important; backdrop-filter: blur(6px); }
.app-sidebar { background: #07090b !important; border-right: 1px solid rgba(var(--st-ember-rgb), .18); }
.sidebar-brand { border-bottom: 1px solid rgba(var(--st-ember-rgb), .18) !important; }
.sidebar-brand { justify-content: flex-start !important; padding-left: .9rem; }
.brand-link { display: flex; align-items: center; gap: .55rem; min-width: 0; max-width: 100%; }
.brand-logo { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 6px rgba(var(--st-ember-rgb), .45)); }
/* Long white-label names shorten with an ellipsis (full name in the link's title). */
.brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .12em; font-size: 1rem; font-weight: 600 !important; color: #f4f6f8 !important; }
.app-sidebar .nav-header { font-family: var(--st-display); letter-spacing: .14em; color: var(--st-ember-hot) !important; font-size: .72rem; }
.app-sidebar .sidebar-menu .nav-link { border-radius: 0 !important; border-left: 2px solid transparent; color: #aeb7c2 !important; }
.app-sidebar .sidebar-menu .nav-link:hover { color: #fff !important; background: rgba(var(--st-ember-rgb), .08) !important; }
.app-sidebar .sidebar-menu .nav-link.active { background: linear-gradient(90deg, rgba(var(--st-ember-rgb), .22), rgba(var(--st-ember-rgb), 0)) !important; border-left-color: var(--st-ember); color: #fff !important; box-shadow: none !important; }
.app-sidebar .sidebar-menu .nav-link.active .nav-icon { color: var(--st-ember-hot); filter: drop-shadow(0 0 4px rgba(var(--st-ember-rgb), .8)); }
.app-footer { border-top: 1px solid var(--st-panel-edge) !important; font-family: var(--st-mono); font-size: .75rem; letter-spacing: .03em; }

/* ---------- panels ---------- */
/* Note: the clipped corner (clip-path) would also clip any dropdown, popover or tooltip placed INSIDE a card.
   None exist today; if one is added, move it outside the card or draw the corner on a pseudo-element instead. */
.card {
  background: var(--st-panel);
  border: 1px solid var(--st-panel-edge);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--st-cut)) 0, 100% var(--st-cut), 100% 100%, var(--st-cut) 100%, 0 calc(100% - var(--st-cut)));
  box-shadow: none;
}
.card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color); position: relative; }
.card-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; background: var(--st-ember); box-shadow: 0 0 8px rgba(var(--st-ember-rgb), .6); }
.card-header .card-title { text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; font-weight: 600; }
.card-footer { background: rgba(var(--st-ember-rgb), .03); border-top: 1px solid var(--bs-border-color); }
.card-outline { border-top: 3px solid var(--lte-card-variant-bg, var(--st-ember)) !important; }
.card-outline.card-primary { border-top: 2px solid var(--st-ember) !important; }
.card-outline.card-warning { border-top-color: #d48300 !important; }
.list-group-item { background: transparent; border-color: var(--bs-border-color); }

/* KPI tiles */
.small-box { border-radius: 0; clip-path: polygon(0 0, calc(100% - var(--st-cut)) 0, 100% var(--st-cut), 100% 100%, 0 100%); border: 1px solid rgba(255, 255, 255, .06); }
.small-box h3 { font-weight: 600; font-variant-numeric: tabular-nums; }
.small-box.text-bg-danger { background: linear-gradient(135deg, #7f1022, #c0142f) !important; box-shadow: 0 0 22px rgba(192, 20, 47, .35); }
.small-box.text-bg-warning { background: linear-gradient(135deg, #7a4200, #9c5600) !important; color: #fff !important; }
.small-box.text-bg-danger, .small-box.text-bg-warning, .small-box.text-bg-info, .small-box.text-bg-success, .small-box.text-bg-primary { color: #fff !important; }
.small-box.text-bg-primary { background: linear-gradient(135deg, #b8360c, #d9480f) !important; }
.small-box.text-bg-success { background: linear-gradient(135deg, #14532d, #15803d) !important; }
.small-box p > .small { color: rgba(255, 255, 255, .9) !important; }
.small-box.text-bg-secondary { background: linear-gradient(135deg, #1b2129, #262e38) !important; color: #c9d1da !important; }
[data-bs-theme="light"] .small-box.text-bg-secondary { background: linear-gradient(135deg, #dfe4ea, #eef1f4) !important; color: #334155 !important; }
.small-box.text-bg-info { background: linear-gradient(135deg, #0c4a6e, #0e7490) !important; color: #fff !important; }

/* ---------- controls ---------- */
.btn { border-radius: 2px; font-family: var(--st-display); letter-spacing: .05em; font-weight: 600; }
.btn-primary {
  --bs-btn-bg: var(--st-ember); --bs-btn-border-color: var(--st-ember); --bs-btn-color: #120600;
  --bs-btn-hover-bg: var(--st-ember-hot); --bs-btn-hover-border-color: var(--st-ember-hot); --bs-btn-hover-color: #120600;
  --bs-btn-active-bg: var(--st-ember-deep); --bs-btn-active-border-color: var(--st-ember-deep); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--st-ember); --bs-btn-disabled-border-color: var(--st-ember);
  --bs-btn-focus-shadow-rgb: var(--st-ember-rgb);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
  box-shadow: 0 0 14px rgba(var(--st-ember-rgb), .35);
  text-transform: uppercase;
}
.btn-outline-primary {
  --bs-btn-color: var(--st-ember-hot); --bs-btn-border-color: rgba(var(--st-ember-rgb), .7);
  --bs-btn-hover-bg: rgba(var(--st-ember-rgb), .15); --bs-btn-hover-border-color: var(--st-ember); --bs-btn-hover-color: var(--bs-emphasis-color);
  --bs-btn-active-bg: rgba(var(--st-ember-rgb), .25); --bs-btn-active-border-color: var(--st-ember); --bs-btn-active-color: var(--bs-emphasis-color);
  --bs-btn-focus-shadow-rgb: var(--st-ember-rgb);
}
[data-bs-theme="light"] .btn-outline-primary { --bs-btn-color: var(--st-ember-deep); }
.form-control, .form-select { border-radius: 2px; background-color: var(--bs-tertiary-bg); }
.form-control:focus, .form-select:focus { border-color: var(--st-ember); box-shadow: 0 0 0 .2rem rgba(var(--st-ember-rgb), .22); }
.form-check-input:checked { background-color: var(--st-ember); border-color: var(--st-ember); }
.form-check-input:focus { border-color: var(--st-ember); box-shadow: 0 0 0 .2rem rgba(var(--st-ember-rgb), .22); }
.form-label { font-family: var(--st-display); letter-spacing: .04em; }
.badge { border-radius: 2px; font-family: var(--st-display); letter-spacing: .06em; font-weight: 600; }
.text-bg-danger { background-color: #c0142f !important; box-shadow: 0 0 10px rgba(192, 20, 47, .45); }
.text-bg-primary { background-color: var(--st-ember) !important; color: #120600 !important; }
.alert { border-radius: 0; border-left-width: 3px; }

/* tables */
.table { --bs-table-bg: transparent; --bs-table-striped-bg: rgba(127, 127, 127, .06); --bs-table-hover-bg: rgba(var(--st-ember-rgb), .06); }
.table > thead th { font-family: var(--st-display); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--bs-secondary-color); border-bottom-color: rgba(var(--st-ember-rgb), .35); }
.table td code, .table td .font-monospace { font-size: .82rem; }

/* dropdowns */
.dropdown-menu { border-radius: 0; border-color: var(--st-panel-edge); box-shadow: var(--st-glow); }
.dropdown-item:active { background-color: var(--st-ember); }

/* ---------- sign-in ---------- */
.login-page {
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--st-ember-rgb), .16), transparent 45%),
    linear-gradient(var(--st-grid) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--st-grid) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bs-body-bg) !important;
}
.auth-mark { width: 92px; height: 92px; filter: drop-shadow(0 0 16px rgba(var(--st-ember-rgb), .55)); }
.auth-product { font-family: var(--st-display); text-transform: uppercase; letter-spacing: .22em; font-weight: 600; }
.auth-tagline { font-family: var(--st-mono); font-size: .75rem; letter-spacing: .12em; color: rgba(var(--st-ember-rgb), .85); text-transform: uppercase; }
.auth-warning { font-family: var(--st-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

@media (prefers-reduced-motion: no-preference) {
  .text-bg-danger.notification-count { animation: st-pulse 2s ease-in-out infinite; }
  @keyframes st-pulse { 50% { box-shadow: 0 0 16px rgba(192, 20, 47, .9); } }
}

/* =====================================================================
   Dashboards (1.2.0): command view and client consoles.
   Status colours always come with an icon and a word; charts have text labels.
   ===================================================================== */
[data-bs-theme="dark"] { --st-fail: #ff4d6a; --st-warn: #ffb020; --st-ok: #3ddc84; --st-info: #5ec8ff; --st-hud: rgba(16, 20, 26, .86); --st-hud-line: rgba(255, 255, 255, .07); }
[data-bs-theme="light"] { --st-fail: #b4122e; --st-warn: #9a5800; --st-ok: #15803d; --st-info: #0369a1; --st-hud: rgba(255, 255, 255, .92); --st-hud-line: rgba(15, 23, 42, .08); }

.dash-actions { display: flex; justify-content: flex-end; margin: -.5rem 0 .75rem; }
.ops-strip { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; padding: .5rem .75rem; border: 1px solid var(--st-panel-edge); background: var(--st-hud); font-family: var(--st-mono); font-size: .78rem; }
.ops-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .55rem; border: 1px solid var(--st-hud-line); color: var(--bs-secondary-color); letter-spacing: .02em; }
.ops-chip b { color: var(--bs-emphasis-color); font-weight: 500; }
.ops-chip.is-ok { border-color: color-mix(in srgb, var(--st-ok) 45%, transparent); color: var(--st-ok); }
.ops-chip.is-warn { border-color: color-mix(in srgb, var(--st-warn) 45%, transparent); color: var(--st-warn); }
.ops-chip.is-bad { border-color: color-mix(in srgb, var(--st-fail) 60%, transparent); color: var(--st-fail); background: color-mix(in srgb, var(--st-fail) 10%, transparent); }
.ops-chip.is-live { border-color: color-mix(in srgb, var(--st-info) 50%, transparent); color: var(--st-info); }
.ops-time { color: var(--bs-secondary-color); }

.dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dash-grid .hud-gauge { grid-column: span 3; }
.dash-grid .hud-kpis { grid-column: span 4; }
.dash-grid .hud-trend { grid-column: span 5; }
.dash-grid .hud-clients { grid-column: span 12; }
.dash-grid .hud-exposures, .dash-grid .hud-feed { grid-column: span 6; }
.dash-grid .hud-surface, .dash-grid .hud-certs { grid-column: span 6; }
.client-console { display: grid; gap: 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-bottom: 1rem; }
.client-console .hud-gauge { grid-column: span 3; }
.client-console .hud-kpis { grid-column: span 4; }
.client-console .hud-trend { grid-column: span 5; }
.client-console .hud-surface { grid-column: span 5; }
.client-console .hud-feed { grid-column: span 7; }
@media (max-width: 1399.98px) {
  .dash-grid .hud-gauge, .client-console .hud-gauge { grid-column: span 4; }
  .dash-grid .hud-kpis, .client-console .hud-kpis { grid-column: span 8; }
  .dash-grid .hud-trend, .client-console .hud-trend { grid-column: span 12; }
}
@media (max-width: 991.98px) {
  .dash-grid > *, .client-console > * { grid-column: span 12 !important; }
}

/* HUD panel: thin frame, corner brackets, scan line on the title */
.hud { position: relative; min-width: 0; padding: 1rem 1.1rem; background: var(--st-hud); border: 1px solid var(--st-hud-line); }
.hud::before, .hud::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--st-ember); pointer-events: none; }
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-title { display: flex; align-items: center; gap: .5rem; font: 600 .78rem/1.2 var(--st-display); letter-spacing: .14em; text-transform: uppercase; color: var(--bs-secondary-color); margin: 0 0 .75rem; }
.hud-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--st-ember-rgb), .55), transparent); }
.hud-title-sm { margin-top: 1rem; }
.hud-empty, .hud-sub, .hud-meta { color: var(--bs-secondary-color); font-size: .85rem; }
.hud-sub { margin: .25rem 0 0; text-align: center; }
.hud-meta { display: block; font-size: .78rem; }
.hud-meta code { font-size: .74rem; }

/* gauge */
.gauge { display: block; width: 100%; max-width: 230px; margin: 0 auto; }
.gauge .g-track { fill: none; stroke: var(--st-hud-line); stroke-width: 14; }
.gauge .g-value { fill: none; stroke-width: 14; stroke-linecap: butt; }
.gauge-risk .g-value { stroke: var(--st-fail); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--st-fail) 70%, transparent)); }
.gauge-attention .g-value { stroke: var(--st-warn); }
.gauge-good .g-value { stroke: var(--st-ok); }
.gauge .g-tick { stroke: var(--bs-secondary-color); stroke-width: 1.5; opacity: .6; }
.gauge .g-num { font: 600 44px var(--st-display); fill: var(--bs-emphasis-color); }
.gauge .g-cap { font: 500 10px var(--st-mono); letter-spacing: .12em; fill: var(--bs-secondary-color); }
.gauge-level { text-align: center; margin: .25rem 0 0; font: 600 1rem var(--st-display); letter-spacing: .1em; text-transform: uppercase; }
.level-risk.gauge-level { color: var(--st-fail); } .level-attention.gauge-level { color: var(--st-warn); } .level-good.gauge-level { color: var(--st-ok); }
@media (prefers-reduced-motion: no-preference) {
  .gauge .g-value { stroke-dasharray: 100; animation: st-gauge 1.1s cubic-bezier(.2, .8, .2, 1) both; }
  [data-refreshed] .gauge .g-value { animation: none; } /* don't replay on every refresh */
  @keyframes st-gauge { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
  .live-dot { animation: st-blink 1.6s ease-in-out infinite; }
  @keyframes st-blink { 50% { opacity: .25; } }
}

/* KPI cells */
.hud-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: .6rem; align-content: stretch; }
.kpi { justify-content: center; }
.kpi { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .7rem; border: 1px solid var(--st-hud-line); border-left: 3px solid var(--bs-secondary-color); color: var(--bs-body-color); text-decoration: none !important; min-width: 0; }
a.kpi:hover { background: rgba(var(--st-ember-rgb), .07); }
.kpi-n { font: 600 1.9rem/1 var(--st-display); color: var(--bs-emphasis-color); font-variant-numeric: tabular-nums; }
.kpi-small { font-size: 1.15rem; line-height: 1.6; }
.kpi-l { font-size: .74rem; letter-spacing: .04em; color: var(--bs-secondary-color); }
.kpi-fail { border-left-color: var(--st-fail); } .kpi-fail .kpi-n { color: var(--st-fail); }
.kpi-warn { border-left-color: var(--st-warn); } .kpi-warn .kpi-n { color: var(--st-warn); }
.kpi-kev { border-left-color: var(--st-ember); } .kpi-kev .kpi-n { color: var(--st-ember-hot); }
[data-bs-theme="light"] .kpi-kev .kpi-n { color: var(--st-ember-deep); }
.kpi-cert { border-left-color: var(--st-info); }
.kpi-window.is-open { border-left-color: var(--st-ok); }
.kpi-window.is-paused { border-left-color: var(--st-fail); } .kpi-window.is-paused .kpi-n { color: var(--st-fail); }
.refresh-toggle { font: .74rem var(--st-mono); }
.dash-actions { gap: .5rem; align-items: center; }
@media (max-width: 575.98px) { .hud-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* trend */
.trend { display: block; width: 100%; height: auto; max-height: 240px; }
.trend .t-grid { stroke: var(--st-hud-line); stroke-width: 1; }
.trend .t-axis { font: 10px var(--st-mono); fill: var(--bs-secondary-color); }
.trend .t-fail { fill: none; stroke: var(--st-fail); stroke-width: 2.5; }
.trend .t-warn { fill: none; stroke: var(--st-warn); stroke-width: 2; stroke-dasharray: 6 4; }
.trend .t-fail-area { fill: color-mix(in srgb, var(--st-fail) 14%, transparent); }
.trend .t-fail-dot { fill: var(--st-fail); } .trend .t-warn-dot { fill: var(--st-warn); }
.legend-line { margin: .4rem 0 0; font: .78rem var(--st-mono); }
.lg-fail { color: var(--st-fail); margin-right: .8rem; } .lg-warn { color: var(--st-warn); }

/* client risk grid */
.risk-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.trend-note { display: flex; align-items: center; gap: .5rem; min-height: 120px; color: var(--bs-secondary-color); font-size: .88rem; }
.risk-tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--st-hud-line); border-left: 3px solid var(--st-ok); color: var(--bs-body-color); text-decoration: none !important; }
.risk-tile:hover { background: rgba(var(--st-ember-rgb), .07); }
.risk-tile.level-risk { border-left-color: var(--st-fail); } .risk-tile.level-attention { border-left-color: var(--st-warn); }
.rt-score { grid-row: span 2; font: 600 1.8rem/1 var(--st-display); font-variant-numeric: tabular-nums; align-self: center; min-width: 2.2ch; }
.level-risk .rt-score { color: var(--st-fail); } .level-attention .rt-score { color: var(--st-warn); } .level-good .rt-score { color: var(--st-ok); }
.rt-name { font-weight: 600; color: var(--bs-emphasis-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-meta { font-size: .76rem; color: var(--bs-secondary-color); }
.rt-bar { grid-column: 1 / -1; width: 100%; height: 4px; margin-top: .5rem; }
.rt-track { fill: var(--st-hud-line); }
.rt-fill { fill: var(--st-ok); } .level-risk .rt-fill { fill: var(--st-fail); } .level-attention .rt-fill { fill: var(--st-warn); }

/* lists: exposures, feed, certificates */
.hud-list, .feed, .cert-line { list-style: none; margin: 0; padding: 0; }
.hud-list li { padding: .5rem 0; border-bottom: 1px dashed var(--st-hud-line); }
.hud-list li:last-child, .feed li:last-child, .cert-line li:last-child { border-bottom: 0; }
.sev-tag { display: inline-flex; align-items: center; gap: .25rem; font: 600 .68rem var(--st-display); letter-spacing: .08em; text-transform: uppercase; padding: .05rem .4rem; border: 1px solid currentColor; margin-right: .35rem; }
.sev-tag.sev-fail { color: var(--st-fail); } .sev-tag.sev-warn { color: var(--st-warn); }
.kev-tag { font: 600 .66rem var(--st-mono); color: var(--st-ember-hot); border: 1px solid rgba(var(--st-ember-rgb), .6); padding: 0 .3rem; }
[data-bs-theme="light"] .kev-tag { color: var(--st-ember-deep); }
.feed li { display: grid; grid-template-columns: 7.5rem 6.5rem minmax(0, 1fr); gap: .15rem .6rem; padding: .35rem 0 .35rem .6rem; border-bottom: 1px dashed var(--st-hud-line); border-left: 2px solid var(--st-hud-line); font-size: .86rem; }
.feed li .hud-meta { grid-column: 3; }
.feed-time { font: .74rem var(--st-mono); color: var(--bs-secondary-color); }
.feed-kind { font: 600 .7rem var(--st-display); letter-spacing: .08em; text-transform: uppercase; }
.feed li a { min-width: 0; overflow-wrap: anywhere; }
.ev-bad { border-left-color: var(--st-fail) !important; } .ev-bad .feed-kind { color: var(--st-fail); }
.ev-warn { border-left-color: var(--st-warn) !important; } .ev-warn .feed-kind { color: var(--st-warn); }
.ev-ok { border-left-color: var(--st-ok) !important; } .ev-ok .feed-kind { color: var(--st-ok); }
.ev-scan .feed-kind { color: var(--st-info); } .ev-triage .feed-kind { color: var(--bs-secondary-color); }
@media (max-width: 575.98px) { .feed li { grid-template-columns: minmax(0, 1fr); } .feed li .hud-meta { grid-column: 1; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-ok); box-shadow: 0 0 8px var(--st-ok); flex: none; }
.cert-line li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 0 .6rem; padding: .4rem 0; border-bottom: 1px dashed var(--st-hud-line); }
.cert-line .hud-meta { grid-column: 2; }
.c-days { font: 600 .82rem var(--st-mono); grid-row: span 2; align-self: center; }
.c-expired .c-days { color: var(--st-fail); } .c-soon .c-days { color: var(--st-warn); } .c-later .c-days { color: var(--st-info); }
.c-name { overflow-wrap: anywhere; }

/* bars */
.bars { display: block; width: 100%; height: auto; }
.bars .b-label { font: 12px var(--bs-body-font-family); fill: var(--bs-body-color); }
.bars .b-num { font: 600 12px var(--st-mono); fill: var(--bs-emphasis-color); }
.bars .b-track { fill: var(--st-hud-line); }
.bars .b-bar { fill: var(--st-info); }
.bars .b-risk { fill: var(--st-fail); }

/* =====================================================================
   Administration section (1.3.0): its own sidebar menu and overview cards.
   ===================================================================== */
.app-sidebar.is-admin { border-right-color: rgba(var(--st-ember-rgb), .45); }
.admin-mode { display: flex; align-items: center; gap: .5rem; margin: .75rem .75rem 0; padding: .45rem .7rem; border: 1px solid rgba(var(--st-ember-rgb), .5);
  background: rgba(var(--st-ember-rgb), .1); color: var(--st-ember-hot); font: 600 .78rem var(--st-display); letter-spacing: .14em; text-transform: uppercase; }
.app-sidebar .sidebar-menu .nav-link.admin-exit { color: #e3e8ee !important; }
/* A client's own menu (1.13.0): the client's name above its sections. */
.client-mode { display: flex; align-items: center; gap: .5rem; margin: .25rem .75rem .25rem; padding: .45rem .7rem; border: 1px solid rgba(var(--st-ember-rgb), .35);
  background: rgba(var(--st-ember-rgb), .07); color: #e3e8ee; font: 600 .82rem var(--st-display); }
.client-mode > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.dropdown-header { font: 600 .7rem var(--st-display); letter-spacing: .14em; text-transform: uppercase; color: var(--st-ember-hot); }
[data-bs-theme="light"] .dropdown-header { color: var(--st-ember-deep); }
.admin-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.admin-card { display: flex; gap: .9rem; align-items: flex-start; color: var(--bs-body-color); text-decoration: none !important; }
.admin-card:hover { background: rgba(var(--st-ember-rgb), .07); }
.admin-card-icon { font-size: 1.6rem; color: var(--st-ember-hot); line-height: 1; }
[data-bs-theme="light"] .admin-card-icon { color: var(--st-ember-deep); }
.admin-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.admin-card-title { font: 600 1rem var(--st-display); letter-spacing: .1em; text-transform: uppercase; color: var(--bs-emphasis-color); }
.admin-card-status { font: .8rem var(--st-mono); }
.admin-card-status.is-ok { color: var(--st-ok); } .admin-card-status.is-warn { color: var(--st-warn); } .admin-card-status.is-bad { color: var(--st-fail); }
.admin-card-text { font-size: .86rem; color: var(--bs-secondary-color); }
.sn-records { min-width: 16rem; max-width: 28rem; }

/* 1.51: long menu labels ("Certificates and web pages", "Pen-test engagements") wrap instead of being cut off. */
.app-sidebar .sidebar-menu .nav-link { align-items: flex-start; }
.app-sidebar .sidebar-menu .nav-link > p { white-space: normal; line-height: 1.3; }
