/*
 * Pets Place Klantenservice (demo) — base + glass skin.
 * Same material as the CloneSyncer demo: dark frosted cards over a
 * photographed backdrop, Geist type, light big numbers, calm motion.
 * Brand: Pets Place red (#DD0611) for the mark, the active rail and live states.
 */
/* ---------------------------------------------------------------- tokens: dark (default) */
:root {
  --bg-img: url('assets/dutch-polder.webp');
  --bg: #0b0a0a;
  --bg-2: #0e0d0c;
  --panel: #181615;
  --panel-2: #211f1d;
  --well: #ffffff0a;
  --t0: #ffffff;
  --t1: #f5f2ef;
  --t2: #b4ada7;
  --t3: #7a726c;
  --t-nav: #cbc5c0;
  --on-photo-1: #ffffff;
  --on-photo-2: #ece8e4d9;
  --line: #ffffff14;
  --line-2: #ffffff0b;
  --up: #8fd19e;
  --down: #f0837a;
  --warn: #e9b872;
  --info: #9cc3e8;
  --brand: #c8202b;
  --brand-hi: #ff4d52;
  --ai: #f3c7a2;
  /* status text on tinted chips */
  --up-t: #a6dcb1;
  --down-t: #f5a097;
  --warn-t: #efc78e;
  --info-t: #b4d3ef;
  --brand-t: #ffb0b3;
  --ai-t: #f6d3b5;
  /* inverse (primary button, solid tag) */
  --inv-bg: #f3efeb;
  --inv-fg: #12100f;
  --inv-hi: #ffffff;
  /* surfaces */
  --surf-a: #1e1c1bf0;
  --surf-b: #141312f2;
  --draft-a: #24201ef5;
  --draft-b: #1b1817f7;
  --bub-a: #2a2725e6;
  --bub-b: #221f1ee6;
  --pop: #1c1a19f7;
  --side-m: #121110f7;
  --chrome: #0c0b0a8c;
  --chrome-hi: #1d1b1acc;
  --scrim: #070605a6;
  --scrim-2: #07060566;
  /* white overlays (wXX) and black shades (kXX), by alpha */
  --w05: #ffffff05; --w06: #ffffff06; --w07: #ffffff07; --w08: #ffffff08; --w0a: #ffffff0a; --w0b: #ffffff0b; --w0c: #ffffff0c; --w0d: #ffffff0d; --w0f: #ffffff0f; --w10: #ffffff10; --w12: #ffffff12; --w14: #ffffff14; --w16: #ffffff16; --w17: #ffffff17; --w1a: #ffffff1a; --w1c: #ffffff1c; --w21: #ffffff21; --w22: #ffffff22; --w26: #ffffff26; --w30: #ffffff30; --w33: #ffffff33; --w38: #ffffff38; --w3d: #ffffff3d; --w40: #ffffff40; --w5c: #ffffff5c; --w66: #ffffff66;
  --k2b: #0000002b; --k2e: #0000002e; --k33: #00000033; --k40: #00000040; --k4d: #0000004d; --k59: #00000059; --k66: #00000066; --k77: #00000077; --k80: #00000080; --k88: #00000088; --k99: #00000099; --kaa: #000000aa; --kff: #000000ff;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --r: 10px;
  --r-lg: 22px;
  --side: 232px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --glass:
    linear-gradient(180deg, #1e1c1bf4, #141312f7) padding-box,
    linear-gradient(180deg, #ffffff33 0%, #ffffff10 22%, #ffffff07 60%, #ffffff12 100%) border-box;
  --glass-2:
    linear-gradient(180deg, #252321f2, #1a1817f5) padding-box,
    linear-gradient(180deg, #ffffff2b 0%, #ffffff0d 40%, #ffffff10 100%) border-box;
  --drop: 0 1px 0 #00000066, 0 24px 48px -26px #000000d9;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- tokens: light (Pets Place white) */
:root[data-theme="light"] {
  --bg: #f3f0ed;
  --bg-2: #f6f4f1;
  --panel: #ffffff;
  --panel-2: #f8f6f4;
  --well: rgb(16 38 72 / 0.07);
  --t0: #140e0c;
  --t1: #1f1816;
  --t2: #574d48;
  --t3: #776c66;
  --t-nav: #3d3431;
  --on-photo-1: #140e0c;
  --on-photo-2: #574d48;
  --line: rgb(16 38 72 / 0.1);
  --line-2: rgb(16 38 72 / 0.06);
  --up: #1d8048;
  --down: #c2352a;
  --warn: #a5620a;
  --info: #2766aa;
  --brand: #c8202b;
  --brand-hi: #c8050f;
  --ai: #b0582a;
  --up-t: #17703d;
  --down-t: #ae2a20;
  --warn-t: #8a5000;
  --info-t: #1f5795;
  --brand-t: #b0030c;
  --ai-t: #974a20;
  --inv-bg: #1f1816;
  --inv-fg: #ffffff;
  --inv-hi: #362c29;
  --surf-a: #fffffffa;
  --surf-b: #fcfbfaf7;
  --draft-a: #fffffffc;
  --draft-b: #fdfbf9fa;
  --bub-a: #f6f1ee;
  --bub-b: #f3eeea;
  --pop: #fffffffa;
  --side-m: #fbfaf9fa;
  --chrome: #ffffffd9;
  --chrome-hi: #ffffff;
  --scrim: rgb(40 28 24 / 0.28);
  --scrim-2: rgb(40 28 24 / 0.16);
  --w05: rgb(16 38 72 / 0.030); --w06: rgb(16 38 72 / 0.030); --w07: rgb(16 38 72 / 0.030); --w08: rgb(16 38 72 / 0.030); --w0a: rgb(16 38 72 / 0.031); --w0b: rgb(16 38 72 / 0.035); --w0c: rgb(16 38 72 / 0.038); --w0d: rgb(16 38 72 / 0.041); --w0f: rgb(16 38 72 / 0.047); --w10: rgb(16 38 72 / 0.050); --w12: rgb(16 38 72 / 0.056); --w14: rgb(16 38 72 / 0.063); --w16: rgb(16 38 72 / 0.069); --w17: rgb(16 38 72 / 0.072); --w1a: rgb(16 38 72 / 0.082); --w1c: rgb(16 38 72 / 0.088); --w21: rgb(16 38 72 / 0.104); --w22: rgb(16 38 72 / 0.107); --w26: rgb(16 38 72 / 0.119); --w30: rgb(16 38 72 / 0.151); --w33: rgb(16 38 72 / 0.160); --w38: rgb(16 38 72 / 0.176); --w3d: rgb(16 38 72 / 0.191); --w40: rgb(16 38 72 / 0.201); --w5c: rgb(16 38 72 / 0.289); --w66: rgb(16 38 72 / 0.320);
  --k2b: rgb(16 38 72 / 0.034); --k2e: rgb(16 38 72 / 0.036); --k33: rgb(16 38 72 / 0.040); --k40: rgb(16 38 72 / 0.050); --k4d: rgb(16 38 72 / 0.060); --k59: rgb(16 38 72 / 0.070); --k66: rgb(16 38 72 / 0.080); --k77: rgb(16 38 72 / 0.093); --k80: rgb(16 38 72 / 0.100); --k88: rgb(16 38 72 / 0.107); --k99: rgb(16 38 72 / 0.120); --kaa: rgb(16 38 72 / 0.133); --kff: rgb(16 38 72 / 0.200);
  --glass:
    linear-gradient(180deg, #ffffff, #fefdfc) padding-box,
    linear-gradient(180deg, rgb(16 38 72 / 0.1), rgb(16 38 72 / 0.07)) border-box;
  --glass-2:
    linear-gradient(180deg, #fbf9f7, #f8f5f3) padding-box,
    linear-gradient(180deg, rgb(16 38 72 / 0.1), rgb(16 38 72 / 0.07)) border-box;
  --drop: 0 1px 2px rgb(16 38 72 / 0.05), 0 18px 40px -30px rgb(16 38 72 / 0.28);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--t1);
  font: 400 13.5px/1.45 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; overflow: clip;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
::selection { background: #c8202b44; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
h1, h2, h3, h4 { font-weight: 500; margin: 0; letter-spacing: -0.025em; }
.muted { color: var(--t2); } .dim { color: var(--t3); }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.eyebrow { font-size: 12px; color: var(--t3); font-weight: 450; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: clip; }
.side { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px 14px; min-width: 0; overflow: clip; }
/* overflow: clip, not hidden: a hidden box can still be scrolled sideways by focus or scrollIntoView, which showed the right ends of the labels in the rail */
a.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; color: var(--t1); text-decoration: none; }
a.brand img { width: 42px; height: 28px; border-radius: 7px; flex: none; box-shadow: 0 6px 18px -6px #c8202b99, inset 0 0 0 1px var(--w1a); }
.brand-word { font-size: 15.5px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; }
.brand-word small { display: block; font-size: 11.5px; color: var(--t3); font-weight: 400; letter-spacing: 0; margin-top: 2px; }
.nav { position: relative; display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 12px; color: var(--t3); padding: 16px 12px 6px; white-space: nowrap; }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
  color: var(--t-nav); text-decoration: none; border-radius: 10px; font-weight: 450; white-space: nowrap; transition: color 0.25s;
}
.nav a svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.nav a:hover, .nav a.on { color: var(--t0); }
.nav a .n { margin-left: auto; font-size: 11px; color: var(--t3); font-variant-numeric: tabular-nums; }
.nav a .n.hot { color: var(--brand-t); background: #c8202b33; padding: 1px 7px; border-radius: 999px; }
.nav a.hidden { display: none; }
.nav-ind { position: absolute; left: 0; right: 0; top: 0; height: 34px; border-radius: 10px; background: var(--w10); box-shadow: inset 0 1px 0 var(--w0d); transition: transform 0.55s var(--ease), opacity 0.3s; z-index: 0; }
.nav-ind::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); box-shadow: 0 0 12px #c8202b; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.ai-pill { border: 1px solid transparent; border-radius: 18px; padding: 13px 14px; background: var(--glass); box-shadow: var(--drop); }
.ai-pill .row1 { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; }
.ai-pill .big { font-size: 26px; font-weight: 400; letter-spacing: -0.05em; line-height: 1; margin-top: 10px; }
.ai-pill .meta { font-size: 11.5px; color: var(--t3); margin-left: 6px; letter-spacing: 0; }
.ai-bar { display: flex; gap: 2px; margin-top: 10px; height: 14px; }
.ai-bar i { border-radius: 3px; transition: flex-grow 1.2s var(--ease); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 6px 2px; border-radius: 12px; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.me:hover { background: var(--w08); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #ece7e2; color: #12100f; font: 600 10.5px var(--sans); flex: none; }
.me .who { font-size: 12.5px; font-weight: 500; line-height: 1.25; white-space: nowrap; }
.me .who span { display: block; font-size: 11px; color: var(--t3); font-weight: 400; }

.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex: none; display: inline-block; }
.live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--up); animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite; }
.live.red { background: var(--brand-hi); } .live.red::after { border-color: var(--brand-hi); }
.live.warn { background: var(--warn); } .live.warn::after { border-color: var(--warn); }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

/* floating canvas with the photograph */
.main {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0;
  margin: 12px 12px 12px 0; height: calc(100dvh - 24px); border-radius: 26px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--w10), 0 30px 80px -30px var(--kff);
}
.main::before {
  content: ''; position: absolute; inset: -2%; z-index: -3; background: var(--bg-img) center 55% / cover no-repeat;
  transform: scale(1.04); transition: opacity 0.6s ease; animation: bgIn 2.2s var(--ease) both;
}
.main.swap::before, .main.bd-live::before { opacity: 0; }
.main::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #0a080766 0%, #0a080740 24%, #0a080780 62%, #0a0807d9 100%), radial-gradient(130% 90% at 50% 10%, transparent 40%, #0a08079c 100%);
}
.bd { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; animation: bgIn 1.8s var(--ease) both; transition: opacity 0.38s ease; }
@keyframes bgIn { from { opacity: 0; transform: scale(1.04); filter: blur(8px); } }

.top { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 22px; flex: none; position: relative; z-index: 3; }
.crumb { color: var(--on-photo-2); font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.demo-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--warn-t); background: color-mix(in srgb, var(--warn) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 21%, transparent); }
.top .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 9px; width: 320px; height: 36px; border-radius: 999px; padding: 0 8px 0 14px; border: 0;
  background: var(--chrome); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 0 0 1px var(--w14); color: var(--t-nav); font-size: 12.5px; cursor: text; text-align: left;
}
.search svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; flex: none; }
.search span.t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { border: 0; background: var(--w12); border-radius: 6px; padding: 2px 6px; color: var(--t2); font-size: 10.5px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0; flex: none;
  background: var(--chrome); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--w14);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { background: var(--chrome-hi); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 15px; height: 15px; stroke: var(--t-nav); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 9.5px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--bg-2); }
.icon-btn.plain { background: transparent; backdrop-filter: none; box-shadow: none; width: 30px; height: 30px; }
.icon-btn.plain:hover { background: var(--w10); }
.menu-btn { display: none; }

.view { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--w22) transparent; }
.view.fixed { overflow: clip; }
.page { padding: 10px 24px 80px; max-width: 1480px; margin: 0 auto; }
.page.full { padding: 0 18px 18px; max-width: none; height: 100%; }
.page.out { opacity: 0; transform: translateY(-4px) scale(0.995); filter: blur(4px); transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease; }
.page-head { display: flex; align-items: flex-end; gap: 18px; margin: 8px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 36px; font-weight: 400; letter-spacing: -0.045em; line-height: 1.04; color: var(--on-photo-1); text-shadow: 0 2px 30px var(--k66); }
.page-head p { color: var(--on-photo-2); font-size: 14px; margin: 9px 0 0; max-width: 680px; text-shadow: 0 1px 14px var(--k88); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.in-wait { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(8px); }
.in-wait.in-go { opacity: 1; transform: none; filter: none; transition: opacity 0.8s var(--ease) var(--d), transform 1s var(--ease) var(--d), filter 0.8s ease var(--d); }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.panel { position: relative; min-width: 0; border: 1px solid transparent; border-radius: var(--r-lg); padding: 20px 22px; background: var(--glass); box-shadow: var(--drop); }
.panel.flush { padding: 0; overflow: hidden; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.panel-h > div:first-child { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.panel-h h3 { font-size: 15px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.panel-h .sub { font-size: 12.5px; color: var(--t3); }
.panel-h .sub::before { content: '· '; }
.panel-h .r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.hr { height: 1px; background: var(--w0d); margin: 16px 0; }

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 34px; font-weight: 400; letter-spacing: -0.05em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--t3); display: flex; gap: 8px; align-items: center; }
.pchip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 550; background: var(--w0f); color: var(--t2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pchip.up { background: color-mix(in srgb, var(--up) 12%, transparent); color: var(--up-t); }
.pchip.down { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down-t); }
.pchip.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn-t); }

/* ---------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 15px; border-radius: 999px; border: 0;
  background: var(--w10); color: var(--t1); font-weight: 500; font-size: 12.5px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--w0f);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--w1a); }
.btn:active { transform: scale(0.96); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.primary { background: var(--inv-bg); color: var(--inv-fg); box-shadow: 0 1px 0 var(--w40) inset, 0 6px 16px -8px var(--kff); }
.btn.primary:hover { background: var(--inv-hi); }
.btn.brand { background: var(--brand); color: #fff; box-shadow: 0 1px 0 var(--w30) inset, 0 8px 22px -10px #c8202b; }
.btn.brand:hover { background: #d92c37; }
.btn.danger { color: var(--down-t); background: color-mix(in srgb, var(--down) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 22%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--down) 15%, transparent); }
.btn.ok { color: var(--up-t); background: color-mix(in srgb, var(--up) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 23%, transparent); }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.btn.xs { height: 24px; padding: 0 9px; font-size: 11.5px; gap: 5px; }
.btn.xs svg { width: 12px; height: 12px; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--t2); }
.btn.ghost:hover { background: var(--w0d); color: var(--t1); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.top .btn { height: 36px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; position: relative; background: var(--k4d); box-shadow: inset 0 1px 3px var(--k80), 0 1px 0 var(--w0d); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--t3); transition: color 0.25s; white-space: nowrap; }
.seg button.on { color: var(--t1); }
.seg .seg-ind { position: absolute; top: 3px; bottom: 3px; border-radius: 999px; background: var(--w17); box-shadow: inset 0 1px 0 var(--w14), 0 2px 6px var(--k66); transition: left 0.45s cubic-bezier(0.2, 0.9, 0.1, 1), width 0.45s cubic-bezier(0.2, 0.9, 0.1, 1); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--w0b); color: var(--t2); font-size: 12px; font-weight: 500; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.chip:hover { background: var(--w14); color: var(--t1); }
.chip.on { background: var(--w21); color: var(--t0); box-shadow: inset 0 0 0 1px var(--w26); }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 550; background: var(--w0f); color: var(--t2); white-space: nowrap; }
.tag svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag.ok { background: color-mix(in srgb, var(--up) 11%, transparent); color: var(--up-t); }
.tag.warn { background: color-mix(in srgb, var(--warn) 11%, transparent); color: var(--warn-t); }
.tag.bad { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down-t); }
.tag.red { background: #c8202b2e; color: var(--brand-t); }
.tag.info { background: color-mix(in srgb, var(--info) 11%, transparent); color: var(--info-t); }
.tag.ai { background: color-mix(in srgb, var(--ai) 10%, transparent); color: var(--ai-t); }
.tag.solid { background: var(--inv-bg); color: var(--inv-fg); }
.tag.member { background: linear-gradient(90deg, #c8202b40, #c8202b18); color: var(--brand-t); box-shadow: inset 0 0 0 1px #c8202b55; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

.sw { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--w17); box-shadow: inset 0 1px 2px var(--k77); border: 0; padding: 0; transition: background 0.3s ease; flex: none; }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #a39d98; box-shadow: 0 1px 3px var(--k88); transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.3s; }
.sw.on { background: #6fbf84; }
.sw.on::after { transform: translateX(14px); background: #fff; }
.sw.red.on { background: var(--brand); }

.input {
  height: 36px; border-radius: 10px; border: 0; background: var(--k4d); color: var(--t1); padding: 0 12px; outline: none; min-width: 0;
  box-shadow: inset 0 1px 3px var(--k99), 0 1px 0 var(--w0d); transition: box-shadow 0.2s;
}
.input:focus { box-shadow: inset 0 1px 3px var(--k99), 0 0 0 1px var(--w3d); }
.input.sm { height: 28px; border-radius: 8px; font-size: 12px; padding: 0 9px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--t2) 50%), linear-gradient(135deg, var(--t2) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%; background-size: 4px 4px; background-repeat: no-repeat; background-color: var(--k4d); }
select.input option { background: var(--panel); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--t3); font-size: 12px; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px; background: var(--w17); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px var(--kaa), 0 0 0 5px var(--w14); cursor: grab; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 400; font-size: 12px; color: var(--t3); padding: 0 12px 12px; border-bottom: 1px solid var(--w0d); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid var(--w08); font-variant-numeric: tabular-nums; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.2s; }
.tbl tbody tr:hover { background: var(--w06); }
.tbl td:first-child, .tbl th:first-child { padding-left: 4px; }
.tbl .r { text-align: right; }
.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }

/* meters & charts */
.meter { position: relative; height: 5px; border-radius: 999px; background: var(--w0d); overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #6fbf8499, var(--up)); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease), background 0.4s; }
.meter.hot i { background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 53%, transparent), var(--warn)); }
.meter.max i { background: linear-gradient(90deg, color-mix(in srgb, var(--down) 53%, transparent), var(--down)); }
.meter .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--w40); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.ax { font: 11px var(--sans); fill: var(--w5c); font-variant-numeric: tabular-nums; }
.grid-l { stroke: var(--w0b); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 12px; border-radius: 12px; background: var(--pop); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--w17), 0 12px 30px -10px var(--kff); font-size: 11.5px; white-space: nowrap; transform: translate(-50%, calc(-100% - 6px)); opacity: 0; transition: opacity 0.18s ease; }
.tip b { display: block; font-size: 15px; font-weight: 450; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--t1); }
.tip.on { opacity: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--t3); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.ring-wrap { position: relative; display: grid; place-items: center; flex: none; }
.ring-wrap .c { position: absolute; text-align: center; }
.big { font-size: 22px; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.c-pulse { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--c, var(--up)); opacity: 0; pointer-events: none; }
.c-pulse.on.vis { animation: cpulse 2.4s ease-out infinite; }
@keyframes cpulse { 0% { transform: scale(0.8); opacity: 0.7; } 100% { transform: scale(3.4); opacity: 0; } }

/* rolling digits */
.roller { display: inline-flex; font-variant-numeric: tabular-nums; }
.roller .rc { position: relative; display: inline-block; overflow: hidden; height: 1.18em; margin: -0.09em 0; line-height: 1.18em; }
.roller .rg { visibility: hidden; }
.roller .rs { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; will-change: transform; }
.roller .rs > span { height: 1.18em; line-height: 1.18em; text-align: center; }
.roller .rx { display: inline-block; line-height: 1em; white-space: pre; }

/* lists */
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--w0a); }
.li:last-child { border-bottom: 0; }

/* banners, toasts, modal, drawer */
.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: 16px; border: 1px solid transparent;
  background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 8%, transparent), transparent 45%) padding-box, linear-gradient(180deg, var(--surf-a), var(--surf-b)) padding-box, linear-gradient(180deg, color-mix(in srgb, var(--warn) 33%, transparent), var(--w0a) 60%) border-box;
}
.banner.bad { background: linear-gradient(90deg, #c8202b1f, transparent 50%) padding-box, linear-gradient(180deg, var(--surf-a), var(--surf-b)) padding-box, linear-gradient(180deg, color-mix(in srgb, var(--brand-hi) 40%, transparent), var(--w0a) 60%) border-box; }
.banner.calm { background: linear-gradient(90deg, color-mix(in srgb, var(--info) 7%, transparent), transparent 50%) padding-box, linear-gradient(180deg, var(--surf-a), var(--surf-b)) padding-box, linear-gradient(180deg, color-mix(in srgb, var(--info) 27%, transparent), var(--w0a) 60%) border-box; }
.banner > svg { width: 17px; height: 17px; flex: none; margin-top: 1px; stroke: var(--warn); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.banner.bad > svg { stroke: var(--brand-hi); } .banner.calm > svg { stroke: var(--info); }
.banner .bt { font-weight: 500; font-size: 13px; }
.banner .bs { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.banner .r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }

.toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 300; }
.toast { width: 350px; max-width: calc(100vw - 32px); display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 18px; border: 1px solid transparent; background: var(--glass); backdrop-filter: blur(24px); box-shadow: 0 24px 50px -20px var(--kff); animation: toastin 0.6s var(--ease); }
.toast.out { animation: toastout 0.35s ease forwards; }
/* arrival notice: small, in the empty middle of the top bar so it never covers a pane; hides itself */
.toasts.top { top: 18px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); }
.toasts.top { transition: opacity 0.25s ease, visibility 0.25s; }
body:has(.drawer:not(.out)) .toasts.top, body:has(.scrim:not(.out)) .toasts.top { opacity: 0; visibility: hidden; pointer-events: none; }
.toast.sm { width: 300px; padding: 10px 10px 10px 12px; border-radius: 14px; gap: 10px; align-items: center; }
.toast.sm .tt { font-size: 12.5px; }
.toast.sm .ts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.sm .live { margin-top: 0; }
.toast .tt { font-weight: 500; font-size: 13px; }
.toast .ts { font-size: 12px; color: var(--t3); margin-top: 2px; }
.toast .live { margin-top: 5px; }
@keyframes toastin { from { opacity: 0; transform: translateY(16px) scale(0.98); filter: blur(4px); } }
@keyframes toastout { to { opacity: 0; transform: translateX(30px); } }
.scrim { position: fixed; inset: 0; z-index: 200; background: var(--scrim); backdrop-filter: blur(10px) saturate(0.8); display: grid; place-items: center; animation: fade 0.3s ease; padding: 16px; }
.scrim.out { animation: fadeout 0.25s ease forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.modal { width: 560px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 26px; border: 1px solid transparent; background: var(--glass); padding: 26px; box-shadow: 0 40px 100px -30px var(--kff); animation: pop 0.6s var(--ease); }
.modal.wide { width: 760px; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.modal h2 { font-size: 26px; font-weight: 400; letter-spacing: -0.04em; }
.modal p { color: var(--t2); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; z-index: 210; background: var(--glass); box-shadow: -30px 0 80px -20px var(--kff); border-radius: 26px 0 0 26px; overflow-y: auto; animation: drawin 0.55s var(--ease); }
.drawer.out { animation: drawout 0.3s ease forwards; }
.drawer-scrim { position: fixed; inset: 0; z-index: 205; background: var(--scrim-2); animation: fade 0.3s ease; }
.drawer-scrim.out { animation: fadeout 0.25s ease forwards; }
@keyframes drawin { from { transform: translateX(100%); } }
@keyframes drawout { to { transform: translateX(100%); } }

/* misc */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.small { font-size: 12px; } .xs { font-size: 11px; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* login */
.login { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: var(--bg); isolation: isolate; padding: 16px; transition: opacity 0.7s ease, transform 0.9s var(--ease), filter 0.7s; }
.login::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--bg-img) center / cover; opacity: 0.75; animation: bgIn 2.4s var(--ease) both; }
.login::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 60% at 50% 50%, #0b0a0a33, #0b0a0acc); }
.login.leave { opacity: 0; transform: scale(1.03); filter: blur(8px); pointer-events: none; }
.login-card { width: 400px; max-width: 100%; text-align: center; padding: 38px 34px 28px; border-radius: 30px; border: 1px solid transparent; background: var(--glass); box-shadow: 0 40px 100px -30px var(--kff); }
.login-card .mark { width: 84px; height: 56px; margin: 0 auto 22px; border-radius: 12px; box-shadow: 0 18px 40px -12px #c8202baa; display: block; }
.login-card h1 { font-size: 30px; font-weight: 400; letter-spacing: -0.045em; }
.login-card p { color: var(--t2); margin: 8px 0 24px; }
.login-card .btn { width: 100%; height: 44px; margin-bottom: 10px; }
.login-card .fine { font-size: 11.5px; color: var(--t3); margin-top: 14px; line-height: 1.5; }
.login-rise > * { opacity: 0; transform: translateY(10px); animation: rise 0.9s var(--ease) forwards; }
.login-rise > *:nth-child(2) { animation-delay: 0.3s; } .login-rise > *:nth-child(3) { animation-delay: 0.4s; }
.login-rise > *:nth-child(4) { animation-delay: 0.5s; } .login-rise > *:nth-child(5) { animation-delay: 0.58s; } .login-rise > *:nth-child(6) { animation-delay: 0.66s; } .login-rise > *:nth-child(7) { animation-delay: 0.72s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 16px; }
.role-pick button { border: 0; border-radius: 12px; padding: 10px 6px; background: var(--w08); box-shadow: inset 0 0 0 1px var(--w0f); font-size: 12px; color: var(--t2); transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.role-pick button.on { background: var(--w17); color: var(--t0); box-shadow: inset 0 0 0 1px var(--w33); }
.role-pick button b { display: block; font-weight: 500; font-size: 12.5px; color: var(--t1); }

.shell.rail { --side: 68px; }
.shell.rail .side { padding: 20px 10px 14px; }
.shell.rail a.brand { padding: 2px 0 22px; justify-content: center; }
.shell.rail a.brand img { width: 40px; height: 27px; }
.shell.rail .brand-word, .shell.rail .nav a .lbl, .shell.rail .nav a .n, .shell.rail .ai-pill, .shell.rail .me .who { display: none; }
.shell.rail .nav a { padding: 0; justify-content: center; }
.shell.rail .nav-label { height: 14px; padding: 0; font-size: 0; }
.shell.rail .nav-ind::before { left: -10px; }
.shell.rail .me { justify-content: center; }
@media (max-width: 1360px) { .search { width: 240px; } }
@media (max-width: 1100px) {
  .c3 { grid-column: span 6; } .c4, .c5, .c7, .c8, .c9, .c6 { grid-column: span 12; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 220; top: 0; bottom: 0; left: 0; width: 248px; background: var(--side-m); transform: translateX(-105%); transition: transform 0.45s var(--ease); box-shadow: 30px 0 60px -20px var(--kff); padding: 20px 12px 14px; }
  .side.open { transform: none; }
  .side .brand-word, .side .nav-label, .side .nav a .lbl, .side .nav a .n, .side .ai-pill, .side .me .who { display: initial; }
  .side .nav a { padding: 0 12px; justify-content: flex-start; }
  .side .nav-label { display: block; height: auto; padding: 16px 12px 6px; font-size: 12px; }
  .side .ai-pill { display: block; }
  .side .brand-word { display: block; }
  .side .nav a .n { display: inline; }
  .main { margin: 0; border-radius: 0; height: 100dvh; }
  .menu-btn { display: grid; }
  .top { padding: 0 16px; height: 58px; }
  .search { width: 36px; padding: 0; justify-content: center; }
  .search span.t, .search .kbd { display: none; }
  .crumb .when { display: none; }
  .page { padding: 6px 16px 60px; }
  .page.full { padding: 0 8px 8px; }
  .page-head h1 { font-size: 28px; }
  .c3 { grid-column: span 12; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .toasts.top { top: 64px; bottom: auto; left: 16px; right: 16px; transform: none; }
  .toast { width: auto; }
  .drawer { width: 100vw; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------- theme switching: logo and light-only surfaces */
:root:not([data-theme="light"]) .logo-l, :root[data-theme="light"] .logo-d { display: none !important; }
a.brand img.logo-d { box-shadow: none; border-radius: 0; }
.login-card .mark.logo-d { box-shadow: none; border-radius: 0; }
:root[data-theme="light"] body { background: var(--bg); }
:root[data-theme="light"] .main { box-shadow: 0 0 0 1px rgb(16 38 72 / 0.07), 0 30px 80px -44px rgb(16 38 72 / 0.3); }
/* a very soft wash of the photograph, then calm warm white */
:root[data-theme="light"] .main::before { opacity: 0.13; filter: saturate(0.55); }
:root[data-theme="light"] .main.swap::before, :root[data-theme="light"] .main.bd-live::before { opacity: 0; }
:root[data-theme="light"] .main::after { background: linear-gradient(180deg, #f6f4f1a6 0%, #f6f4f1e0 28%, #f6f4f1f5 60%, #f6f4f1 100%); }
:root[data-theme="light"] .login::before { opacity: 0.2; filter: saturate(0.55); }
:root[data-theme="light"] .login::after { background: radial-gradient(60% 60% at 50% 50%, #f3f0ed8c, #f3f0edf0); }
:root[data-theme="light"] .page-head h1, :root[data-theme="light"] .page-head p { text-shadow: none; }
:root[data-theme="light"] .icon-btn, :root[data-theme="light"] .search { box-shadow: inset 0 0 0 1px rgb(16 38 72 / 0.12), 0 1px 2px rgb(16 38 72 / 0.05); }
:root[data-theme="light"] .sw::after { background: #fff; box-shadow: 0 1px 3px rgb(16 38 72 / 0.3); }
:root[data-theme="light"] .sw { background: rgb(16 38 72 / 0.16); }
:root[data-theme="light"] .sw.on { background: #2f9a5a; }
:root[data-theme="light"] .sw.red.on { background: var(--brand); }
:root[data-theme="light"] .pet-av svg { stroke: color-mix(in srgb, var(--pt) 58%, #2a1a14); }
:root[data-theme="light"] .pet-av { background: color-mix(in srgb, var(--pt) 22%, transparent); }
:root[data-theme="light"] .avatar, :root[data-theme="light"] .cp-av { background: linear-gradient(140deg, #efe8e3, #e2d8d1); }
:root[data-theme="light"] .slider::-webkit-slider-thumb { box-shadow: 0 1px 4px rgb(16 38 72 / 0.35), 0 0 0 5px rgb(16 38 72 / 0.08); }
:root[data-theme="light"] .nav-ind::before { box-shadow: none; }
:root[data-theme="light"] .ai-mark { box-shadow: none; }
:root[data-theme="light"] .tag.member { background: #c8202b14; box-shadow: inset 0 0 0 1px #c8202b33; }
:root[data-theme="light"] .tag.red, :root[data-theme="light"] .flag.on.gezondheid { background: #c8202b14; }
:root[data-theme="light"] .ring-orb { box-shadow: 0 20px 50px -16px #c8202b88; }
:root[data-theme="light"] .side { background: transparent; }
@media (max-width: 860px) { :root[data-theme="light"] .side { background: var(--side-m); box-shadow: 30px 0 60px -30px rgb(16 38 72 / 0.3); } }
a.btn { text-decoration: none; }
