html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ======================================================
   DynamicEnergy Dashboard Styling
   ====================================================== */

:root {
    --de-primary:   #f0a400;   /* amber energy accent */
    --de-bg:        #0d1117;   /* page background */
    --de-dark:      #0d1117;
    --de-sidebar:   #161b22;   /* sidebar panel */
    --de-surface:   #21262d;   /* cards / panels */
    --de-surface-2: #2d333b;   /* slightly elevated */
    --de-border:    #30363d;   /* subtle borders */
    --de-text:      #e6edf3;   /* primary text */
    --de-muted:     #7d8590;   /* secondary text */
    --de-muted-contrast: #9aa4b2; /* secondary text op donkere kaarten/tooltips, iets lichter voor leesbaarheid */
    --de-success:   #3fb950;
    --de-danger:    #f85149;
    --de-info:      #58a6ff;
}

html, body {
    background-color: var(--de-bg);
    color: var(--de-text);
}

/* --- Sidebar / Navbar --- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
    color: var(--de-text) !important;
}

.sidebar {
    background-color: var(--de-sidebar) !important;
    border-right: 1px solid var(--de-border);
}

.nav-link { color: var(--de-muted) !important; }
.nav-link:hover { color: var(--de-text) !important; background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--de-primary) !important; font-weight: 600; background: rgba(240,164,0,.08) !important; }

/* --- Dashboard header --- */
.dashboard-header {
    border-bottom: 1px solid var(--de-border);
    padding-bottom: .75rem;
}

/* --- Stat cards (dashboard) --- */
.stat-card {
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-icon { font-size: 2rem; }

.stat-body { flex: 1; }
.stat-label { font-size: .75rem; color: var(--de-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-sub   { font-size: .75rem; color: var(--de-muted); margin-top: .25rem; }

.stat-grid    { border-left: 3px solid var(--de-danger); }
.stat-battery { border-left: 3px solid var(--de-info); }
.stat-solar   { border-left: 3px solid var(--de-primary); }
.stat-temp    { border-left: 3px solid var(--de-success); }

/* SoC bar in dashboard card */
.soc-bar-container {
    height: 6px;
    background: var(--de-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
    width: 100%;
}
.soc-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--de-info), var(--de-success));
    border-radius: 3px;
    transition: width .6s ease;
}

/* --- Legenda --- */
.strategie-legenda { flex-wrap: wrap; }
.legenda-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
}
.legenda-kleur {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* --- 24-uur tijdlijn --- */
.tijdlijn-container {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    border-radius: 8px;
    overflow: visible;
}

.tijdlijn-blok {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
}
.tijdlijn-blok:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.tijdlijn-blok:last-child  { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
/* Let op: geen "opacity" op :hover gebruiken — opacity werkt op het hele
   element inclusief de child-tooltip (die dan zelf ook doorzichtig wordt,
   ook al staat zijn eigen opacity op 1). Gebruik daarom een box-shadow
   als hover-indicatie, die alleen de blok-achtergrond beïnvloedt. */
.tijdlijn-blok:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); z-index: 30; }
.tijdlijn-blok.huidig {
    outline: 2px solid #fff;
    outline-offset: -2px;
    z-index: 1;
}

.tijdlijn-uur {
    font-size: .65rem;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* Hover-kaartje met details per periode */
.tijdlijn-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    min-width: 215px;
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.5);
    padding: .6rem .75rem;
    font-size: .78rem;
    text-align: left;
    color: var(--de-text);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .12s ease;
    z-index: 40;
}
.tijdlijn-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--de-border);
}
.tijdlijn-blok:hover .tijdlijn-tooltip {
    opacity: 1;
    visibility: visible;
}
/* Randblokken: tooltip binnen beeld houden i.p.v. gecentreerd */
.tijdlijn-blok:nth-child(-n+3) .tijdlijn-tooltip {
    left: 0;
    transform: none;
}
.tijdlijn-blok:nth-child(-n+3) .tijdlijn-tooltip::after { left: 16px; transform: none; }
.tijdlijn-blok:nth-last-child(-n+3) .tijdlijn-tooltip {
    left: auto;
    right: 0;
    transform: none;
}
.tijdlijn-blok:nth-last-child(-n+3) .tijdlijn-tooltip::after { left: auto; right: 16px; transform: none; }

.tt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .3rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--de-border);
}
.tt-tijd { font-weight: 600; white-space: nowrap; }
.tt-strategie-naam { font-size: .75rem; font-weight: 600; margin-bottom: .35rem; white-space: nowrap; }
.tt-sectie {
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--de-muted-contrast);
    margin: .4rem 0 .15rem;
}
.tt-rij {
    display: flex;
    justify-content: space-between;
    gap: .9rem;
    padding: .08rem 0;
    white-space: nowrap;
}
.tt-rij span:first-child { color: var(--de-muted-contrast); }
.tt-rij span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; }

/* --- Detail tabel --- */
.strategie-tabel {
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 12px;
    overflow: hidden;
}

.strategie-header-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 90px 90px 90px 130px 140px 190px;
    padding: .6rem 1rem;
    background: var(--de-bg);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--de-muted);
    border-bottom: 1px solid var(--de-border);
}

.strategie-rij {
    display: grid;
    grid-template-columns: 80px 1fr 100px 90px 90px 90px 130px 140px 190px;
    padding: .55rem 1rem;
    font-size: .85rem;
    border-bottom: 1px solid rgba(51,65,85,.4);
    align-items: center;
    transition: background .1s;
}

/* Kosten/opbrengst: prognose en gerealiseerd naast elkaar, labels alleen in de header */
.kosten-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.kosten-subheader {
    display: flex;
    gap: .9rem;
    font-size: .62rem;
    text-transform: none;
    letter-spacing: 0;
    opacity: .75;
}
.kosten-subheader span { min-width: 3.5rem; text-align: right; }
.kosten-cel {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}
.kosten-cel > span:not(.kosten-scheiding),
.kosten-cel > span.text-muted { min-width: 3.5rem; text-align: right; }
.kosten-scheiding { color: var(--de-muted); opacity: .5; }
.strategie-rij:hover { background: rgba(255,255,255,.03); }
.strategie-rij:last-child { border-bottom: none; }

.strategie-rij-huidig {
    background: rgba(240,164,0,.07) !important;
    border-left: 3px solid var(--de-primary);
}

.strategie-totaal {
    background: var(--de-bg) !important;
    font-size: .85rem;
    border-top: 2px solid var(--de-border) !important;
}

.strategie-tijd {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.strategie-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* Mini SoC bar in tabel */
.mini-soc-bar {
    height: 4px;
    background: var(--de-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}
.mini-soc-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--de-info), var(--de-success));
    border-radius: 2px;
}

/* Responsive: hide less important columns on small screens */
@media (max-width: 900px) {
    .strategie-header-row,
    .strategie-rij {
        grid-template-columns: 70px 1fr 90px 90px 170px;
    }
    .strategie-header-row > div:nth-child(3),
    .strategie-rij > div:nth-child(3),
    .strategie-header-row > div:nth-child(6),
    .strategie-rij > div:nth-child(6),
    .strategie-header-row > div:nth-child(7),
    .strategie-rij > div:nth-child(7),
    .strategie-header-row > div:nth-child(8),
    .strategie-rij > div:nth-child(8) {
        display: none;
    }
}

/* Bootstrap overrides for dark theme */
.form-control {
    background: var(--de-surface);
    border-color: var(--de-border);
    color: var(--de-text);
}
.form-control:focus {
    background: var(--de-surface);
    border-color: var(--de-primary);
    color: var(--de-text);
    box-shadow: 0 0 0 .2rem rgba(240,164,0,.2);
}
.btn-outline-secondary {
    color: var(--de-muted);
    border-color: var(--de-border);
}
.btn-outline-secondary:hover {
    background: var(--de-surface-2);
    color: var(--de-text);
    border-color: var(--de-border);
}
.btn-warning { background-color: var(--de-primary); border-color: var(--de-primary); color: #0d1117; font-weight: 600; }
.btn-warning:hover { background-color: #e09900; border-color: #e09900; color: #0d1117; }
.btn-primary { background-color: #1f6feb; border-color: #1f6feb; }
.btn-primary:hover { background-color: #388bfd; border-color: #388bfd; }
.btn-outline-primary { color: #58a6ff; border-color: #1f6feb; }
.btn-outline-primary:hover { background-color: #1f6feb; color: #fff; }

.text-warning-emphasis { color: #e3b341 !important; }
.text-success { color: var(--de-success) !important; }
.text-danger  { color: var(--de-danger) !important; }
.text-primary { color: var(--de-info) !important; }
.text-muted   { color: var(--de-muted) !important; }

/* --- Huidige/volgende strategie --- */
.strategie-nu-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
}

.strategie-nu-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.strategie-nu-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--de-muted);
}

.strategie-nu-naam {
    font-size: 1.1rem;
    font-weight: 700;
}

.strategie-nu-icon {
    margin-right: .35rem;
}

.strategie-nu-tijd {
    font-size: .8rem;
    color: var(--de-muted);
}

.strategie-nu-pijl {
    font-size: 1.5rem;
    color: var(--de-muted);
}

/* --- Dag chart --- */
.dag-chart-card {
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 0.75rem;
}

.dag-chart-header {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--de-muted);
    margin-bottom: .75rem;
}

.dag-chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.dag-chart-legenda {
    display: flex;
    gap: 1rem;
    margin-top: .5rem;
    flex-wrap: wrap;
}

.legenda-chip {
    font-size: .75rem;
    font-weight: 600;
    padding: .15rem .6rem;
    border-radius: 20px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--de-border);
}

.lijn-grid     { color: var(--de-danger); }
.lijn-batterij { color: var(--de-info); }
.lijn-zon      { color: #e3b341; }

/* --- Zonnepanelen tabel --- */
.zon-tabel-wrapper {
    overflow-x: auto;
}

.zon-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    white-space: nowrap;
}

.zon-tabel th,
.zon-tabel td {
    padding: .35rem .75rem;
    text-align: right;
    border-bottom: 1px solid rgba(51,65,85,.4);
}

.zon-tabel th {
    background: var(--de-bg);
    color: var(--de-muted);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.zon-tabel th:first-child,
.zon-tabel td:first-child {
    text-align: left;
}

.zon-tabel tbody tr:hover {
    background: rgba(255,255,255,.03);
}

.zon-uur {
    font-variant-numeric: tabular-nums;
    color: var(--de-muted);
}

.zon-totaal {
    border-left: 1px solid var(--de-border);
    color: #e3b341;
}

.zon-dagtotaal td {
    background: var(--de-bg);
    border-top: 2px solid var(--de-border);
    font-weight: 600;
    color: var(--de-text);
}

.zon-dagtotaal .zon-totaal {
    color: #e3b341;
}

.zon-totaal-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.zon-subheader {
    display: flex;
    gap: .6rem;
    font-size: .62rem;
    text-transform: none;
    letter-spacing: 0;
    opacity: .75;
}
.zon-subheader span { min-width: 3rem; text-align: right; }
.zon-cel {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: .4rem;
    white-space: nowrap;
}
.zon-cel > span:not(.zon-scheiding) { min-width: 3rem; text-align: right; }
.zon-scheiding { color: var(--de-muted); opacity: .5; }

/* ======================================================
   Energy Flow Diagram (Home dashboard)
   ====================================================== */

.energy-diagram {
    display: grid;
    grid-template-areas:
        ".    .     solar   .    ."
        ".    .     sarr    .    ."
        "grid garr  battery tarr thuis";
    grid-template-columns: 1fr 56px 220px 56px 1fr;
    grid-template-rows: auto 64px auto;
    align-items: center;
    justify-items: center;
    gap: 0.75rem 0;
    padding: 1.5rem 1rem;
    background: var(--de-surface);
    border: 1px solid var(--de-border);
    border-radius: 12px;
}

/* ── Grid areas ── */
.ed-solar   { grid-area: solar; }
.ed-sarr    { grid-area: sarr;  width: 100%; display: flex; flex-direction: column; align-items: center; height: 100%; }
.ed-grid    { grid-area: grid; }
.ed-garr    { grid-area: garr;  width: 100%; display: flex; align-items: center; height: 100%; }
.ed-battery { grid-area: battery; }
.ed-tarr    { grid-area: tarr;  width: 100%; display: flex; align-items: center; height: 100%; }
.ed-thuis   { grid-area: thuis; }

/* ── Nodes ── */
.ed-node {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--de-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: center;
    min-width: 130px;
    transition: border-color .3s;
}

.ed-icon  { font-size: 2rem; display: block; margin-bottom: .35rem; line-height: 1; }
.ed-value { font-size: 1.4rem; font-weight: 700; line-height: 1.2; color: #e2e8f0; }
.ed-label { font-size: .7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-top: .35rem; }

.ed-node-solar  { border-color: rgba(240,164,0,.4);  background: rgba(240,164,0,.05); }
.ed-node-import { border-color: rgba(248,81,73,.4);  background: rgba(248,81,73,.05); }
.ed-node-export { border-color: rgba(63,185,80,.4);  background: rgba(63,185,80,.05); }
.ed-node-thuis  { border-color: rgba(88,166,255,.4); background: rgba(88,166,255,.05); }

.ed-val-solar  { color: #e3b341 !important; }
.ed-val-import { color: var(--de-danger) !important; }
.ed-val-export { color: var(--de-success) !important; }
.ed-val-thuis  { color: var(--de-info) !important; }

/* ── Battery gauge ── */
.ed-battery {
    text-align: center;
}

.ed-bat-svg {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 12px rgba(63,185,80,.12));
}

.ed-temp {
    text-align: center;
    font-size: .75rem;
    color: var(--de-muted);
    margin-top: .25rem;
}

/* ── Connectors ── */
.ed-vconn {
    width: 3px;
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-hconn {
    width: 100%;
    height: 3px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ed-vconn.ed-solar  { background: #e3b341; }
.ed-hconn.ed-import { background: var(--de-danger); }
.ed-hconn.ed-export { background: var(--de-success); }
.ed-hconn.ed-thuis  { background: var(--de-info); }
.ed-vconn.ed-idle,
.ed-hconn.ed-idle   { background: var(--de-border); }

.ed-arrow {
    position: absolute;
    font-size: 13px;
    line-height: 1;
    padding: 0 2px;
    background: var(--de-surface);
}

.ed-arrow-solar  { color: #e3b341; }
.ed-arrow-import { color: var(--de-danger); }
.ed-arrow-export { color: var(--de-success); }
.ed-arrow-thuis  { color: var(--de-info); }

/* ── Responsive ── */
@media (max-width: 700px) {
    .energy-diagram {
        grid-template-areas:
            "solar"
            "battery"
            "grid"
            "thuis";
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .ed-sarr, .ed-garr, .ed-tarr { display: none; }
    .ed-node { min-width: auto; width: 100%; }
}
