/*
 * Server Manager — same design language as WSM and boekhouding (Bootstrap 5.3, dark first).
 * Light mode uses the same structure with Bootstrap's light theme and matching tokens.
 * No inline styles anywhere (CSP style-src 'self').
 */

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root,
[data-bs-theme="dark"] {
  --app-bg: #14161a;
  --app-sidebar-bg: #191b20;
  --app-surface: #1b1e24;
  --app-surface-2: #20242b;
  --app-border: rgba(255, 255, 255, 0.08);
  --app-text: #e8e9eb;
  --app-muted: #a3a9b3;
  --app-nav: #c9cdd3;
  --app-nav-active-bg: rgba(255, 255, 255, 0.08);
  --app-code-bg: #101216;

  /* Status colours (WSM): text, background, border */
  --st-ok: #7fe0a8;   --st-ok-bg: rgba(127, 224, 168, 0.12);   --st-ok-bd: rgba(127, 224, 168, 0.3);
  --st-warn: #ffcf7f; --st-warn-bg: rgba(255, 207, 127, 0.12); --st-warn-bd: rgba(255, 207, 127, 0.3);
  --st-bad: #ff8f8f;  --st-bad-bg: rgba(255, 143, 143, 0.12);  --st-bad-bd: rgba(255, 143, 143, 0.3);
  --st-info: #7fc4ff; --st-info-bg: rgba(127, 196, 255, 0.12); --st-info-bd: rgba(127, 196, 255, 0.3);
  --st-muted: #c9cdd3; --st-muted-bg: rgba(201, 205, 211, 0.12); --st-muted-bd: rgba(201, 205, 211, 0.3);
  --st-purple: #c9a3ff; --st-purple-bg: rgba(201, 163, 255, 0.12); --st-purple-bd: rgba(201, 163, 255, 0.3);

  /* Syntax highlighting */
  --hl-keyword: #ff9b8f; --hl-string: #a5d6ff; --hl-comment: #8b949e; --hl-number: #79c0ff;
  --hl-title: #d2a8ff; --hl-attr: #79c0ff; --hl-meta: #ffa657; --hl-var: #ffa657;

  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-border-color: var(--app-border);
  --bs-tertiary-bg: var(--app-surface-2);
  --bs-card-bg: var(--app-surface);
}

[data-bs-theme="light"] {
  --app-bg: #f4f5f7;
  --app-sidebar-bg: #ffffff;
  --app-surface: #ffffff;
  --app-surface-2: #f0f1f4;
  --app-border: rgba(16, 24, 40, 0.12);
  --app-text: #1d2026;
  --app-muted: #555c68;
  --app-nav: #3b414b;
  --app-nav-active-bg: rgba(16, 24, 40, 0.07);
  --app-code-bg: #f6f8fa;

  --st-ok: #146c43;   --st-ok-bg: #e5f5ec;   --st-ok-bd: #9fd7b8;
  --st-warn: #8a5300; --st-warn-bg: #fff4dc; --st-warn-bd: #f2c46d;
  --st-bad: #b42318;  --st-bad-bg: #fdecea;  --st-bad-bd: #f4a6a0;
  --st-info: #175cd3; --st-info-bg: #e8f0fe; --st-info-bd: #a9c5f5;
  --st-muted: #475467; --st-muted-bg: #eef0f3; --st-muted-bd: #c8cdd5;
  --st-purple: #6941c6; --st-purple-bg: #f1ecfd; --st-purple-bd: #cdbaf5;

  --hl-keyword: #cf222e; --hl-string: #0a3069; --hl-comment: #59636e; --hl-number: #0550ae;
  --hl-title: #8250df; --hl-attr: #0550ae; --hl-meta: #953800; --hl-var: #953800;

  --bs-body-bg: var(--app-bg);
  --bs-body-color: var(--app-text);
  --bs-secondary-color: var(--app-muted);
  --bs-border-color: var(--app-border);
  --bs-tertiary-bg: var(--app-surface-2);
  --bs-card-bg: var(--app-surface);
}

html[data-bs-theme="dark"] { color-scheme: dark; }
html[data-bs-theme="light"] { color-scheme: light; }

body {
  background-color: var(--app-bg);
  color: var(--app-text);
  font-size: 0.9rem;
}

.table { --bs-table-bg: transparent; font-variant-numeric: tabular-nums; }
.table > :not(caption) > * > * { vertical-align: middle; }
.tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--st-info); outline-offset: 2px; }

.skip-link { position: absolute; left: 0.5rem; top: 0.5rem; z-index: 2000; padding: 0.5rem 0.75rem; background: var(--app-surface); }

/* ── Shell (WSM / boekhouding) ──────────────────────────────────────── */
.app-shell { min-height: 100vh; display: flex; }
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--app-sidebar-bg);
  border-right: 1px solid var(--app-border);
  min-height: 100vh;
}
@media (min-width: 768px) {
  .app-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.app-sidebar.offcanvas-md { --bs-offcanvas-width: 260px; --bs-offcanvas-bg: var(--app-sidebar-bg); }
.app-main { flex: 1; min-width: 0; padding: 1.25rem 1.5rem 3rem; }
.app-main:focus { outline: none; }
.app-brand { color: var(--app-text); }

.nav-link.app-nav-link {
  color: var(--app-nav);
  border-radius: 0.35rem;
  padding: 0.45rem 0.75rem;
}
.nav-link.app-nav-link.active { background: var(--app-nav-active-bg); color: var(--app-text); font-weight: 600; }
.nav-link.app-nav-link:hover { color: var(--app-text); }
.app-nav-sub { padding-left: 1.25rem !important; }
.app-nav-group { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--app-muted); }

.app-topbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--app-sidebar-bg);
  border-bottom: 1px solid var(--app-border);
  position: sticky; top: 0; z-index: 1020;
}

@media (max-width: 767.98px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { min-height: 0; }
  .app-main { padding: 1rem 1rem 3rem; }
}

/* ── Page header ────────────────────────────────────────────────────── */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.4rem; font-weight: 600; margin: 0; }
.page-header .page-sub { color: var(--app-muted); font-size: 0.85rem; }
.page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card { background: var(--app-surface); border-color: var(--app-border); }
.card-header { background: transparent; border-color: var(--app-border); font-weight: 600; }
.section-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--app-muted); margin-bottom: 0.5rem; }

/* ── Status badges: dot + label + colour, never colour alone (WSM) ──── */
.status-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 0.35rem;
  font-size: 0.78rem; font-weight: 600; line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-ok { color: var(--st-ok); background: var(--st-ok-bg); border-color: var(--st-ok-bd); }
.status-ok::before { background: var(--st-ok); }
.status-warn { color: var(--st-warn); background: var(--st-warn-bg); border-color: var(--st-warn-bd); }
.status-warn::before { background: var(--st-warn); border-radius: 1px; }
.status-bad { color: var(--st-bad); background: var(--st-bad-bg); border-color: var(--st-bad-bd); }
.status-bad::before { background: var(--st-bad); border-radius: 0; transform: rotate(45deg); }
.status-info { color: var(--st-info); background: var(--st-info-bg); border-color: var(--st-info-bd); }
.status-info::before { background: var(--st-info); }
.status-muted { color: var(--st-muted); background: var(--st-muted-bg); border-color: var(--st-muted-bd); }
.status-muted::before { background: transparent; border: 1px solid var(--st-muted); }
.status-purple { color: var(--st-purple); background: var(--st-purple-bg); border-color: var(--st-purple-bd); }
.status-purple::before { background: var(--st-purple); }
.status-loading { color: var(--st-muted); background: var(--st-muted-bg); border-color: var(--st-muted-bd); }
.status-loading::before { background: var(--st-muted); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .status-loading::before { animation: none; } }

/* ── Meter bars (memory, disk) ──────────────────────────────────────── */
.meter { display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.meter + .meter { margin-top: 0.4rem; }
.meter-label { color: var(--app-muted); }
.meter-bar { height: 0.45rem; background: var(--app-surface-2); border-radius: 1rem; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--st-ok); border-radius: 1rem; }
.meter-fill.lvl-warn { background: var(--st-warn); }
.meter-fill.lvl-bad { background: var(--st-bad); }
.meter-value { font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }

/* ── Server cards (overview) ────────────────────────────────────────── */
.server-card .card-body { display: flex; flex-direction: column; gap: 0.75rem; }
.server-card .server-name { font-size: 1.05rem; font-weight: 600; margin: 0; }
.server-card .server-name a { color: inherit; text-decoration: none; }
.server-card .server-name a:hover { text-decoration: underline; }
.server-card .server-role { color: var(--app-muted); font-size: 0.82rem; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem 1rem; margin: 0; }
.kv dt { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--app-muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--app-muted); margin-top: auto; }
.state-block { border: 1px dashed var(--app-border); border-radius: 0.4rem; padding: 0.75rem; font-size: 0.85rem; }
.state-block .state-title { font-weight: 600; margin-bottom: 0.15rem; }
.state-block details { margin-top: 0.35rem; color: var(--app-muted); }
.state-block pre { white-space: pre-wrap; word-break: break-word; margin: 0.35rem 0 0; font-size: 0.78rem; }
.placeholder-line { height: 0.8rem; border-radius: 0.3rem; background: var(--app-surface-2); }
.placeholder-line + .placeholder-line { margin-top: 0.5rem; }

/* ── Filter bar ─────────────────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: flex-end; margin-bottom: 1rem; }
.filter-bar .form-label { font-size: 0.75rem; color: var(--app-muted); margin-bottom: 0.2rem; }
.filter-bar .filter-grow { flex: 1 1 14rem; }
.filter-bar .form-select, .filter-bar .form-control { min-width: 8rem; }

/* ── Logs ───────────────────────────────────────────────────────────── */
.log-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--app-muted); margin-bottom: 0.5rem; }
.log-list {
  font-family: var(--bs-font-monospace);
  font-size: 0.78rem;
  background: var(--app-code-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.4rem;
  max-height: 70vh;
  overflow: auto;
}
.log-row { display: grid; grid-template-columns: 8.5rem 4.2rem minmax(0, 1fr); gap: 0.75rem; padding: 0.2rem 0.75rem; border-bottom: 1px solid var(--app-border); }
.log-row:last-child { border-bottom: 0; }
.log-time { color: var(--app-muted); white-space: nowrap; }
.log-msg { white-space: pre-wrap; word-break: break-word; }
.log-level { font-weight: 700; text-transform: uppercase; font-size: 0.7rem; padding-top: 0.1rem; }
.lvl-emerg .log-level, .lvl-alert .log-level, .lvl-crit .log-level, .lvl-err .log-level { color: var(--st-bad); }
.lvl-emerg, .lvl-alert, .lvl-crit, .lvl-err { background: var(--st-bad-bg); }
.lvl-warning .log-level { color: var(--st-warn); }
.lvl-warning { background: var(--st-warn-bg); }
.lvl-notice .log-level, .lvl-info .log-level { color: var(--st-info); }
.lvl-debug .log-level { color: var(--app-muted); }
.log-row mark { padding: 0 0.1rem; background: var(--st-warn-bg); color: inherit; outline: 1px solid var(--st-warn-bd); }
.log-cut { color: var(--st-warn); font-style: italic; }
@media (max-width: 767.98px) {
  .log-row { grid-template-columns: 1fr auto; }
  .log-row .log-msg { grid-column: 1 / -1; }
}

/* ── Login and 2FA ──────────────────────────────────────────────────── */
.bare-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.bare-main { width: 100%; max-width: 380px; }
.bare-card-wide { max-width: 420px; }
.bare-main:has(.bare-card-wide) { max-width: 420px; }
.otp-input { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.qr-box { background: #fff; padding: 8px; border-radius: 0.4rem; line-height: 0; }
.qr-box svg { width: 200px; height: 200px; }
.secret-box { font-size: 0.8rem; letter-spacing: 0.08em; padding: 0.4rem 0.6rem; background: var(--app-surface-2); border-radius: 0.3rem; word-break: break-all; text-align: center; color: var(--app-text); }

/* ── Notes ──────────────────────────────────────────────────────────── */
.notes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2rem; align-items: start; }
.notes-layout.no-toc { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1199.98px) { .notes-layout { grid-template-columns: minmax(0, 1fr); } .notes-toc { display: none; } }
.notes-toc { position: sticky; top: 1rem; font-size: 0.82rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.notes-toc ul { list-style: none; padding-left: 0; margin: 0; }
.notes-toc li { margin: 0.15rem 0; }
.notes-toc .toc-3 { padding-left: 0.9rem; }
.notes-toc a { color: var(--app-muted); text-decoration: none; display: block; padding: 0.1rem 0.5rem; border-left: 2px solid transparent; }
.notes-toc a:hover, .notes-toc a.active { color: var(--app-text); border-left-color: var(--st-info); }
.notes-toc-mobile { display: none; }
@media (max-width: 1199.98px) { .notes-toc-mobile { display: block; } }

.prose { max-width: 75ch; line-height: 1.7; font-size: 0.95rem; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-weight: 600; line-height: 1.3; margin: 2rem 0 0.75rem; scroll-margin-top: 1rem; }
.prose h1 { font-size: 1.6rem; }
.prose h2 { font-size: 1.3rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--app-border); }
.prose h3 { font-size: 1.1rem; }
.prose h4 { font-size: 1rem; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote, .prose pre, .prose figure { margin-bottom: 1rem; }
.prose li + li { margin-top: 0.2rem; }
.prose a { color: var(--st-info); text-underline-offset: 2px; }
.prose hr { border-color: var(--app-border); opacity: 1; margin: 2rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: 0.3rem; }
.prose :not(pre) > code { background: var(--app-surface-2); padding: 0.1rem 0.35rem; border-radius: 0.25rem; font-size: 0.85em; color: inherit; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.88rem; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--app-border); padding: 0.4rem 0.7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--app-surface-2); font-weight: 600; }
.prose blockquote { border-left: 3px solid var(--app-border); padding: 0.25rem 0 0.25rem 1rem; color: var(--app-muted); }
.prose .heading-anchor { opacity: 0; margin-left: 0.4rem; color: var(--app-muted); text-decoration: none; font-weight: 400; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor, .prose .heading-anchor:focus { opacity: 1; }
.prose input[type="checkbox"] { margin-right: 0.4rem; }

.code-block { position: relative; margin-bottom: 1rem; }
.code-block pre { margin: 0; background: var(--app-code-bg); border: 1px solid var(--app-border); border-radius: 0.4rem; padding: 0.9rem 1rem; overflow-x: auto; font-size: 0.82rem; line-height: 1.55; }
.code-block .code-lang { position: absolute; top: 0.35rem; left: 0.75rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--app-muted); pointer-events: none; }
.code-block .code-lang + pre { padding-top: 1.6rem; }
.code-block .code-copy { position: absolute; top: 0.35rem; right: 0.35rem; font-size: 0.72rem; padding: 0.1rem 0.5rem; opacity: 0.8; }
.code-block .code-copy:hover, .code-block .code-copy:focus { opacity: 1; }

.callout { border: 1px solid; border-left-width: 4px; border-radius: 0.4rem; padding: 0.6rem 0.9rem; margin-bottom: 1rem; color: var(--app-text); }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
.callout-note { border-color: var(--st-info-bd); border-left-color: var(--st-info); background: var(--st-info-bg); }
.callout-note .callout-title { color: var(--st-info); }
.callout-tip { border-color: var(--st-ok-bd); border-left-color: var(--st-ok); background: var(--st-ok-bg); }
.callout-tip .callout-title { color: var(--st-ok); }
.callout-important { border-color: var(--st-purple-bd); border-left-color: var(--st-purple); background: var(--st-purple-bg); }
.callout-important .callout-title { color: var(--st-purple); }
.callout-warning { border-color: var(--st-warn-bd); border-left-color: var(--st-warn); background: var(--st-warn-bg); }
.callout-warning .callout-title { color: var(--st-warn); }
.callout-caution { border-color: var(--st-bad-bd); border-left-color: var(--st-bad); background: var(--st-bad-bg); }
.callout-caution .callout-title { color: var(--st-bad); }

.img-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.img-row figure { margin: 0; width: 180px; }
.img-row figure img { width: 180px; height: 135px; object-fit: cover; border: 1px solid var(--app-border); cursor: zoom-in; }
.img-row figcaption { font-size: 0.75rem; color: var(--app-muted); margin-top: 0.25rem; }
.lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.85); padding: 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 0.3rem; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; }

.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid var(--app-border); }
.note-list li:last-child { border-bottom: 0; }
.note-list a { text-decoration: none; }
.note-list a:hover { text-decoration: underline; }
.note-list .note-date { color: var(--app-muted); font-size: 0.78rem; white-space: nowrap; }
.search-hit { padding: 0.75rem 0; border-bottom: 1px solid var(--app-border); }
.search-hit:last-child { border-bottom: 0; }
.search-hit .hit-title { font-weight: 600; }
.search-hit .hit-path { font-size: 0.75rem; color: var(--app-muted); }
.search-hit .hit-snippet { font-size: 0.85rem; margin-top: 0.2rem; }
.search-hit mark, .prose mark { background: var(--st-warn-bg); color: inherit; padding: 0 0.1rem; }
.tag { display: inline-block; font-size: 0.72rem; padding: 0.05rem 0.45rem; border-radius: 1rem; border: 1px solid var(--app-border); color: var(--app-muted); text-decoration: none; }
a.tag:hover { color: var(--app-text); border-color: var(--app-muted); }
.tag.active { color: var(--app-text); background: var(--app-nav-active-bg); }
.note-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; color: var(--app-muted); font-size: 0.8rem; margin-bottom: 1.5rem; }
.note-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--app-border); font-size: 0.85rem; }

/* ── Syntax highlighting (highlight.js classes, theme-aware) ───────── */
.hljs { color: var(--app-text); background: transparent; }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type, .hljs-literal { color: var(--hl-keyword); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-tag { color: var(--hl-string); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link { color: var(--hl-number); }
.hljs-title, .hljs-section, .hljs-title.function_, .hljs-name { color: var(--hl-title); }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: var(--hl-attr); }
.hljs-meta, .hljs-subst, .hljs-variable, .hljs-template-variable { color: var(--hl-meta); }
.hljs-deletion { color: var(--st-bad); }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ── Known errors (ported page) ─────────────────────────────────────── */
.ke-pattern { font-family: var(--bs-font-monospace); font-size: 0.8rem; word-break: break-all; }
.ke-sample { min-width: 18rem; font-family: var(--bs-font-monospace); font-size: 0.78rem; white-space: pre-wrap; word-break: break-word; max-height: 8rem; overflow: auto; }

/* ── Misc ───────────────────────────────────────────────────────────── */
.text-mono { font-family: var(--bs-font-monospace); }
.w-fit { width: fit-content; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-list .state-block { font-family: var(--bs-body-font-family); font-size: 0.85rem; margin: 0.75rem; }


/* Trend charts (inline SVG) */
.chart { margin: 0; }
.chart figcaption { font-size: 0.78rem; font-weight: 600; color: var(--app-muted); margin-bottom: 0.15rem; }
.chart-svg { width: 100%; height: 5.5rem; display: block; background: var(--app-surface-2); border-radius: 0.35rem; }
.chart-grid { stroke: var(--app-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { stroke: var(--st-ok); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-line.lvl-warn { stroke: var(--st-warn); }
.chart-line.lvl-bad { stroke: var(--st-bad); }
.chart-axis { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.7rem; color: var(--app-muted); font-variant-numeric: tabular-nums; }
.chart-empty { font-size: 0.8rem; color: var(--app-muted); padding: 1.6rem 0; text-align: center; border: 1px dashed var(--app-border); border-radius: 0.35rem; }
.mini-list { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.mini-list li + li { margin-top: 0.2rem; }

/* Several lines in one chart: colour plus dash pattern */
.chart-line.series-0 { stroke: var(--st-info); }
.chart-line.series-1 { stroke: var(--st-purple); stroke-dasharray: 7 4; }
.chart-line.series-2 { stroke: var(--st-warn); stroke-dasharray: 2 3; }
.chart-line.series-3 { stroke: var(--st-ok); stroke-dasharray: 10 3 2 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.75rem; color: var(--app-muted); font-variant-numeric: tabular-nums; }
.legend-swatch { width: 1.4rem; height: 0.4rem; vertical-align: middle; overflow: visible; }
