/* ABtec DeepView. Brand: ABtec navy #0C3150, blue #1E88C1, light #38BFEC, deep #065698 (from the ABtec logo).
   Surfaces are liquid glass over a slow-moving water backdrop: cards blur and tint what is behind them,
   so --glass is what a panel is filled with and --surface stays a solid colour for anything that must
   hide what's under it (sticky headers, chart tooltips, print). */
:root {
  --brand-navy: #0c3150; --brand-blue: #1e88c1; --brand-light: #38bfec; --brand-deep: #065698;
  --brand-accent: #1e88c1; --brand-orange: #f47a1f; --brand-amber: #f5a524; --brand-pulse: #e5484d;
  --bg: #e8f1f7; --bg-2: #f5f9fc; --surface: #ffffff; --border: rgba(12,49,80,.13);
  --glass: linear-gradient(145deg, rgba(255,255,255,.80), rgba(255,255,255,.52));
  --glass-edge: rgba(255,255,255,.85); --glass-blur: blur(22px) saturate(170%);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(12,49,80,.05), 0 18px 40px -22px rgba(12,49,80,.38), 0 2px 6px -2px rgba(12,49,80,.10);
  --field: rgba(255,255,255,.72);
  --blob-a: rgba(56,191,236,.42); --blob-b: rgba(30,136,193,.30); --blob-c: rgba(6,86,152,.20);
  --accent: #0e6aa3; --accent-hover: #0a5886; --accent-dim: rgba(30,136,193,.13); --on-accent: #ffffff; --link: #0c63a0;
  --success: #15803d; --warning: #b45309; --danger: #c81e3a;
  --text: #0c3150; --muted: #4a6478; --hover: rgba(12,49,80,0.055);
  --mono: 'JetBrains Mono', ui-monospace, monospace; --sans: 'Instrument Sans', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --radius: 18px; --radius-sm: 11px; --nav-w: 252px; --shadow: var(--glass-shadow);
  --side-bg: linear-gradient(165deg, rgba(12,49,80,.93), rgba(6,40,72,.88) 55%, rgba(6,86,152,.80));
  --side-text: #d6e6f2; --side-muted: #8fb2cb; --side-hover: rgba(255,255,255,.08);
  --side-active: rgba(255,255,255,.14); --side-line: rgba(255,255,255,.12);
  --sev-low-bg: #e3eaf0;      --sev-low-fg: #37506a;
  --sev-medium-bg: #fef0c7;   --sev-medium-fg: #8a4a06;
  --sev-high-bg: #fedcb8;     --sev-high-fg: #983a0c;
  --sev-critical-bg: #fde0e2; --sev-critical-fg: #b01c2e;
  --flash-success-bg: #dcf5e4; --flash-success-fg: #146c34;
  --flash-warning-bg: #fef0c7; --flash-warning-fg: #8a4a06;
  --flash-error-bg: #fde0e2;   --flash-error-fg: #b01c2e;
  /* charts: ABtec blue first, orange as the contrasting second series */
  --chart-1: #1e88c1; --chart-2: #e8702a; --chart-critical: #d03b3b;
  --chart-grid: rgba(12,49,80,.10); --chart-axis: rgba(12,49,80,.22); --chart-text: #4a6478;
}
[data-theme="dark"] {
  --bg: #041423; --bg-2: #0a2a45; --surface: #0d2f4d; --border: rgba(160,205,235,.16);
  --glass: linear-gradient(145deg, rgba(120,190,235,.13), rgba(120,190,235,.05));
  --glass-edge: rgba(170,220,250,.20);
  --glass-shadow: inset 0 1px 0 rgba(200,235,255,.16), inset 0 -1px 0 rgba(0,0,0,.20), 0 22px 44px -24px rgba(0,0,0,.70), 0 2px 6px -2px rgba(0,0,0,.35);
  --field: rgba(4,20,35,.45);
  --blob-a: rgba(56,191,236,.24); --blob-b: rgba(30,136,193,.26); --blob-c: rgba(6,86,152,.42);
  --accent: #38bfec; --accent-hover: #6fd2f3; --accent-dim: rgba(56,191,236,.16); --on-accent: #04233a; --link: #7fd0f5;
  --success: #3ccf7a; --warning: #f5a524; --danger: #ff6b81;
  --text: #e6f1f8; --muted: #93b3c9; --hover: rgba(255,255,255,0.06);
  --side-bg: linear-gradient(165deg, rgba(8,36,60,.86), rgba(4,24,42,.84) 55%, rgba(6,62,110,.70));
  --sev-low-bg: #1d3b56;      --sev-low-fg: #c4d8e8;
  --sev-medium-bg: #3d2c05;   --sev-medium-fg: #fbbf24;
  --sev-high-bg: #40210a;     --sev-high-fg: #fb9a4c;
  --sev-critical-bg: #44121f; --sev-critical-fg: #ff8fa1;
  --flash-success-bg: #0c3a26; --flash-success-fg: #5fe096;
  --flash-warning-bg: #3d2c05; --flash-warning-fg: #fbbf24;
  --flash-error-bg: #44121f;   --flash-error-fg: #ff8fa1;
  --chart-1: #38bfec; --chart-2: #f08a4b; --chart-critical: #ff6b6b;
  --chart-grid: rgba(160,205,235,.13); --chart-axis: rgba(160,205,235,.28); --chart-text: #93b3c9;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); font-size: 14px; background: var(--bg); color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.4px; font-weight: 700; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; letter-spacing: -0.1px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.small { font-size: 12px; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--nav-w); flex-shrink: 0; background: var(--side-bg); color: var(--side-text);
  padding: 18px 12px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar a { color: inherit; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; text-decoration: none !important; color: #fff !important; }
.brand img { width: 34px; height: 34px; flex-shrink: 0; }
.brand b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.1; }
.brand small { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: .14em; color: var(--side-muted); margin-top: 3px; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -0.5px; padding: 0 10px 18px; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--side-text); margin-bottom: 2px; }
.nav a:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-accent); }
.nav-find { padding: 0 2px 12px; }
.sidebar .nav-find input { width: 100%; max-width: none; padding: 8px 10px; font-size: 13px; background: rgba(255,255,255,.07);
  border: 1px solid var(--side-line); color: #fff; }
.sidebar .nav-find input::placeholder { color: var(--side-muted); }
.sidebar .nav-find input:focus { outline: 2px solid var(--brand-accent); outline-offset: 0; }
.nav-group { margin-top: 2px; }
.nav-group summary { cursor: pointer; list-style: none; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--side-muted); padding: 12px 10px 6px; user-select: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "▸"; float: right; transition: transform .15s; }
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group summary:hover { color: #fff; }
.nav .section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); padding: 16px 10px 6px; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--side-line); font-size: 12px; color: var(--side-muted); }
.sidebar-foot a { color: var(--side-muted); margin-right: 10px; }
.sidebar-foot a:hover { color: #fff; }
.who { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--side-text); }
.who .av { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-accent); color: #04233a; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.main { flex: 1; min-width: 0; padding: 30px 36px 64px; max-width: 1500px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.main > .menu-btn { display: none; }  /* .btn comes later and would otherwise win */

@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .main { padding: 16px; }
  .main > .menu-btn { display: inline-block; margin-bottom: 12px; }
}

/* cards / grid */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s; }
a.stat:hover { transform: translateY(-1px); border-color: var(--brand-accent); text-decoration: none; }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.stat .l { font-size: 12px; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--border); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.truncate { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sev-low { background: var(--sev-low-bg); color: var(--sev-low-fg); }
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium-fg); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high-fg); }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }
.st-sanctioned { background: var(--sev-low-bg); color: var(--success); }
.st-tolerated { background: var(--sev-medium-bg); color: var(--sev-medium-fg); }
.st-unsanctioned { background: var(--sev-critical-bg); color: var(--sev-critical-fg); }
.badge-muted { background: var(--hover); color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.ok { color: var(--success); } .bad { color: var(--danger); } .warn { color: var(--warning); }

/* forms */
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 5px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 6px 16px 0 0; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; max-width: 560px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--field); color: var(--text); font: inherit; }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
input[type=color] { width: 60px; height: 34px; border: 1px solid var(--border); border-radius: 6px; background: none; padding: 2px; }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 620px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters > div { min-width: 140px; }
.filters label { margin-top: 0; font-size: 12px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
form.inline { display: inline; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.flash-success { background: var(--flash-success-bg); color: var(--flash-success-fg); }
.flash-warning { background: var(--flash-warning-bg); color: var(--flash-warning-fg); }
.flash-error { background: var(--flash-error-bg); color: var(--flash-error-fg); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.hl { background: var(--sev-medium-bg); }
.backtest-result { margin-top: 14px; }

/* charts */
.chart-box { position: relative; height: 240px; }
.chart-box.tall { height: 300px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h2 { margin: 0; }
.chart-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chart-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
details.table-view { margin-top: 10px; }
details.table-view summary { cursor: pointer; font-size: 12px; color: var(--muted); }
details.table-view table { margin-top: 8px; font-size: 12.5px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* alert timeline */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 81px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-row { display: grid; grid-template-columns: 70px 24px 1fr; align-items: start; padding: 5px 0; }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); margin: 4px 0 0 7px; position: relative;
          box-shadow: 0 0 0 2px var(--surface); }
.tl-dot-search { background: var(--chart-1); }
.tl-dot-video { background: var(--chart-2); }
.tl-dot-blocked { background: var(--danger); }
.tl-body { min-width: 0; overflow: hidden; }
.tl-day { position: sticky; top: 0; z-index: 1; margin: 14px 0 4px; padding: 6px 10px; font-size: 13px; font-weight: 600;
          background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.timeline > .tl-day:first-child { margin-top: 0; }
.tl-src { margin: 8px 0 2px 94px; font-size: 12px; color: var(--muted); }
.tl-src-device { color: var(--text); font-weight: 600; }
.tl-body .truncate { max-width: 100% !important; }
.tl-bg .tl-body { color: var(--muted); font-size: 12.5px; }
.tl-alert { background: var(--hover); border-radius: 6px; }
.tl-subject { outline: 2px solid var(--danger); outline-offset: -2px; }
@media (max-width: 600px) { .tl-row { grid-template-columns: 58px 20px 1fr; } .timeline::before { left: 67px; } }

/* printing (evidence pack, concern export): page content only */
@media print {
  .sidebar, .menu-btn, .noprint, .filters, .flash { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; color: #000; }
}

/* sortable tables (static/js/sortable.js) */
th.sort-h { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort-h:hover { color: var(--text); }
th.sort-h::after { content: " ↕"; opacity: .35; font-size: 10px; }
th.sort-h[aria-sort="ascending"]::after { content: " ▲"; opacity: .9; }
th.sort-h[aria-sort="descending"]::after { content: " ▼"; opacity: .9; }

/* ---- Oct 2026 UX pass ---- */
.nowrap { white-space: nowrap; }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.chips-l { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.chip { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 500; }
.chip:hover { border-color: var(--brand-accent); text-decoration: none; }
.chip.on { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
[data-theme="dark"] .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filters .dates > span { display: inline-flex; align-items: center; gap: 6px; }
.filters .dates input { width: 150px; }
.filters .btn + .btn { margin-left: 4px; }
/* a coloured edge per severity, so a list can be scanned instead of read */
tr.row-critical td:first-child { box-shadow: inset 4px 0 0 var(--chart-critical); }
tr.row-high td:first-child { box-shadow: inset 4px 0 0 var(--brand-orange); }
tr.row-medium td:first-child { box-shadow: inset 4px 0 0 var(--brand-amber); }
tr.row-low td:first-child { box-shadow: inset 4px 0 0 var(--border); }
.who-cell b { font-weight: 600; }
tr[onclick]:hover td { background: var(--accent-dim); }
.stat.stat-critical { border-top: 3px solid var(--chart-critical); }
.stat.stat-high { border-top: 3px solid var(--brand-orange); }
.stat.stat-medium { border-top: 3px solid var(--brand-amber); }
.stat.stat-low { border-top: 3px solid var(--border); }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px;
  border-radius: var(--radius); margin-bottom: 18px; border: 1px solid; text-decoration: none !important; }
.callout b { font-weight: 650; }
.callout-urgent { background: var(--sev-critical-bg); border-color: var(--chart-critical); color: var(--sev-critical-fg); }
.callout-urgent span { font-weight: 600; }
.callout-ok { background: var(--flash-success-bg); border-color: transparent; color: var(--flash-success-fg); justify-content: flex-start; }
/* alert detail */
.callout.summary { display: block; border-left-width: 6px; }
.callout-critical.summary { background: var(--sev-critical-bg); border-color: var(--chart-critical); color: var(--sev-critical-fg); }
.callout-high.summary { background: var(--sev-high-bg); border-color: var(--brand-orange); color: var(--sev-high-fg); }
.callout-medium.summary { background: var(--sev-medium-bg); border-color: var(--brand-amber); color: var(--sev-medium-fg); }
.callout-low.summary { background: var(--surface); border-color: var(--border); color: var(--text); }
.summary .sum-who { font-size: 17px; margin-bottom: 4px; }
.summary .sum-what { font-size: 15px; line-height: 1.5; }
.summary .muted { color: inherit; opacity: .8; }
.decide { border-top: 3px solid var(--brand-accent); }
h3.sub { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.decide h3.sub:first-of-type { margin-top: 4px; }
details.more > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.more[open] > summary { margin-bottom: 12px; }
dd.url { max-height: 4.6em; overflow-y: auto; word-break: break-all; }

/* in-app help */
.help-fab { position: fixed; right: 22px; bottom: 22px; z-index: 15; display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-navy); color: #fff !important; padding: 9px 15px 9px 10px; border-radius: 999px; font-weight: 600; font-size: 13px;
  box-shadow: 0 4px 14px rgba(12,49,80,.30); text-decoration: none !important; }
.help-fab span { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-accent); color: #04233a; display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; }
.help-fab:hover { background: #124a78; }
[data-theme="dark"] .help-fab { background: var(--surface); border: 1px solid var(--border); }
.help-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.help-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.help-toc input { max-width: none; margin-bottom: 10px; }
.help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-toc a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); font-size: 13px; }
.help-toc a:hover { background: var(--hover); text-decoration: none; }
.help-body { max-width: 860px; font-size: 15px; line-height: 1.65; padding: 28px 32px; }
.help-body h1 { font-size: 28px; margin-bottom: 14px; }
.help-body h2 { font-size: 20px; margin: 34px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); scroll-margin-top: 16px; }
.help-body h1 + p, .help-body h1 + p + p { color: var(--text); }
.help-body h3 { font-size: 16px; margin: 24px 0 8px; scroll-margin-top: 16px; }
.help-body table { margin: 12px 0 18px; font-size: 14px; }
.help-body td, .help-body th { vertical-align: top; }
.help-body th { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.help-body li { margin: 4px 0; }
.help-body code { font-family: var(--mono); font-size: 12.5px; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.flash-target { animation: flashbg 1.6s ease-out; }
@keyframes flashbg { from { background: var(--accent-dim); } to { background: transparent; } }
@media (max-width: 900px) { .help-layout { display: block; } .help-toc { position: static; max-height: none; margin-bottom: 14px; } .help-body { padding: 20px; } }
@media print { .help-fab { display: none !important; } .help-body { max-width: none; padding: 0; border: 0; } .help-layout { display: block; } }

/* evidence pack */
.glance .stat.glance-ok { border-left: 4px solid var(--success); }
.glance .stat.glance-check { border-left: 4px solid var(--brand-orange); }
.glance .stat .l { font-weight: 600; color: var(--text); }
.glance .glance-ok .l { color: var(--success); }
.glance .glance-check .l { color: var(--accent); }
ul.todo { margin: 0; padding-left: 20px; } ul.todo li { margin: 6px 0; }

/* system health */
.callout-warn { background: var(--flash-warning-bg); border-color: var(--brand-amber); color: var(--flash-warning-fg); justify-content: space-between; }
.dot.hl-ok { background: var(--success); } .dot.hl-warn { background: var(--brand-amber); } .dot.hl-bad { background: var(--danger); }
.strip { display: flex; gap: 2px; } .strip i { flex: 1; height: 22px; border-radius: 3px; background: var(--border); }
.strip i.s0, .sw.s0 { background: var(--success); } .strip i.s1, .sw.s1 { background: var(--brand-amber); }
.strip i.s2, .sw.s2 { background: var(--danger); } .strip i.sn, .sw.sn { background: var(--border); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 12px; vertical-align: -1px; }

.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 12px; }
.bulk-bar select { width: auto; max-width: 220px; }


/* ================= DeepView: liquid glass ================= */
html { background: var(--bg); }
body { background: transparent; position: relative; min-height: 100vh; line-height: 1.45; }
/* The water: two fixed layers of soft light that drift slowly past each other. Everything else floats on it. */
body::before, body::after { content: ""; position: fixed; z-index: -1; inset: -20vmax; pointer-events: none; }
body::before { background:
    radial-gradient(38vmax 38vmax at 18% 22%, var(--blob-a), transparent 62%),
    radial-gradient(44vmax 44vmax at 82% 78%, var(--blob-c), transparent 64%),
    linear-gradient(160deg, var(--bg-2), var(--bg) 60%);
  animation: dv-drift-a 46s ease-in-out infinite alternate; }
body::after { background:
    radial-gradient(30vmax 30vmax at 72% 16%, var(--blob-b), transparent 60%),
    radial-gradient(26vmax 26vmax at 30% 86%, var(--blob-a), transparent 62%);
  animation: dv-drift-b 58s ease-in-out infinite alternate; mix-blend-mode: normal; }
@keyframes dv-drift-a { from { transform: translate3d(-3vmax, -2vmax, 0) scale(1); } to { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); } }
@keyframes dv-drift-b { from { transform: translate3d(5vmax, 2vmax, 0) rotate(0deg); } to { transform: translate3d(-6vmax, -4vmax, 0) rotate(8deg); } }

h1 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.1; margin-bottom: 6px; }
h2 { font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -0.2px; }
.brand b, .stat .n { font-family: var(--display); }

/* glass panels: fill, blur what's behind, a bright top edge and a soft lift */
.card, .stat, .chip, .tl-day, .help-toc, details.card {
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
.card { border-radius: var(--radius); padding: 22px; position: relative; }
.stat { border-radius: var(--radius-sm); padding: 16px 18px; position: relative; overflow: hidden; }
.stat .n { font-size: 30px; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
a.stat:hover { transform: translateY(-2px); border-color: var(--brand-light); }
/* a highlight that follows the pointer across a panel, like light on wet glass (set by base.html) */
.card::after, .stat::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.32), transparent 70%); transition: opacity .25s; }
[data-theme="dark"] .card::after, [data-theme="dark"] .stat::after {
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(140,215,250,.14), transparent 70%); }
.card:hover::after, .stat:hover::after { opacity: 1; }
.card > *, .stat > * { position: relative; z-index: 1; }

/* the sidebar floats: a pane of dark glass with the water moving behind it */
.sidebar { background: var(--side-bg); -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%);
  margin: 12px 0 12px 12px; height: calc(100vh - 24px); top: 12px; border-radius: 24px; border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 24px 50px -24px rgba(4,24,42,.75); padding: 18px 12px 14px; scrollbar-width: thin; }
.brand { padding: 4px 8px 16px; gap: 11px; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 4px 10px rgba(56,191,236,.45)); }
.brand b { font-size: 21px; letter-spacing: -0.6px; }
.brand small { letter-spacing: .02em; font-size: 10.5px; font-weight: 500; text-transform: none; }
.nav a { border-radius: 11px; padding: 8px 12px; transition: background .15s, transform .15s; }
.nav a:hover { transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, rgba(56,191,236,.30), rgba(56,191,236,.08)); box-shadow: inset 0 0 0 1px rgba(140,215,250,.28), inset 0 1px 0 rgba(255,255,255,.18); }
.sidebar .nav-find input { border-radius: 11px; background: rgba(255,255,255,.09); }
.who .av { background: linear-gradient(140deg, var(--brand-light), var(--brand-blue)); color: #04233a; }
.sidebar-foot .abtec { display: block; margin: 12px 0 2px; opacity: .8; }
.sidebar-foot .abtec img { height: 20px; width: auto; display: block; }
.sidebar-foot .abtec span { display: block; font-size: 10.5px; margin-bottom: 4px; color: var(--side-muted); }
.main { padding: 34px 40px 72px; }

.btn { border-radius: 11px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 12px -6px rgba(12,49,80,.30);
  transition: transform .12s, box-shadow .12s, background .12s; }
[data-theme="dark"] .btn { box-shadow: inset 0 1px 0 rgba(200,235,255,.14), 0 4px 12px -6px rgba(0,0,0,.6); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary { background: linear-gradient(160deg, #1e88c1, #0e6aa3 55%, #065698); border-color: rgba(255,255,255,.28); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 8px 18px -8px rgba(6,86,152,.75); }
.btn-primary:hover { background: linear-gradient(160deg, #2797d3, #1176b3 55%, #0a63aa); border-color: rgba(255,255,255,.4); }
[data-theme="dark"] .btn-primary { background: linear-gradient(160deg, #5fd0f5, #38bfec 50%, #1e88c1); color: #04233a; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  border-radius: 10px; box-shadow: inset 0 1px 2px rgba(12,49,80,.07); }
.badge { box-shadow: inset 0 0 0 1px rgba(12,49,80,.06); }
.flash, .callout { border-radius: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
th { border-bottom: 1px solid var(--border); }
td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
.tl-day { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.chip { box-shadow: none; }
.chip.on { background: linear-gradient(160deg, #1e88c1, #065698); border-color: transparent; }
.help-fab { background: linear-gradient(160deg, rgba(12,49,80,.92), rgba(6,86,152,.88)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.18); }
.help-fab span { background: var(--brand-light); color: #04233a; }

/* page arrival: the content rises once, as a whole. It starts dimmed, not hidden, so a tab that
   isn't animating yet (in the background, or being printed) is still readable. */
.main > * { animation: dv-rise .45s cubic-bezier(.2,.7,.2,1); }
@keyframes dv-rise { from { opacity: .35; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* demo banner */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; border-radius: 999px; margin-bottom: 18px; font-size: 13px;
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }
.demo-bar .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-light); box-shadow: 0 0 0 0 rgba(56,191,236,.6); animation: dv-pulse 2.2s infinite; }
@keyframes dv-pulse { 70% { box-shadow: 0 0 0 9px rgba(56,191,236,0); } 100% { box-shadow: 0 0 0 0 rgba(56,191,236,0); } }

@media (max-width: 800px) {
  .sidebar { margin: 0; height: 100vh; top: 0; border-radius: 0 24px 24px 0; }
  .main { padding: 16px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .main > *, .demo-bar .pulse { animation: none !important; }
  .btn, .nav a, a.stat { transition: none; }
}
/* browsers without backdrop-filter get a near-solid panel instead of unreadable transparency */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .stat, .chip, .btn, .demo-bar { background: var(--surface); }
  .sidebar { background: #0c3150; }
}
@media print {
  body::before, body::after { display: none; }
  .card, .stat { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .main > * { animation: none; }
}
