/* Vivid Terminal: stijlsysteem "Observatorium, verfijnd" (zie brand/ en het Design System-artifact) */
:root {
  --night: #06090D; --night-raised: #0C1219; --glass: rgba(18,26,36,0.55); --glass-line: rgba(234,240,246,0.09);
  --glass-hi: rgba(255,255,255,0.06); --ink: #EAF0F6; --ink-soft: #C7D2DD; --ink-muted: #8A97A6;
  --ice: #7CC8FF; --ice-deep: #3E9BE6; --focus: #9BD5FF; --amber: #F5B355; --rise: #5EE0B0; --fall: #FF8577;
  --r-sm: 10px; --r-md: 16px; --r-lg: 20px;
  --shadow-panel: inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 60px rgba(0,0,0,0.35);
  --shadow-btn: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.4);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 22px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(234,240,246,0.07) 1px, transparent 1px); background-size: 28px 28px; z-index: 0; }
body::after { content: ""; position: fixed; width: 760px; height: 760px; left: -200px; top: -300px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(108,196,255,0.18), rgba(108,196,255,0) 65%); z-index: 0; }
a { color: var(--focus); } a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 36px; line-height: 40px; font-weight: 500; letter-spacing: -0.5px; }
h2 { font-size: 20px; line-height: 28px; font-weight: 500; }
h3 { font-size: 15px; line-height: 22px; font-weight: 500; }
.muted { color: var(--ink-muted); } .soft { color: var(--ink-soft); } .small { font-size: 13px; line-height: 18px; } .tiny { font-size: 12px; line-height: 16px; }
.rise { color: var(--rise); } .fall { color: var(--fall); } .amber { color: var(--amber); } .ice { color: var(--ice); }
.num { font-variant-numeric: tabular-nums; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }

#app { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 16px clamp(12px, 3vw, 36px) 56px; display: flex; flex-direction: column; gap: 20px; min-height: 100vh; }

.glass { background: var(--glass); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); border: 1px solid var(--glass-line); box-shadow: var(--shadow-panel); }
.panel { border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.panel.tight { padding: 14px 16px; }
.tile { border-radius: var(--r-md); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.box { border-radius: 14px; background: rgba(12,18,25,0.7); border: 1px solid rgba(234,240,246,0.08); padding: 12px 14px; }

/* layout helpers */
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row.g12 { gap: 12px; } .row.g8 { gap: 8px; } .row.center { align-items: center; } .row.between { justify-content: space-between; } .row.end { align-items: flex-end; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; } .col.g12 { gap: 12px; } .col.g8 { gap: 8px; } .col.g4 { gap: 4px; }
.grow { flex: 999 1 560px; min-width: 0; } .side { flex: 1 1 340px; min-width: 0; } .third { flex: 1 1 300px; min-width: 0; } .quarter { flex: 1 1 200px; min-width: 0; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* header */
.topbar { border-radius: var(--r-md); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 10px 8px 16px; position: sticky; top: 8px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.brand img { width: 28px; height: 28px; }
.mainnav { display: flex; gap: 4px; overflow-x: auto; order: 3; flex: 1 1 100%; }
@media (min-width: 1100px) { .mainnav { order: 0; flex: 0 1 auto; } }
.mainnav a { flex: none; text-decoration: none; color: var(--ink-soft); border-radius: var(--r-sm); padding: 0 14px; height: 40px; display: flex; align-items: center; font-size: 14px; font-weight: 500; }
.mainnav a:hover { color: var(--ink); background: rgba(234,240,246,0.05); }
.mainnav a.on { color: var(--night); background: var(--ink); box-shadow: var(--shadow-btn); }
.tools { display: flex; align-items: center; gap: 8px; }
.iconbtn { position: relative; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--glass-line); background: rgba(234,240,246,0.04); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.iconbtn:hover { color: var(--ink); }
.iconbtn .dot { position: absolute; top: 10px; right: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.netchip { text-decoration: none; font-size: 12px; font-weight: 500; border-radius: 9999px; padding: 3px 10px; color: var(--night); background: var(--ice); }
.netchip.main { background: var(--fall); }

/* page head */
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding: 8px 4px 0; }
.pagehead .sub { margin-top: 6px; color: var(--ink-muted); font-size: 13px; }

/* controls */
.btn { height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid rgba(234,240,246,0.14); background: rgba(234,240,246,0.04); color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: rgba(234,240,246,0.08); }
.btn.primary { background: var(--ink); color: var(--night); border: 0; box-shadow: var(--shadow-btn); }
.btn.long { background: var(--rise); color: var(--night); border: 0; box-shadow: var(--shadow-btn); font-weight: 600; }
.btn.short { background: var(--fall); color: var(--night); border: 0; box-shadow: var(--shadow-btn); font-weight: 600; }
.btn.danger { border-color: rgba(255,133,119,0.45); color: var(--fall); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.seg { align-self: flex-start; display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(234,240,246,0.05); border: 1px solid rgba(234,240,246,0.08); flex-wrap: wrap; }
.seg button { height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 14px; font-weight: 500; }
.seg button.on { background: var(--ink); color: var(--night); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.seg.sides { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.sides button { height: 40px; font-weight: 600; }
.seg.sides button.on.l { background: var(--rise); } .seg.sides button.on.s { background: var(--fall); }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill { height: 34px; min-width: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid rgba(234,240,246,0.10); background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 13px; font-weight: 500; }
.pill.on { background: var(--ink); color: var(--night); border-color: var(--ink); }
.input { height: 42px; width: 100%; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid rgba(234,240,246,0.12); background: var(--night-raised); color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.input.sm { height: 36px; font-size: 14px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; font-size: 14px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .suffix { position: relative; } .field .suffix span { position: absolute; right: 12px; top: 11px; color: var(--ink-muted); font-size: 13px; pointer-events: none; }
.field .suffix .input { padding-right: 56px; }
.search { position: relative; } .search svg { position: absolute; left: 12px; top: 13px; color: var(--ink-muted); } .search .input { padding-left: 36px; }
.slider { display: flex; flex-direction: column; gap: 6px; }
.slider .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.slider .val { font-size: 15px; font-weight: 500; }
input[type=range] { width: 100%; height: 24px; margin: 0; accent-color: var(--ice); cursor: pointer; }
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; accent-color: var(--ice); }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; border-radius: 9999px; padding: 2px 9px; white-space: nowrap; }
.chip.good { color: var(--rise); background: rgba(94,224,176,0.10); } .chip.warn { color: var(--amber); background: rgba(245,179,85,0.10); }
.chip.bad { color: var(--fall); background: rgba(255,133,119,0.10); } .chip.info { color: var(--focus); background: rgba(124,200,255,0.10); }
.chip.neutral { color: var(--ink-soft); background: rgba(234,240,246,0.08); }

/* tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { font-size: 12px; font-weight: 500; color: var(--ink-muted); padding: 8px 8px 8px 0; text-align: left; white-space: nowrap; }
table.t td { padding: 8px 8px 8px 0; border-top: 1px solid rgba(234,240,246,0.07); font-size: 14px; vertical-align: middle; }
table.t th.r, table.t td.r { text-align: right; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: rgba(234,240,246,0.03); }
.namecell { display: flex; flex-direction: column; } .namecell b { font-weight: 500; font-size: 15px; } .namecell span { font-size: 12px; color: var(--ink-muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(234,240,246,0.07); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv span:first-child { color: var(--ink-soft); }
.statbar { border-radius: var(--r-md); padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; position: relative; z-index: 6; }
.stat { display: flex; flex-direction: column; gap: 2px; } .stat span:first-child { font-size: 12px; color: var(--ink-muted); }
.empty { border: 1px dashed rgba(234,240,246,0.14); border-radius: var(--r-md); padding: 20px; text-align: center; color: var(--ink-muted); font-size: 14px; }
.status { border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 20px; }
.status.info { background: rgba(124,200,255,0.10); border: 1px solid rgba(124,200,255,0.30); }
.status.warn { background: rgba(245,179,85,0.08); border: 1px solid rgba(245,179,85,0.30); }
.status.bad { background: rgba(255,133,119,0.10); border: 1px solid rgba(255,133,119,0.35); }
.status.good { background: rgba(94,224,176,0.08); border: 1px solid rgba(94,224,176,0.28); }
.bar { height: 8px; border-radius: 9999px; background: rgba(234,240,246,0.08); overflow: hidden; display: flex; }
.bar > span { display: block; height: 100%; }
.spark { display: block; }

/* dropdown */
.dropdown { position: absolute; left: 0; top: 56px; width: min(560px, 90vw); background: var(--night-raised); border: 1px solid rgba(234,240,246,0.12); border-radius: var(--r-md); box-shadow: 0 24px 60px rgba(0,0,0,0.55); padding: 12px; z-index: 40; }
.dropdown .list { max-height: 380px; overflow-y: auto; }
.optrow { width: 100%; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,0.8fr) minmax(0,0.9fr); gap: 8px; align-items: center; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; font-size: 14px; }
.optrow:hover, .optrow.on { background: rgba(124,200,255,0.10); }
.marketbtn { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border-radius: 12px; border: 1px solid rgba(234,240,246,0.12); background: var(--night-raised); cursor: pointer; font-size: 18px; font-weight: 600; }

/* charts */
.chartbox { position: relative; width: 100%; height: 440px; }
.chartbox.sm { height: 320px; }
.charttools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft); }
.legend i { display: inline-block; width: 14px; border-top: 2px solid; margin-right: 6px; vertical-align: middle; }

/* gauges */
.gauge { position: relative; flex: none; }
.gauge .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .big { font-size: 52px; line-height: 52px; font-weight: 300; }

/* toast */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, 92vw); }
.toast { border-radius: 14px; padding: 12px 14px; background: var(--night-raised); border: 1px solid rgba(124,200,255,0.3); box-shadow: 0 16px 40px rgba(0,0,0,0.5); font-size: 14px; }

/* checks list */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 19px; color: var(--ink-soft); }
.checks .m { flex: none; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.checks .m.ok { background: rgba(94,224,176,0.16); color: var(--rise); } .checks .m.no { background: rgba(245,179,85,0.16); color: var(--amber); } .checks .m.na { background: rgba(234,240,246,0.08); color: var(--ink-muted); }
.checks .m.block { background: rgba(255,133,119,0.18); color: var(--fall); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 640px) { h1 { font-size: 28px; line-height: 34px; } .panel { padding: 16px; } .chartbox { height: 340px; } }

/* assistent-lade */
.drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px)); z-index: 60; padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow: auto; border-radius: 18px; background: rgba(10, 14, 20, 0.94); }
/* smalle schermen: menu past zonder te scrollen, merk en knoppen op één rij */
@media (max-width: 480px) {
  .mainnav { justify-content: space-between; gap: 0; }
  .mainnav a { padding: 0 9px; font-size: 13px; }
  .brand span { display: none; }
  .tools { gap: 6px; }
}
