/* Power Hub · huisstijl "Ecofine": helder groen, crème achtergrond, donkergroene kop, bladeren als accent.
   Eén set tokens voor app, beheer en website (site/ gebruikt dezelfde waarden). */
@font-face { font-family: Manrope; src: url(/static/manrope.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #f8f7f0; --card: #ffffff; --ink: #24231d; --muted: #66655d; --line: #e8e6dc; --soft: #f1f0e8;
  --accent: #4baf47; --accent-strong: #2e7d2b; --accent-ink: #ffffff; --accent-soft: #edf7ed; --btn: #388e34; --btn-hover: #2e7d2b;
  --forest: #0e2f2c; --forest-2: #16403b; --forest-ink: #ffffff; --forest-muted: #bfe3c4; --leaf: #9fd99b;
  --grid: #2f5fbf; --pv: #c99100; --batt: #2e9d4a; --chg: #7046c2; --load: #3f3e37; --bad: #c8433a; --warn: #c27a00;
  --pv-soft: #fff4d9; --grid-soft: #e4ecfb; --batt-soft: #e5f4e6; --chg-soft: #efe8fb;
  --radius: 15px; --radius-s: 10px; --shadow: 0 1px 2px rgba(36,35,29,.04), 0 8px 24px -12px rgba(36,35,29,.10);
  --leaves: .16;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #10140f; --card: #181e16; --ink: #ecede6; --muted: #a3a89c; --line: #283024; --soft: #1e261c;
    --accent: #5dc459; --accent-strong: #7fd67b; --accent-ink: #0f140e; --accent-soft: #1d3a1c; --btn: #5dc459; --btn-hover: #7fd67b;
    --forest: #0b211f; --forest-2: #12332f; --load: #c9ccc0;
    --grid: #7aa2ff; --pv: #f2c14e; --batt: #5dc459; --chg: #b9a2f5; --bad: #ff7a70; --warn: #f2b82e;
    --pv-soft: #3a3115; --grid-soft: #1b2a47; --batt-soft: #1d3a1c; --chg-soft: #2a2142;
    --shadow: none; --leaves: .07; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Kop */
header.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px max(16px, calc((100% - 1360px) / 2 + 28px)); }
header.top .brand { font-weight: 800; font-size: 13px; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
header.top .brand i { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); display: inline-block; }
header.top .grow { flex: 1; }
header.top nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
header.top nav .btn, header.top nav button { border: 0; background: transparent; font-weight: 600; color: var(--load); padding: 9px 13px; border-radius: 10px; }
header.top nav .btn:hover, header.top nav button:hover { background: var(--soft); }
header.top nav .btn.primary { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
header.top select { font-weight: 700; }

main { padding: 22px 16px 48px; max-width: 1360px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 700px) { main { padding: 24px 28px 56px; } }
h1 { font-size: 26px; font-weight: 800; margin: 0; letter-spacing: -.3px; }
h2 { font-size: 15px; font-weight: 800; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
section.card { margin: 0; }
.titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 700; }
.pill.warn { background: #fdf0d8; color: #7a4d00; } .pill.bad { background: #fbe3e1; color: #8f2a22; } .pill.off { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .pill.warn { background: #3a2c10; color: #f2c14e; } .pill.bad { background: #3d1a17; color: #ff9a92; } }

/* Rijen en rasters */
.flexrow { display: flex; flex-wrap: wrap; gap: 16px; }
.flexrow > * { flex: 1 1 380px; min-width: 0; }
.flexrow > .wide2 { flex: 999 1 560px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile .v { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.tile .v.green { color: var(--accent-strong); }
.tile .s { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .tile .v { font-size: 23px; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }

/* Groene impact */
.impact { background: var(--forest); color: var(--forest-ink); border-radius: 22px; padding: 24px 26px; display: flex; flex-wrap: wrap; gap: 22px 28px; align-items: center; }
.impact .lead { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.impact .eyebrow { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--forest-muted); }
.impact .big { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; line-height: 1.05; letter-spacing: -.8px; }
.impact .lead p { margin: 0; font-size: 15px; color: #d5f0df; }
.impact .forest { flex: 1 1 340px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; padding: 14px; border-radius: 16px; background: var(--forest-2); }
.impact .forest svg { width: 100%; height: auto; max-width: 30px; justify-self: center; }
.impact .facts { flex: 0 1 270px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.impact .facts div { display: flex; justify-content: space-between; gap: 12px; }
.impact .facts span { color: var(--forest-muted); }
.impact .facts b { font-variant-numeric: tabular-nums; }

/* Energiestroom */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; justify-items: center; padding: 6px 0; }
.node { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.node .ic { width: 66px; height: 66px; border-radius: 33px; display: flex; align-items: center; justify-content: center; position: relative; }
.node .ic svg { width: 28px; height: 28px; }
.node b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.node span { font-size: 12px; color: var(--muted); }
.node.pv .ic { background: var(--pv-soft); color: var(--pv); } .node.grid .ic { background: var(--grid-soft); color: var(--grid); }
.node.batt .ic { background: var(--batt-soft); color: var(--batt); } .node.chg .ic { background: var(--chg-soft); color: var(--chg); }
.node.home .ic { width: 92px; height: 92px; border-radius: 46px; border: 3px solid var(--accent); background: var(--card); flex-direction: column; color: var(--ink); }
.node.home .ic b { font-size: 15px; }
.node .ic.live::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: .35; animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.92); opacity: .5; } to { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .node .ic.live::after { animation: none; } }
.node.idle { opacity: .55; }

/* Knoppen en formulieren */
button, .btn { font: inherit; font-size: 14px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
button.link { border: none; background: none; color: var(--accent-strong); padding: 4px 6px; min-height: 0; }
button:disabled { opacity: .5; cursor: default; }
input, select { font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); min-width: 0; }
input[type=range] { padding: 0; accent-color: var(--accent); width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 20px; height: 20px; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.seg { display: inline-flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: 9px; }
.seg button.on { background: var(--card); font-weight: 800; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pills button { font-size: 12px; padding: 4px 10px; border-radius: 999px; min-height: 30px; }
.pills button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--load); margin: 8px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; background: var(--c); }
.cardhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.cardhead h2 { margin: 0; flex: 1; }

/* Besparing per bron */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bars .l { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.bars .t { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.bars .t i { display: block; height: 100%; border-radius: 5px; background: var(--c); }

/* Keuzekaarten (instellingen) */
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; color: var(--ink); font-size: 14px; }
.choice:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); padding: 13px; }
.choice b { display: block; font-size: 15px; }
.choice small { color: var(--muted); font-size: 13px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; font-size: 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.locked { background: var(--soft); border: 1px dashed #c9d2cc; border-radius: var(--radius); padding: 18px 20px; }
.locked h2 { display: flex; align-items: center; gap: 8px; }

svg:not([width]) { width: 100%; height: auto; display: block; }
svg[width] { flex: none; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alerts li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alerts li:last-child { border-bottom: none; }
.alerts .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.muted { color: var(--muted); }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.ok { color: var(--accent-strong); } .tag.bad { color: var(--bad); }
.notice { padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14px; margin-top: 10px; }
.notice.bad { background: #fbe3e1; color: #8f2a22; }
.notice code { font-size: 15px; user-select: all; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none; }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.off { background: var(--muted); }
details.more { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; }
details.more > summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; }
details.more > summary::after { content: "+"; font-size: 20px; color: var(--muted); }
details.more[open] > summary::after { content: "–"; }
details.more > div { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
.flow-label { font-size: 13px; fill: var(--muted); }
.hide { display: none !important; }
@media (max-width: 560px) { .wide { display: none; } th, td { padding: 7px 4px; } header.top nav .muted { display: none; } .card { padding: 16px; } }
button.choice { text-align: left; width: 100%; background: var(--card); min-height: 0; font-weight: 400; }
button.choice:hover { border-color: var(--accent); }

/* Als geïnstalleerde app: kop compact, menu onderin. */
nav.tabbar { display: none; }
html.is-app header.top nav, html.is-app header.top #who { display: none; }
html.is-app header.top { padding-top: max(10px, env(safe-area-inset-top)); }
html.is-app body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
html.is-app nav.tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
nav.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 12px; }
nav.tabbar a.on { color: var(--accent-strong); font-weight: 800; }

/* Beheer: klantblokken */
.fleetbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--muted); }
.search input { border: 0; flex: 1; padding: 13px 0; font-size: 15px; background: transparent; outline: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
@media (min-width: 1100px) { .fleet { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fcard { display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-left-width: 1px; border-radius: 18px; padding: 16px 18px; color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden; }
.fcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent); }
.fcard.warn::before { background: var(--warn); } .fcard.bad::before { background: var(--bad); }
.fcard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 77, 51, .10); }
.fhead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fhead b { display: block; font-size: 16px; }
.fhead span { font-size: 13px; color: var(--muted); }
.fstate { font-size: 12px !important; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong) !important; white-space: nowrap; }
.fcard.warn .fstate { background: #fdf0d8; color: #7a4d00 !important; } .fcard.bad .fstate { background: #fbe3e1; color: #8f2a22 !important; }
.fvals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: 13px; }
.fvals div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.fvals span { color: var(--muted); } .fvals b { font-variant-numeric: tabular-nums; }
.fissues { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fver { margin-left: auto; font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; }
.adminbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #e8eefb; color: #1f3d7a; font-size: 14px; }
.adminbar a { font-weight: 700; }

/* Problemen oplossen (beheer) */
.fix { border: 1px solid var(--line); border-left: 5px solid var(--bad); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.fix.warn { border-left-color: var(--warn); }
.fixhead { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.fix p { margin: 6px 0 0; font-size: 14px; color: var(--load); }
.fix details summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.fix ol { margin: 6px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
button.choice.on { border: 2px solid var(--accent); background: var(--accent-soft); padding: 13px; }
.smart { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }
.plan-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.plan-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.fmap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fmap-map svg { width: 100%; height: auto; max-height: 72vh; display: block; }
.fmap-map a circle { cursor: pointer; }
.fleet.one { grid-template-columns: 1fr !important; }
@media (max-width: 860px) { .fmap { grid-template-columns: 1fr; } }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.day { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); min-height: 0; }
.day b { font-size: 15px; }
.day small { font-size: 12px; color: var(--accent); font-weight: 700; }
.day.off { background: var(--soft); border-style: dashed; }
.day.off b { color: var(--muted); }
.day.off small { color: var(--muted); }
button.more { display: block; margin: 10px auto 0; font-weight: 700; }
[hidden] { display: none !important; }

/* Juridische documenten (voorbeeld in beheer, ondertekenpagina) */
.doc { line-height: 1.55; font-size: 14.5px; }
.doc h1 { font-size: 24px; margin: 0 0 6px; } .doc h2 { font-size: 18px; margin: 22px 0 8px; } .doc h3 { font-size: 15.5px; margin: 18px 0 6px; }
.doc p { margin: 8px 0; } .doc ol, .doc ul { margin: 6px 0 6px 22px; padding: 0; }
.doc .tw { overflow-x: auto; margin: 10px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 13px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.doc th { background: var(--soft); }
.doc mark { background: #ffe58a; color: #3a2c00; padding: 0 3px; border-radius: 3px; }
.doc .pending { border-left: 4px solid var(--warn); background: var(--soft); padding: 8px 12px; margin: 12px 0; font-style: italic; }
.lgfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; margin-top: 10px; }
.lgfields label small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
dialog::backdrop { background: rgba(0,0,0,.35); }

/* ===== Ecofine-laag: kop, bladeren, kaarten, knoppen ===== */
:root { --info-soft: #e3eeec; --info-ink: #0e2f2c; }
@media (prefers-color-scheme: dark) { :root { --info-soft: #14302c; --info-ink: #cfe9e4; } }
body { position: relative; min-height: 100vh; }
body::before, body::after { content: ""; position: fixed; z-index: 0; pointer-events: none; background: center / contain no-repeat; opacity: var(--leaves); }
body::before { top: 40px; right: -40px; width: min(42vw, 520px); aspect-ratio: 525 / 435; background-image: url(/static/leaves-tr.webp); }
body::after { bottom: -30px; left: -40px; width: min(40vw, 500px); aspect-ratio: 510 / 425; background-image: url(/static/leaves-bl.webp); }
main, header.top, nav.tabbar { position: relative; z-index: 1; }
html.is-app nav.tabbar { position: fixed; }
header.top { position: sticky; }

/* Merkteken: blad met bliksem (eigen ontwerp) */
.brand i { width: 28px !important; height: 28px !important; border-radius: 50% !important; flex: none;
  background: url(/static/mark.svg) center / 100% no-repeat !important; }

/* Kop in donkergroen, zoals de website */
header.top { background: var(--forest); border-bottom: 0; color: var(--forest-ink); box-shadow: 0 2px 14px rgba(0,0,0,.12); }
header.top .brand { font-size: 14px; letter-spacing: .6px; color: #fff; }
header.top nav .btn, header.top nav button { color: rgba(255,255,255,.82); font-weight: 600; border-radius: 8px; }
header.top nav .btn:hover, header.top nav button:hover { background: rgba(255,255,255,.09); color: #fff; }
header.top nav .btn.primary { background: var(--accent); color: #fff; font-weight: 700; }
@media (prefers-color-scheme: dark) { header.top nav .btn.primary { color: #0f140e; } }
header.top .muted { color: var(--forest-muted) !important; }
header.top select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
header.top select option { color: #24231d; background: #fff; }
header.top > button { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
header.top > button:hover { background: rgba(255,255,255,.1); }

/* Kaarten */
.card, .tile, details.more, .fcard { border-color: var(--line); box-shadow: var(--shadow); }
.card { border-radius: var(--radius); }
h1 { font-weight: 800; letter-spacing: -.4px; color: var(--ink); }
.card > h2, .cardhead h2, details.more > summary { display: flex; align-items: center; gap: 9px; }
.card > h2::before, .cardhead h2::before { content: ""; width: 10px; height: 10px; flex: none; background: var(--accent); border-radius: 0 10px 0 10px; }
.eyebrow-g { color: var(--accent-strong); text-transform: uppercase; letter-spacing: 2.5px; font-size: 12px; font-weight: 800; }

/* Knoppen en velden */
button, .btn { border-radius: 8px; }
button.primary, .btn.primary { background: var(--btn); border-color: var(--btn); color: var(--accent-ink); }
button.primary:hover, .btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
button:not(.primary):not(.link):not(.choice):hover { border-color: var(--accent); }
input, select { border-radius: 8px; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.seg { background: var(--soft); border-radius: 10px; }
.seg button { border-radius: 7px; }
.seg button.on { background: var(--btn); color: var(--accent-ink); box-shadow: none; }
.pills button.on { background: var(--btn); color: var(--accent-ink); border-color: var(--btn); }

/* Groene impactband met blad */
.impact { position: relative; overflow: hidden; background: var(--forest); border-radius: 18px; }
.impact::after { content: ""; position: absolute; right: -60px; top: -50px; width: 360px; aspect-ratio: 525/435; background: url(/static/leaves-tr.webp) center/contain no-repeat; opacity: .22; pointer-events: none; }
.impact > * { position: relative; z-index: 1; }
.impact .forest { background: var(--forest-2); }

/* Tegels */
.tile { border-radius: 14px; }
.tile .v.green { color: var(--accent-strong); }

/* Beheerbalk en meldingen */
.adminbar { background: var(--info-soft); color: var(--info-ink); border: 1px solid var(--line); }
.adminbar a { color: inherit; }
@media (prefers-color-scheme: dark) { .pill.warn, .fcard.warn .fstate { background: #3a2c10; color: #f2c14e !important; } .pill.bad, .fcard.bad .fstate, .notice.bad { background: #3d1a17; color: #ff9a92 !important; } }
.fcard { border-radius: var(--radius); }
.fcard:hover { box-shadow: 0 10px 26px -10px rgba(46,125,43,.28); }
.choice:has(input:checked), button.choice.on { border-color: var(--accent); }
.locked { border-color: var(--line); }
nav.tabbar { box-shadow: 0 -4px 16px rgba(0,0,0,.06); }

/* Losse pagina's (inloggen, wachtwoord, document, status) */
.authpage { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); position: relative; z-index: 1; }
.authpage .side { background: var(--forest); color: #fff; padding: clamp(28px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.authpage .side::after { content: ""; position: absolute; right: -80px; bottom: -60px; width: 520px; aspect-ratio: 510/425; background: url(/static/leaves-bl.webp) center/contain no-repeat; transform: scaleX(-1); opacity: .28; }
.authpage .side > * { position: relative; z-index: 1; }
.authpage .side h1 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; max-width: 14ch; }
.authpage .side p { color: var(--forest-muted); max-width: 42ch; margin: 12px 0 0; }
.authpage .side ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: #e3f3e5; font-size: 15px; }
.authpage .side li { display: flex; gap: 10px; align-items: center; }
.authpage .side li::before { content: ""; width: 10px; height: 10px; border-radius: 0 10px 0 10px; background: var(--accent); flex: none; }
.authpage .formside { display: grid; place-items: center; padding: 28px 16px; }
.authpage .formside .card { width: 100%; max-width: 380px; padding: 28px; }
.authpage .brand { color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px; display: flex; gap: 10px; align-items: center; text-transform: uppercase; }
@media (max-width: 820px) { .authpage { grid-template-columns: 1fr; } .authpage .side { padding: 24px 20px 28px; } .authpage .side ul, .authpage .side .foot { display: none; } .authpage .side h1 { font-size: 26px; } }
header.top select { max-width: 300px; }
@media (max-width: 700px) {
  header.top { gap: 8px 10px; padding-top: 10px; padding-bottom: 10px; }
  header.top nav { order: 5; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  header.top nav::-webkit-scrollbar { display: none; }
  header.top nav .btn { white-space: nowrap; padding: 8px 11px; }
  header.top .grow, header.top #who { display: none; }
  header.top select { order: 6; flex: 1; max-width: none; }
  header.top > button { order: 7; }
}
@media print { body::before, body::after { display: none; } header.top { box-shadow: none; } }
