/* Certitool 2.0 — interface-ontwerp
   Gebouwd op de Certipower Brand Guidelines v1.1. Alle waarden als tokens: pas hier aan, niet in de schermen. */

@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('../fonts/Montserrat-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('../fonts/Montserrat-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('../fonts/Montserrat-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('../fonts/Montserrat-ExtraBold.woff2') format('woff2'); }

:root {
  /* merk */
  --cyan: #27ABE2; --green: #51B269; --ink: #04212B; --grad: linear-gradient(90deg, #51B169, #42AE95 50%, #28AAE1);
  /* oppervlakken */
  --bg: #F3F6F7; --surface: #FFFFFF; --surface-2: #F7FAFB; --line: #E1E7E9; --line-2: #EDF1F2;
  --side: #04212B; --side-2: #0C2E3A; --side-line: #173B47; --side-ink: #A9BBC1;
  /* tekst */
  --t1: #04212B; --t2: #42565D; --t3: #6B7E84; --t-inv: #FFFFFF;
  /* reeksen (gevalideerd: lichtheid, chroma, CVD ≥ 8, normaal zicht ≥ 15, contrast ≥ 3:1) — vaste volgorde */
  --s-public: #1C93CF; --s-private: #3FA35E; --s-company: #7A62C9; --s-abroad: #C29A1F;
  --s-public-t: #E3F2FA; --s-private-t: #E6F4EA; --s-company-t: #EEEAF8; --s-abroad-t: #F8F1DC;
  /* status (altijd met icoon + label) */
  --ok: #2F8A4C; --ok-t: #E3F3E8; --info: #1478A8; --info-t: #E2F1F9; --warn: #8A6A0B; --warn-t: #FBF1D3; --crit: #A8323A; --crit-t: #FBE7E8; --muted-t: #EEF1F2;
  /* vorm */
  --r1: 6px; --r2: 10px; --r3: 14px; --r4: 18px; --pill: 999px;
  --sh1: 0 1px 2px rgba(4,33,43,.05); --sh2: 0 1px 2px rgba(4,33,43,.05), 0 6px 20px rgba(4,33,43,.06); --sh3: 0 12px 40px rgba(4,33,43,.18);
  --side-w: 256px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--t1); background: var(--bg); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
svg.i { width: 18px; height: 18px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.muted { color: var(--t3); }
.small { font-size: 12.5px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); color: var(--side-ink); padding: 18px 14px; overflow-y: auto; z-index: 40; }
.side__brand { display: flex; align-items: center; padding: 6px 8px 22px; }
.side__brand img { height: 42px; width: auto; max-width: 100%; }
.side__brand span { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.entity { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--side-line); border-radius: var(--r2); background: var(--side-2); color: #fff; cursor: pointer; text-align: left; }
.entity:hover { border-color: #2A5664; }
.entity__logo { width: 32px; height: 32px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink); flex: none; }
.entity b { display: block; font-size: 13px; line-height: 1.25; }
.entity small { display: block; font-size: 11.5px; color: var(--side-ink); }
.entity .i { margin-left: auto; color: var(--side-ink); }
.nav { margin-top: 18px; display: grid; gap: 2px; }
.nav__group { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6E8A93; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r1); font-weight: 600; font-size: 13.5px; color: #C7D4D8; position: relative; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a[aria-current="page"] { background: #0F3442; color: #fff; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.nav a .badge { margin-left: auto; }
.nav a .i { color: #7FA0AA; }
.nav a[aria-current="page"] .i { color: var(--cyan); }
.side__foot { margin-top: auto; padding-top: 18px; }
.help { padding: 14px; border-radius: var(--r2); background: var(--side-2); border: 1px solid var(--side-line); font-size: 12.5px; }
.help b { color: #fff; display: block; margin-bottom: 4px; font-size: 13px; }
.help a { color: var(--cyan); font-weight: 700; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 28px; background: rgba(243,246,247,.88); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.is-scrolled { border-bottom-color: var(--line); }
.menu-btn { display: none; }
.search { display: flex; align-items: center; gap: 10px; width: 360px; max-width: 40vw; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); color: var(--t3); cursor: text; }
.search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search .kbd { flex: none; }
.icon-btn.menu-btn { display: none; }
.kbd { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--t3); background: var(--surface-2); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r2); border: 1px solid var(--line); background: var(--surface); color: var(--t2); cursor: pointer; }
.icon-btn:hover { color: var(--t1); border-color: #C9D3D6; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px var(--surface); }
.lang { display: flex; border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; background: var(--surface); }
.lang button { border: 0; background: none; padding: 0 10px; height: 36px; font-size: 12px; font-weight: 700; color: var(--t3); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--s-public-t); color: var(--info); font-weight: 800; font-size: 12px; flex: none; }
.user b { font-size: 13px; }

.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--t2); margin-top: 4px; }
.page-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: 12px; font-weight: 600; color: var(--t3); margin-bottom: 6px; display: flex; gap: 6px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--t1); }
.btn:hover { border-color: #C3CED1; }
.btn--primary { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.btn--primary:hover { background: #45B8E8; border-color: #45B8E8; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--line-2); }
.btn--sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn .i { width: 16px; height: 16px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r2); background: #E7ECEE; }
.seg button { border: 0; background: none; height: 32px; padding: 0 12px; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: var(--t2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--t1); box-shadow: var(--sh1); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--t2); }
.input, .select { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--surface); min-width: 0; }
.select { appearance: none; padding-right: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2342565D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.input:focus, .select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(39,171,226,.2); }
.input--search { padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236B7E84' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") no-repeat 12px center; }
textarea.input { height: auto; padding: 10px 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 12.5px; color: var(--t2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--pill); background: var(--line-2); color: var(--t2); }
.chip[aria-pressed="true"] .count { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- cards & grid ---------- */
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--sh1); min-width: 0; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.card__head h2 { font-size: 15px; font-weight: 700; }
.card__head p { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.card__body { padding: 16px 20px 20px; }
.card__foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--t3); }
.link { color: var(--info); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; background: none; border: 0; padding: 0; }
.link .i { width: 15px; height: 15px; }

/* KPI */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi__label { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--t2); }
.kpi__value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.kpi__value small { font-size: 15px; font-weight: 700; color: var(--t3); margin-left: 2px; letter-spacing: 0; }
.kpi__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--t3); min-height: 28px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; padding: 2px 7px; border-radius: var(--pill); }
.delta--good { color: var(--ok); background: var(--ok-t); }
.delta--bad { color: var(--crit); background: var(--crit-t); }
.delta--flat { color: var(--t2); background: var(--muted-t); }
.spark { width: 96px; height: 28px; }
.mixbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); }
.mixbar span { display: block; height: 100%; }
.mixbar span:first-child { border-radius: 4px 0 0 4px; }
.mixbar span:last-child { border-radius: 0 4px 4px 0; }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--t2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.hatch { background-image: repeating-linear-gradient(135deg, currentColor 0 2px, transparent 2px 5px) !important; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis-text { fill: var(--t3); font-size: 11px; font-family: var(--font); }
.chart .bar { transition: opacity .15s; }
.chart:hover .bar-group:not(:hover) .bar { opacity: .55; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 180px; padding: 10px 12px; border-radius: var(--r2); background: var(--ink); color: #fff; font-size: 12px; box-shadow: var(--sh3); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.is-on { opacity: 1; transform: none; }
.tip b { display: block; margin-bottom: 6px; font-size: 12.5px; }
.tip div { display: flex; justify-content: space-between; gap: 16px; align-items: center; line-height: 1.7; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.tip .sum { border-top: 1px solid rgba(255,255,255,.18); margin-top: 4px; padding-top: 4px; font-weight: 700; }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.t th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--t3); background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t th.r, .t td.r { text-align: right; }
.t th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.t th button:hover { color: var(--t1); }
.t th[aria-sort] button { color: var(--t1); }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tbody tr { cursor: default; }
.t tbody tr.clickable { cursor: pointer; }
.t tbody tr:hover td { background: #F8FBFC; }
.t tbody tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--t3); font-size: 12px; }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.bar-cell .mixbar { flex: 1; }
.hbar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: 3px; background: var(--s-public); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--t3); }
.pager .btns { display: flex; gap: 6px; }
.empty { padding: 48px 20px; text-align: center; color: var(--t3); }

/* badges & status */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge .i { width: 13px; height: 13px; }
.b-public { background: var(--s-public-t); color: #0F6E9C; }
.b-private { background: var(--s-private-t); color: #2C7A45; }
.b-company { background: var(--s-company-t); color: #5B45A8; }
.b-abroad { background: var(--s-abroad-t); color: #7A5F0E; }
.b-ok { background: var(--ok-t); color: var(--ok); }
.b-info { background: var(--info-t); color: var(--info); }
.b-warn { background: var(--warn-t); color: var(--warn); }
.b-crit { background: var(--crit-t); color: var(--crit); }
.b-muted { background: var(--muted-t); color: var(--t2); }
.b-new { background: var(--cyan); color: var(--ink); }
.dot-s { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* attention */
.attn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.attn__item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); }
.attn__ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.attn__item b { display: block; font-size: 13.5px; }
.attn__item p { font-size: 12.5px; color: var(--t3); }
.attn__item .btn { margin-left: auto; }

/* insight */
.insight { position: relative; overflow: hidden; padding: 22px; border-radius: var(--r3); background: var(--ink); color: #fff; }
.insight::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--grad); }
.insight__tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.insight h3 { font-size: 18px; font-weight: 800; margin: 10px 0 8px; line-height: 1.3; }
.insight p { color: #B9C8CD; font-size: 13px; }
.insight .big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 12px 0 2px; }
.insight .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.insight .btn:not(.btn--primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }

.insight--wide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding: 24px 28px; }
.insight--wide .big { margin: 6px 0 0; }
.insight--wide .actions { margin-top: 0; }
.insight--wide h3 { margin-top: 0; }

/* pipeline */
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pipe button { all: unset; cursor: pointer; padding: 14px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.pipe button:hover { border-color: #C3CED1; }
.pipe button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pipe b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pipe span { font-size: 12.5px; font-weight: 600; color: var(--t2); display: flex; gap: 6px; align-items: center; }

/* list rows */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 700; }
.rank { width: 22px; font-size: 12px; font-weight: 700; color: var(--t3); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(4,33,43,.35); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 61; background: var(--surface); box-shadow: var(--sh3); transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; }
.drawer.is-on { transform: none; }
.drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line-2); }
.drawer__head h2 { font-size: 18px; font-weight: 800; }
.drawer__head p { color: var(--t3); font-size: 12.5px; margin-top: 2px; }
.drawer__head .icon-btn { margin-left: auto; }
.drawer__body { padding: 20px 24px; overflow-y: auto; flex: 1; display: grid; gap: 20px; align-content: start; }
.drawer__foot { padding: 14px 24px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kv div { padding: 12px 14px; border-radius: var(--r2); background: var(--surface-2); border: 1px solid var(--line-2); }
.kv small { display: block; font-size: 11.5px; color: var(--t3); font-weight: 600; }
.kv b { font-size: 17px; font-weight: 800; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t3); margin-bottom: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--t3); }
.timeline .tdot .i { width: 14px; height: 14px; }
.timeline li.done .tdot { background: var(--ok-t); color: var(--ok); }
.timeline li.now .tdot { background: var(--warn-t); color: var(--warn); }
.timeline b { display: block; font-size: 13px; }
.timeline small { color: var(--t3); font-size: 12px; }

/* cards grid for charging passes */
.passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pass { padding: 16px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh1); display: grid; gap: 12px; }
.pass__card { position: relative; height: 112px; border-radius: 12px; padding: 14px; color: #fff; background: linear-gradient(135deg, #0B3442, #04212B 60%); overflow: hidden; }
.pass__card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(39,171,226,.45), transparent 70%); }
.pass__card img { height: 18px; }
.pass__card .mono { position: absolute; left: 14px; bottom: 12px; font-size: 13px; letter-spacing: .12em; color: #DCE8EC; }
.pass__card.is-off { filter: grayscale(1); opacity: .65; }
.pass__meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.cal__dow { padding: 8px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); border-bottom: 1px solid var(--line-2); }
.cal__day { min-height: 108px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: grid; align-content: start; gap: 4px; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-out { background: var(--surface-2); color: var(--t3); }
.cal__day.is-today .cal__n { background: var(--ink); color: #fff; }
.cal__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ev { display: block; padding: 3px 6px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; cursor: pointer; }

/* assistant */
.chat { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; min-height: calc(100vh - 200px); }
.chat__log { display: flex; flex-direction: column; gap: 14px; padding: 20px; overflow-y: auto; }
.msg { max-width: 78%; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.msg--me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg--ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.msg--ai .src { margin-top: 8px; font-size: 11.5px; color: var(--t3); }
.chat__input { display: flex; gap: 8px; padding: 14px; border-top: 1px solid var(--line-2); }
.chat__input .input { flex: 1; }
.suggest { display: grid; gap: 8px; }
.suggest button { all: unset; cursor: pointer; padding: 10px 12px; border-radius: var(--r2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; background: var(--surface); }
.suggest button:hover { border-color: var(--cyan); }

/* menus, toast, palette */
.menu { position: absolute; z-index: 70; min-width: 260px; padding: 6px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh3); display: none; }
.menu.is-on { display: block; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; font-weight: 600; font-size: 13px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.menu small { display: block; color: var(--t3); font-weight: 500; font-size: 11.5px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; padding: 12px 16px; border-radius: var(--r2); background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--sh3); display: flex; gap: 10px; align-items: center; transition: .2s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast .i { color: var(--green); }
.palette { position: fixed; z-index: 80; inset: 0; display: none; place-items: start center; padding-top: 12vh; background: rgba(4,33,43,.35); }
.palette.is-on { display: grid; }
.palette__box { width: min(620px, 92vw); border-radius: var(--r3); background: var(--surface); box-shadow: var(--sh3); overflow: hidden; }
.palette__box input { width: 100%; height: 54px; border: 0; border-bottom: 1px solid var(--line-2); padding: 0 18px; font-size: 15px; outline: none; }
.palette__list { max-height: 360px; overflow-y: auto; padding: 6px; }
.palette__list a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.palette__list a.is-sel, .palette__list a:hover { background: var(--surface-2); }
.palette__list small { margin-left: auto; color: var(--t3); font-weight: 500; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--surface); }
.login__form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 96px); }
.login__form form { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.login__form h1 { font-size: 28px; font-weight: 800; margin-top: 40px; }
.login__aside { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end; }
.login__aside::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--grad); }

/* responsive */
@media (max-width: 1280px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g-main, .g-2, .g-3, .chat { grid-template-columns: minmax(0, 1fr); } .attn { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; }
  .side.is-open { transform: none; box-shadow: var(--sh3); }
  .icon-btn.menu-btn { display: grid; }
  .insight--wide { grid-template-columns: minmax(0, 1fr); }
  .search { width: auto; flex: 1; max-width: none; min-width: 0; }
  .search .kbd, .user b, .lang { display: none; }
  .top { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
  .login { grid-template-columns: minmax(0, 1fr); } .login__aside { display: none; }
}
@media (max-width: 640px) {
  .g-4 { grid-template-columns: minmax(0, 1fr); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .seg { width: 100%; overflow-x: auto; }
  .seg button { white-space: nowrap; padding: 0 10px; flex: 1; }
  .cal__day { min-height: 70px; padding: 4px; }
  .ev { font-size: 0; height: 6px; padding: 0; border-left-width: 0; }
  .t .hide-sm { display: none; }
}
