/* ONEp1 bèta-dashboard — gedeelde stijl voor alle /beta2/-pagina's */

:root {
    --bg: #F5F7FA;
    --surface: #FFFFFF;
    --surface-2: #FAFBFC;
    --line: #E3E8EF;
    --line-soft: #EDF1F5;
    --field-line: #D5DCE5;
    --ink: #0E1726;
    --ink-2: #3A4556;
    --ink-3: #5F6B7A;
    --muted-fill: #F1F4F8;

    --blue: #1F6FD1;          /* verbruik, primaire acties */
    --blue-ink: #174F96;
    --blue-soft: #EAF2FC;
    --blue-wash: #F5F9FE;
    --amber: #F59E0B;         /* teruglevering (vlakken/lijnen) */
    --amber-ink: #A65A00;     /* teruglevering (tekst) */
    --amber-soft: #FDF0DA;
    --green: #16B47E;         /* zon (vlakken/lijnen) */
    --green-ink: #0D7D55;     /* zon / ok (tekst) */
    --green-soft: #E5F6EF;
    --violet: #7C5CD6;        /* gas / water */
    --red-ink: #C02640;
    --teal: #0E9AA7;          /* thuisaccu */
    --teal-ink: #0A6E78;
    --teal-soft: #E2F4F5;

    /* Afgeleide kleuren (licht) */
    --on-accent: #FFFFFF;
    --focus: #8DBBF0;
    --notice-ink: #123B6E;
    --warn-ink: #5C3500;
    --tag-ink: #7A4300;
    --tag-hover: #F9DFB0;
    --ok-dot: #12A06B;
    --ok-ink: #0A5A3E;
    --bad-soft: #FCE8EC;
    --bad-ink: #7A1426;
    --danger-line: #F1B8C2;
    --danger-wash: #FDF2F4;
    --switch-off: #CBD3DD;
    --knob: #FFFFFF;
    --pb-fill: #C9D3DF;
    --border-strong: #B9C4D2;
    --dash: #C4CEDA;
    --blue-line: #BCD6F5;
    --sep: #B6C0CC;
    --chev: #8A95A5;
    --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.12);
    --dialog-shadow: rgba(14, 23, 38, 0.25);
    /* Huisje op het overzicht */
    --h-sky: #EEF5FD;
    --h-wall-top: #FFFFFF;
    --h-wall-bot: #EEF2F7;
    --h-side-a: #F4F7FA;
    --h-side-b: #E2E8EF;
    --h-roof-a: #3B4A5E;
    --h-roof-b: #1E2836;
    --h-trim: #1E2836;
    --h-stroke: #CBD5E1;
    --h-ground: #D9E1EA;
    --h-door: #E2E8F0;
    --h-unit-a: #FFFFFF;
    --h-unit-b: #E6ECF2;
    --h-slot: #E2E8F0;
    --h-led: #CBD5E1;
    --h-line: #D5DDE7;
    --h-shadow-op: 0.06;
    --h-drop: 0.12;
    --halo: rgba(255, 255, 255, 0.9);
    color-scheme: light;

    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- Donkere modus ----------
   theme.js zet data-theme op <html> (Automatisch volgt het systeem). De media-query is het
   vangnet als JavaScript nog niet geladen is. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --logo-arc: #E6EDF7; 
    --bg: #0E141C; --surface: #161E29; --surface-2: #1B2431; --line: #273242; --line-soft: #212B39;
    --field-line: #364253; --ink: #E8EDF3; --ink-2: #C3CCD7; --ink-3: #8E9AAB; --muted-fill: #212B38;
    --blue: #5297EA; --blue-ink: #8DBBF0; --blue-soft: #172A42; --blue-wash: #142134;
    --amber: #F5A524; --amber-ink: #F7BA57; --amber-soft: #33270F;
    --green: #22C08A; --green-ink: #52D4A4; --green-soft: #10291F;
    --violet: #9B82F0; --red-ink: #F27389; --teal: #1FB5C2; --teal-ink: #62D2DA; --teal-soft: #0F2A2D;
    --on-accent: #08111F; --focus: #5297EA; --notice-ink: #C2DAF7; --warn-ink: #F6D39B; --tag-ink: #F7BA57;
    --tag-hover: #4A3714; --ok-dot: #22C08A; --ok-ink: #A3E7CC; --bad-soft: #3A1820; --bad-ink: #F6A7B4;
    --danger-line: #6B2A36; --danger-wash: #2A1419; --switch-off: #3A4656; --knob: #E8EDF3; --pb-fill: #3A4656;
    --border-strong: #4A576A; --dash: #3A4656; --blue-line: #2A4A72; --sep: #4A576A; --chev: #6B7787;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45); --dialog-shadow: rgba(0, 0, 0, 0.6);
    --h-sky: #1A283B; --h-wall-top: #2C3848; --h-wall-bot: #232E3C; --h-side-a: #273241; --h-side-b: #1E2834;
    --h-roof-a: #4A5B71; --h-roof-b: #2B3747; --h-trim: #5A6A7F; --h-stroke: #3B4859; --h-ground: #2E3A49;
    --h-door: #33404F; --h-unit-a: #2C3848; --h-unit-b: #232E3C; --h-slot: #18212D; --h-led: #4A576A;
    --h-line: #364253; --h-shadow-op: 0.35; --h-drop: 0.45; --halo: rgba(22, 30, 41, 0.9);
    color-scheme: dark;
 } }
:root[data-theme="dark"] { --logo-arc: #E6EDF7; 
    --bg: #0E141C; --surface: #161E29; --surface-2: #1B2431; --line: #273242; --line-soft: #212B39;
    --field-line: #364253; --ink: #E8EDF3; --ink-2: #C3CCD7; --ink-3: #8E9AAB; --muted-fill: #212B38;
    --blue: #5297EA; --blue-ink: #8DBBF0; --blue-soft: #172A42; --blue-wash: #142134;
    --amber: #F5A524; --amber-ink: #F7BA57; --amber-soft: #33270F;
    --green: #22C08A; --green-ink: #52D4A4; --green-soft: #10291F;
    --violet: #9B82F0; --red-ink: #F27389; --teal: #1FB5C2; --teal-ink: #62D2DA; --teal-soft: #0F2A2D;
    --on-accent: #08111F; --focus: #5297EA; --notice-ink: #C2DAF7; --warn-ink: #F6D39B; --tag-ink: #F7BA57;
    --tag-hover: #4A3714; --ok-dot: #22C08A; --ok-ink: #A3E7CC; --bad-soft: #3A1820; --bad-ink: #F6A7B4;
    --danger-line: #6B2A36; --danger-wash: #2A1419; --switch-off: #3A4656; --knob: #E8EDF3; --pb-fill: #3A4656;
    --border-strong: #4A576A; --dash: #3A4656; --blue-line: #2A4A72; --sep: #4A576A; --chev: #6B7787;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45); --dialog-shadow: rgba(0, 0, 0, 0.6);
    --h-sky: #1A283B; --h-wall-top: #2C3848; --h-wall-bot: #232E3C; --h-side-a: #273241; --h-side-b: #1E2834;
    --h-roof-a: #4A5B71; --h-roof-b: #2B3747; --h-trim: #5A6A7F; --h-stroke: #3B4859; --h-ground: #2E3A49;
    --h-door: #33404F; --h-unit-a: #2C3848; --h-unit-b: #232E3C; --h-slot: #18212D; --h-led: #4A576A;
    --h-line: #364253; --h-shadow-op: 0.35; --h-drop: 0.45; --halo: rgba(22, 30, 41, 0.9);
    color-scheme: dark;
 }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
a:hover { color: var(--blue-ink); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Laadscherm / geen toegang ---------- */
.brand-logo { width: 34px; height: 34px; border-radius: 9px; flex: none; object-fit: contain; }
.gate {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
    background: var(--bg); text-align: center; padding: 24px;
}
.gate h1 { margin: 0; font-size: 22px; }
.gate p { margin: 0; color: var(--ink-3); max-width: 44ch; }
.spinner {
    width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid var(--blue-soft); border-top-color: var(--blue);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------- App-shell ---------- */
.shell { min-height: 100vh; display: flex; }

.sidebar {
    width: 248px; flex: none;
    background: var(--surface); border-right: 1px solid var(--line);
    padding: 24px 16px; display: flex; flex-direction: column; gap: 24px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px; background: var(--blue);
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.brand-name { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-logo { width: 34px; height: 34px; flex: none; display: block; }
.beta-tag {
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
    color: var(--tag-ink); background: var(--amber-soft); border-radius: 999px; padding: 2px 8px;
}
a.beta-tag { text-decoration: none; }
a.beta-tag:hover { background: var(--tag-hover); }

.device-picker { display: flex; flex-direction: column; gap: 4px; }
.device-picker label { font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.device-picker select {
    width: 100%; min-height: 46px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
    font-weight: 700; font-size: 14px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; display: inline-block; }
.dot.ok { background: var(--ok-dot); }
.dot.warn { background: var(--amber); }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 0 12px 6px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px;
    border-radius: 10px; color: var(--ink-2); font-weight: 600; text-decoration: none;
}
.nav-link:hover { background: var(--muted-fill); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.nav-link .later { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.nav-link svg { flex: none; }

.account { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
    font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.account-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.account-name { max-width: 100%; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 2px 0; min-height: 24px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.link-btn:hover { color: var(--ink); text-decoration: underline; }

.main { flex: 1; min-width: 0; padding: 32px clamp(16px, 3vw, 40px) 48px; }
.container { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

.beta-banner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
    background: var(--amber-soft); color: var(--warn-ink); border-radius: 12px; padding: 10px 14px; font-size: 14px;
}
.beta-banner a { color: var(--warn-ink); font-weight: 700; }

/* ---------- Bouwstenen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.card-title { margin: 0; font-size: 18px; font-weight: 800; }
.card-sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; min-height: 44px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer;
}
.btn-secondary { border: 1px solid var(--field-line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary { border: 0; background: var(--blue); color: var(--on-accent); }
.btn-primary:hover { background: var(--blue-ink); color: var(--on-accent); }

.segmented { display: inline-flex; padding: 3px; background: var(--muted-fill); border-radius: 10px; gap: 2px; }
.segmented button {
    border: 0; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2);
    padding: 8px 14px; border-radius: 8px; min-height: 36px; cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; color: var(--blue); }

.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; background: var(--muted-fill); color: var(--ink-2); }
.pill.ok { background: var(--green-soft); color: var(--green-ink); }

.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sw-blue { background: var(--blue); }
.sw-amber { background: var(--amber); }
.sw-green { background: var(--green); }
.sw-violet { background: var(--violet); }
.sw-teal { background: var(--teal); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.legend-line { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.empty { color: var(--ink-3); font-size: 14px; margin: 0; }

/* ---------- Mobiel: zijbalk wordt topbalk + onderbalk ---------- */
@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar {
        width: auto; height: auto; position: static; overflow: visible;
        flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px;
        padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line);
    }
    .brand { padding: 0; flex: 1; }
    .device-picker { flex: 0 1 200px; }
    .device-picker label { display: none; }
    .device-picker select { min-height: 40px; padding: 6px 10px; }
    .nav-group.secondary, .account { display: none; }
    .nav-group.primary {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        flex-direction: row; gap: 0; background: var(--surface); border-top: 1px solid var(--line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .nav-group.primary .nav-link {
        flex: 1; flex-direction: column; gap: 2px; padding: 6px 0; min-height: 52px;
        font-size: 11px; justify-content: center; background: none;
    }
    .nav-group.primary .nav-link .later { display: none; }
    .nav-group.primary .nav-link.nav-desk { display: none; }
    .nav-group.primary .nav-more { display: flex; }
    .main { padding: 20px 16px 96px; }
    .page-head h1 { font-size: 24px; }
}

/* ---------- Mobiel: knop "Meer" + paneel van onderaf ---------- */
.nav-more { display: none; border: 0; font: inherit; cursor: pointer; }
.nav-more.is-current { color: var(--blue); font-weight: 700; }
.more-sheet {
    margin: auto auto 0; width: min(100%, 560px); max-width: 100%; max-height: 85vh; overflow-y: auto;
    border: 0; border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface); color: var(--ink);
}
.more-sheet::backdrop { background: var(--dialog-shadow); }
.more-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 8px 12px; }
.more-head strong { font-size: 17px; font-weight: 800; }
.more-close {
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink-2);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.more-close:hover { background: var(--muted-fill); }
.more-links { display: flex; flex-direction: column; gap: 2px; }
.more-account { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.more-account .account-name { flex: 1; min-width: 0; }

/* ---------- Abonnement: vergrendelde onderdelen ---------- */
.access-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
    background: var(--blue-soft); color: var(--notice-ink); border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.access-banner span { flex: 1 1 280px; }
.lock-note {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    background: var(--blue-wash); border: 1px solid var(--blue-line); border-radius: var(--radius); padding: 14px 16px;
}
.lock-note > svg { flex: none; color: var(--blue); }
.lock-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lock-text strong { font-size: 14px; }
.lock-text span { font-size: 13px; color: var(--ink-2); }
.is-locked { opacity: 0.5; filter: grayscale(0.5); user-select: none; }
@media (forced-colors: active) { .is-locked { opacity: 1; filter: none; } }

/* ---------- Formulieren (gedeeld) ---------- */
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field-row.three { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 14px; font-weight: 700; }
.field-hint { font-size: 12px; color: var(--ink-3); }
.field-error { font-size: 12px; color: var(--red-ink); font-weight: 600; }
.input {
    width: 100%; min-height: 46px; padding: 10px 14px;
    border: 1px solid var(--field-line); border-radius: var(--radius-sm); background: var(--surface);
}
.input:disabled, .input-unit:has(input:disabled) { background: var(--surface-2); color: var(--ink-3); }
.input[aria-invalid="true"], .input-unit[data-invalid="true"] { border-color: var(--red-ink); }
.input-unit {
    display: flex; align-items: center; min-height: 46px; padding: 0 14px;
    border: 1px solid var(--field-line); border-radius: var(--radius-sm); background: var(--surface);
}
.input-unit:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; outline: none; }
.input-unit span { font-size: 14px; color: var(--ink-3); font-weight: 600; }
select.input { padding-right: 32px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-text { min-width: 0; }
.switch-text strong { display: block; font-size: 14px; }
.switch-text span { display: block; font-size: 13px; color: var(--ink-3); }
.switch {
    flex: none; width: 46px; height: 28px; border-radius: 999px; border: 0; padding: 3px;
    background: var(--switch-off); cursor: pointer; display: flex; justify-content: flex-start; transition: background 0.15s;
}
.switch::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.switch[aria-checked="true"] { background: var(--blue); justify-content: flex-end; }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choice {
    display: flex; gap: 12px; align-items: flex-start; text-align: left;
    padding: 15px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface); cursor: pointer;
}
.choice[aria-checked="true"] { border: 2px solid var(--blue); padding: 14px; background: var(--blue-wash); }
.choice:disabled { cursor: not-allowed; opacity: 0.6; }
.choice-title { display: block; font-weight: 800; font-size: 14px; }
.choice-text { display: block; font-size: 13px; color: var(--ink-3); }
.choice[aria-checked="true"] .choice-text { color: var(--ink-2); }
.radio-dot {
    flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
    border: 2px solid var(--field-line); background: var(--surface);
}
.choice[aria-checked="true"] .radio-dot { border: 6px solid var(--blue); }

.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
    min-height: 46px; padding: 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--field-line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip[aria-checked="true"] { border: 2px solid var(--blue); padding: 9px; background: var(--blue-wash); color: var(--blue); font-weight: 800; }
@media (max-width: 480px) {
    .chip { font-size: 13px; padding: 8px 4px; }
    .chip[aria-checked="true"] { padding: 7px 3px; }
}

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; background: var(--blue-soft); color: var(--notice-ink); }
.notice.warn { background: var(--amber-soft); color: var(--warn-ink); }
.notice.error { background: var(--bad-soft); color: var(--bad-ink); }
.notice.ok { background: var(--green-soft); color: var(--ok-ink); }
.notice strong { display: block; }

/* Melding nieuw leverancierstarief (contract-notice.js) */
.ct-notice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ct-notice[hidden] { display: none; }
.ct-notice strong { margin-bottom: -4px; }
.ct-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ct-notice-hint { font-size: 13px; opacity: 0.85; }
.ct-notice-err { color: var(--bad-ink); font-weight: 700; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.actions .status { margin-right: auto; font-size: 14px; color: var(--ink-3); }
.actions .status.ok { color: var(--green-ink); font-weight: 700; }
.actions .status.err { color: var(--red-ink); font-weight: 700; }

details.disclosure { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
details.disclosure > summary { cursor: pointer; font-weight: 700; font-size: 14px; padding: 13px 0; min-height: 44px; }
details.disclosure[open] > summary { border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
details.disclosure .disclosure-body { padding-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Beta 2: gedeelde onderdelen (beta-widgets.js) ---------- */
.info-btn {
    flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--field-line);
    background: var(--surface); color: var(--ink-3); font: 800 13px/1 var(--font); font-style: italic; cursor: pointer;
}
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-wash); }
.info-text { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }
.head-tools { display: flex; align-items: center; gap: 10px; }

.ring {
    --p: 0; width: 148px; height: 148px; border-radius: 50%;
    background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--muted-fill) 0);
    display: grid; place-items: center;
}
.ring::before { content: ''; grid-area: 1 / 1; width: 120px; height: 120px; border-radius: 50%; background: var(--surface); }
.ring-val { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; align-items: center; }
.ring-val strong { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--green-ink); }
.ring-val span { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.ring.teal { background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--muted-fill) 0); }
.ring.teal .ring-val strong { color: var(--teal-ink); }
.ring.amber { background: conic-gradient(var(--amber) calc(var(--p) * 1%), var(--muted-fill) 0); }
.ring.amber .ring-val strong { color: var(--amber-ink); }
.sw-ink { background: var(--ink-2); }
.self { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 2px 0 14px; }
.self-sub { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.hero.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stat-list { margin: 0; display: flex; flex-direction: column; }
.stat-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.stat-list > div:first-child { border-top: 0; }
.stat-list dt { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.stat-list dd { margin: 0; font-weight: 800; white-space: nowrap; }
.big-num { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.big-num small { font-size: 18px; font-weight: 700; margin-left: 4px; }
/* ---------- Stroomprijs ---------- */
.price-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.price-now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.price-big strong { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; }
.price-big span { font-size: 15px; font-weight: 700; margin-left: 3px; color: var(--ink-2); }
.pill.cheap { background: var(--green-soft); color: var(--green-ink); }
.pill.high { background: var(--amber-soft); color: var(--amber-ink); }
.price-facts { display: flex; gap: 24px; margin: 0; }
.price-facts div { display: flex; flex-direction: column; }
.price-facts dt { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.price-facts dd { margin: 0; font-weight: 800; font-size: 14px; }
.price-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 120px; position: relative; }
.pb { position: relative; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.pb:hover i { filter: brightness(0.92); }
.pb.sel::after { content: ''; position: absolute; left: -2px; right: -2px; top: -4px; bottom: -4px; border: 2px solid var(--blue); border-radius: 5px; }
.pb i { position: absolute; left: 0; right: 0; border-radius: 3px 3px 0 0; background: var(--pb-fill); }
.pb.neg i { border-radius: 0 0 3px 3px; }
.pb.cheap i { background: var(--green); }
.pb.high i { background: var(--amber); }
.pb.past i { opacity: 0.4; }
.pb.now::after { content: ''; position: absolute; left: -2px; right: -2px; top: -4px; bottom: -4px; border: 2px solid var(--ink); border-radius: 5px; }
.price-zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.price-axis { display: grid; gap: 3px; font-size: 11px; color: var(--ink-3); margin-top: 6px; font-weight: 600; }
.price-axis span { text-align: center; white-space: nowrap; overflow: visible; }

.pb.act-charge i { background: var(--teal); }
.pb.act-discharge i { background: var(--amber); }
.pb.act-curtail i { background: var(--red-ink); opacity: 0.75; }
.price-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink-2); pointer-events: none; }
.price-line span { position: absolute; right: 0; top: -20px; font-size: 11px; font-weight: 800; background: var(--surface); padding: 0 4px; border-radius: 4px; color: var(--ink-2); }
.price-line.teal { border-color: var(--teal); } .price-line.teal span { color: var(--teal-ink); }
.price-line.amber { border-color: var(--amber); } .price-line.amber span { color: var(--amber-ink); }
.price-line.red { border-color: var(--red-ink); } .price-line.red span { color: var(--red-ink); }
.price-plan { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.chart-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; margin: -2px 0 12px; }
.chart-box { position: relative; height: 280px; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pager { display: flex; align-items: center; gap: 6px; }
.pager-btn {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--field-line); background: var(--surface);
    font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink);
}
.pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pager-label { min-width: 150px; text-align: center; font-weight: 800; font-size: 14px; }
.pager .btn.small { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.legend-box { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.hist-sum { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 18px; }
.hist-sum b { font-weight: 800; color: var(--ink); }

@media (max-width: 980px) { .hero, .hero.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
    .price-big strong { font-size: 30px; }
    .price-facts { gap: 16px; width: 100%; justify-content: space-between; }
    .price-bars, .price-axis { gap: 2px; }
    .price-bars { height: 100px; }
    .pager-label { min-width: 0; flex: 1; }
    .pager { width: 100%; }
    .chart-box { height: 230px; }
    .big-num { font-size: 34px; }
}

.btn.small { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.price-you { font-size: 13px; font-weight: 700; color: var(--ink-2); }
