:root { color-scheme: light; --ink:#10302a; --muted:#5f7670; --line:#dbe5e1; --paper:#fff; --wash:#f2f6f4; --accent:#e85f43; --green:#167b65; --green-d:#0f5c4c; --soft:#e8f4ef; --r:18px; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:16px; }
body { margin:0; background:var(--wash); color:var(--ink); font:16px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif; }
a { color:var(--green-d); }
h2,h3,h4 { margin:0; line-height:1.2; } h3 { font-size:1.05rem; margin:22px 0 8px; }
code { background:#e9f2ee; padding:1px 6px; border-radius:6px; font-size:.92em; }

/* layout: sticky stepper left, content right */
.shell { display:grid; grid-template-columns:260px minmax(0,1fr); gap:32px; width:min(1280px,calc(100% - 32px)); margin:0 auto; padding:28px 0 60px; align-items:start; }
.stepper { position:sticky; top:20px; background:var(--ink); color:#fff; border-radius:var(--r); padding:22px 18px; }
.brand { display:flex; align-items:center; gap:10px; color:#fff; text-decoration:none; font-size:1.05rem; margin-bottom:22px; }
.brand b { color:#8be0c4; } .logo { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:var(--accent); font-weight:800; }
.stepper ol { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
.stepper li a { display:flex; align-items:center; gap:12px; padding:10px 10px; border-radius:12px; color:#c8ddd6; text-decoration:none; font-weight:600; font-size:.95rem; }
.stepper li a i { display:grid; place-items:center; flex:none; width:28px; height:28px; border-radius:50%; border:2px solid #5d8a7d; font-style:normal; font-size:.85rem; }
.stepper li a:hover { background:rgba(255,255,255,.08); }
.stepper li a.on { background:rgba(255,255,255,.14); color:#fff; } .stepper li a.on i { background:var(--accent); border-color:var(--accent); color:#fff; }
.stepper li a.done i { background:#2f9c7f; border-color:#2f9c7f; color:#fff; } .stepper li a.done i::before { content:"✓"; } .stepper li a.done i { font-size:0; } .stepper li a.done i::before { font-size:.9rem; }
.stepper-note { margin:18px 6px 0; font-size:.82rem; color:#9fc2b6; }
main { min-width:0; }

/* cards */
.card { background:var(--paper); border:1px solid var(--line); border-radius:24px; padding:clamp(20px,3.5vw,36px); margin:0 0 22px; box-shadow:0 10px 36px rgba(16,48,42,.05); }
.step-head { display:flex; gap:16px; align-items:flex-start; margin-bottom:18px; }
.step-head > i { display:grid; place-items:center; flex:none; width:42px; height:42px; border-radius:50%; background:var(--ink); color:#fff; font-style:normal; font-weight:800; font-size:1.1rem; }
.step-head h2 { font-size:1.5rem; } .step-head p { margin:4px 0 0; color:var(--muted); }
.intro { display:grid; grid-template-columns:1fr 1fr; gap:26px; background:linear-gradient(135deg,#fff 0%,#eef8f4 100%); }
.intro h2 { font:700 1.6rem/1.15 Georgia,serif; margin:10px 0 8px; } .intro p { color:var(--muted); margin:0 0 12px; }
.intro-col.more { border-left:1px solid var(--line); padding-left:26px; }
.ticks { list-style:none; margin:0; padding:0; } .ticks li { padding:3px 0 3px 26px; position:relative; } .ticks li::before { content:"✓"; position:absolute; left:0; color:var(--green); font-weight:800; }
.badge { display:inline-block; padding:3px 11px; border-radius:999px; font-size:.76rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.badge.green { background:#d6f0e5; color:#0f5c4c; } .badge.orange { background:#fde4d9; color:#a8421f; } .badge.gray { background:#eceeed; color:#667; text-transform:none; letter-spacing:0; font-size:.8rem; vertical-align:middle; }

/* tabs */
.tabs { display:flex; gap:6px; border-bottom:2px solid var(--line); margin:4px 0 18px; flex-wrap:wrap; }
.tab { background:transparent; color:var(--muted); border-radius:10px 10px 0 0; padding:10px 18px; margin-bottom:-2px; border-bottom:2px solid transparent; }
.tab.on { color:var(--ink); border-bottom-color:var(--accent); background:var(--soft); }
.tab-pane[hidden] { display:none; }

/* forms */
.fields,.period { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:12px; } .fields.one { grid-template-columns:1fr; max-width:520px; }
label { display:grid; gap:6px; color:var(--muted); font-weight:650; }
input,select,button { font:inherit; }
input,select { width:100%; padding:12px 14px; border:1px solid #becdc7; border-radius:12px; background:#fff; color:var(--ink); }
input:focus,select:focus { outline:3px solid #b8e3d3; border-color:var(--green); }
button,.btn { border:0; border-radius:12px; background:var(--accent); color:#fff; padding:12px 20px; font-weight:800; cursor:pointer; text-decoration:none; display:inline-block; }
button:hover,.btn:hover { filter:brightness(.95); } button:disabled { opacity:.45; cursor:not-allowed; }
button.secondary,.btn { background:var(--green); }
button.remove { padding:5px; color:#a33d2b; background:transparent; font-size:.88rem; }
.actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:16px; }
.add-menu,.connection-title { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.add-menu select { max-width:380px; }
.privacy,.status { color:var(--muted); } .status.error,.error { color:#b43e2e; }
.note { background:#fff4cf; border-radius:12px; padding:10px 14px; font-size:.92rem; }
.callout { background:var(--wash); border-radius:14px; padding:12px 16px; margin:14px 0; } .callout.good { background:var(--soft); border:1px solid #bfe3d6; }
.lead { font-size:1.02rem; margin:0 0 6px; }
.empty { color:var(--muted); background:var(--wash); border-radius:14px; padding:18px; text-align:center; }
.consent { grid-template-columns:auto 1fr; align-items:start; margin-top:18px; padding:14px 16px; border-radius:14px; background:var(--soft); color:var(--ink); font-weight:500; }
.consent input { width:auto; margin-top:5px; }
progress { width:100%; height:10px; margin-top:10px; accent-color:var(--green); }
.password-field { position:relative; display:block; } .password-field .password { padding-right:50px; }
button.password-toggle { position:absolute; right:5px; top:50%; transform:translateY(-50%); min-width:40px; padding:7px; border-radius:8px; background:transparent; color:var(--ink); line-height:1; }
.credential-status { display:inline-block; margin-left:8px; padding:4px 9px; border-radius:999px; font-size:.78rem; font-weight:800; }
.status-unknown,.status-check-failed { color:#6e6251; background:#f3eee6; } .status-working { color:#12614e; background:#e4f4ed; } .status-not-working { color:#a83d2c; background:#fdebe7; }
.connection { border:1px solid var(--line); border-radius:16px; padding:18px; margin:16px 0; }
.controllers { margin-top:16px; display:grid; gap:8px; }
.controller-row { grid-template-columns:auto 1fr; align-items:start; background:var(--wash); border-radius:10px; padding:10px 12px; color:var(--ink); } .controller-row input { width:auto; margin-top:5px; }
.help-link { display:inline-block; margin-top:2px; font-size:.85rem; font-weight:500; }

/* account bar (google) */
.account-bar { padding:14px 18px; border:1px solid var(--line); border-radius:16px; background:var(--wash); margin-bottom:6px; }
#signed-in { display:flex; align-items:center; gap:14px; } #signed-in[hidden],#signed-out[hidden] { display:none; } #signed-in button { margin-left:auto; }
#account-picture { width:42px; height:42px; border-radius:50%; object-fit:cover; } #account-email { color:var(--muted); }
.google-login { display:inline-block; margin-top:8px; padding:10px 18px; border:1px solid #b8c7c1; border-radius:12px; background:#fff; color:var(--ink); text-decoration:none; font-weight:800; }
.google-login:hover { background:#edf4f1; } .google-login[aria-disabled="true"] { opacity:.55; pointer-events:none; }

/* downloads, options, flow */
.download { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--soft); border:1px solid #bfe3d6; border-radius:16px; padding:14px 18px; margin:14px 0; }
.export-box { margin-top:26px; padding-top:6px; border-top:1px dashed var(--line); }
.options { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; } .options.two { grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); }
.opt { border:1px solid var(--line); border-radius:18px; padding:18px; background:#fff; display:flex; flex-direction:column; gap:6px; }
.opt h3 { margin:6px 0 2px; } .opt p { margin:0; color:var(--muted); font-size:.94rem; } .opt .needs { color:var(--ink); font-size:.86rem; margin-top:auto; padding-top:8px; }
.opt input[type=file] { padding:8px; }
.flow { margin:18px 0 6px; padding-left:1.3rem; color:var(--muted); font-size:.93rem; } .flow li { margin:5px 0; } .flow b { color:var(--ink); }
.foot { text-align:center; color:var(--muted); font-size:.85rem; padding:14px 0 0; }

/* forecast (old agc panel) */
.panel-inline { margin-top:22px; border-top:1px dashed var(--line); padding-top:6px; }
.forecast-chart { width:100%; height:auto; min-height:220px; margin:16px 0; border:1px solid var(--line); border-radius:14px; background:linear-gradient(#fff,#f4f8f6); }
.forecast-band { fill:rgba(22,123,101,.18); } .forecast-min,.forecast-max { fill:none; stroke-width:2; } .forecast-min { stroke:#e85f43; } .forecast-max { stroke:#167b65; }
.forecast-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; } .forecast-stat { padding:14px; border-radius:12px; background:var(--wash); }
.forecast-stat span { display:block; color:var(--muted); font-size:.82rem; } .forecast-stat strong { display:block; margin-top:4px; }
.charger-match { margin-top:10px; padding:14px; border:1px solid var(--line); border-radius:12px; }
.match-badge { display:inline-block; margin-left:8px; padding:3px 8px; border-radius:999px; font-size:.78rem; font-weight:800; }
.match-same { color:#12614e; background:#e4f4ed; } .match-different { color:#a83d2c; background:#fdebe7; } .match-unknown { color:#6e6251; background:#f3eee6; }

/* tables */
#anon-table,#load-table { width:100%; border-collapse:collapse; font-size:.9rem; }
#anon-table th,#anon-table td,#load-table th,#load-table td { text-align:left; padding:6px 10px; border-bottom:1px solid #e5ece9; word-break:break-all; }
#anon-table.hide-sbqr .col-sbqr { display:none; }
#load-chart svg { width:100%; height:auto; background:#fff; border:1px solid var(--line); border-radius:14px; }
.t-grid, tr.t-grid td { background:#e3eefb; } .t-PV, tr.t-PV td { background:#fff3c4; } .t-EV, tr.t-EV td { background:#dff3e6; }
.t-skip, tr.t-skip td { background:#ececec; color:#8a8a8a; } tr.t-skip td { text-decoration:line-through; }
.legend { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0 6px; font-size:.82rem; } .legend .chip { padding:3px 11px; border-radius:999px; border:1px solid rgba(0,0,0,.1); color:#12332b; }
.tbl-scroll { max-height:25rem; overflow-y:auto; border:1px solid var(--line); border-radius:14px; margin-top:8px; } .tbl-scroll table { margin-top:0 !important; }
.tbl-scroll thead th { position:sticky; top:0; background:#fff; z-index:1; box-shadow:0 1px 0 var(--line); } .tbl-scroll tbody tr { height:2.2rem; }
details.privacy { margin-top:14px; } details summary { cursor:pointer; }

/* stored / dropped */
.store-info { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; } .store-info > div { border-radius:14px; padding:10px 14px; font-size:.9rem; }
.store-info h4 { margin:0 0 6px; font-size:.95rem; } .store-info ul { margin:0; padding-left:1.1rem; } .store-info li { margin:2px 0; }
.store-yes { background:#e4f4ed; } .store-no { background:#fdebe7; } .store-tmp { background:#fff3c4; grid-column:1 / -1; } .store-extra { background:#f9d9d2; border-radius:6px; padding:1px 6px; font-weight:600; }

/* help dialog */
#key-help { max-width:560px; width:calc(100% - 32px); border:0; border-radius:18px; padding:22px 24px; box-shadow:0 20px 60px rgba(18,51,43,.3); } #key-help::backdrop { background:rgba(18,51,43,.45); }
#key-help h3 { margin:0 0 10px; } #key-help ol { padding-left:1.2rem; margin:8px 0; } #key-help li { margin:6px 0; }
#key-help .close { position:absolute; top:12px; right:12px; padding:4px 10px; } #key-help .note { margin-top:10px; } #key-help .ip { font-size:1.05rem; }

/* phases + summary */
.phases { background:#f3f6f4; border-radius:14px; padding:12px 16px; margin:14px 0; } .phases h4 { margin:0 0 6px; } .phases ul { list-style:none; margin:0; padding:0; } .phases li { padding:3px 0; font-size:.92rem; }
.phases .ph-klaar { color:#12614e; } .phases .ph-fout { color:#a83d2c; } .phases .ph-gepland,.phases .ph-wacht,.phases .ph-overgeslagen { color:#8a9a93; } .phases .ph-bezig { font-weight:600; }
.spin { display:inline-block; width:.8em; height:.8em; border:2px solid #12614e; border-top-color:transparent; border-radius:50%; animation:spin 1s linear infinite; vertical-align:-1px; } @keyframes spin { to { transform:rotate(360deg); } }
.summary { margin:14px 0; } .summary h4 { margin:0 0 8px; } .summary .tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.summary .tile { border-radius:14px; padding:10px 12px; background:#f3f6f4; } .summary .tile b { display:block; font-size:1.25rem; margin-top:2px; }
.summary .tile.import { background:#e3eefb; } .summary .tile.export { background:#fde7df; } .summary .tile.pv { background:#fff3c4; } .summary .tile.self { background:#dff3e6; }
.summary .more { display:inline-block; margin-top:12px; padding:10px 18px; border-radius:12px; background:var(--ink); color:#fff; font-weight:700; text-decoration:none; }

@media (max-width:980px) {
  .shell { grid-template-columns:1fr; gap:16px; padding-top:12px; }
  .stepper { position:sticky; top:0; z-index:5; border-radius:0 0 16px 16px; padding:10px 12px; margin:0 -16px; }
  .brand,.stepper-note { display:none; } .stepper ol { display:flex; gap:2px; overflow-x:auto; } .stepper li a { padding:6px 8px; gap:6px; white-space:nowrap; } .stepper li a span { display:none; } .stepper li a.on span { display:inline; }
  .intro { grid-template-columns:1fr; } .intro-col.more { border-left:0; padding-left:0; border-top:1px solid var(--line); padding-top:18px; }
}
@media (max-width:700px) { .fields,.period,.forecast-stats,.store-info { grid-template-columns:1fr; } .step-head h2 { font-size:1.25rem; } }
