/* ==========================================================================
   Insteladvies per pomp + logboek (V8, 29-11-2026): js/insteladvies.js,
   js/logboek.js. Geen gekleurde kaartranden: urgentie = pil + icoon.
   ========================================================================== */
.tank-pil.is-blauw { background: var(--alp-status-actief-bg); color: var(--alp-status-actief); }

/* ---------- Kaarten op het Overzicht */
.ia-vak[hidden] { display: none; }
.ia-vak > * + * { margin-top: 16px; }
#device-detail .ia-kaart { margin: 0; }
#device-detail .ia-kaart .tp-kaart-kop h3 { display: flex; align-items: center; gap: 10px; }
#device-detail .ia-kaart .tp-kaart-kop p { max-width: 70ch; }
#device-detail .ia-kaart .tp-kaart-kop > .tank-pil { flex-shrink: 0; }
.ia-icoon {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    background: #2ec4b6; box-shadow: 0 0 0 4px rgba(46, 196, 182, 0.22);
}
.ia-van-naar { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ia-rechts { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; font-size: 0.875rem; }
.ia-rechts small { font-size: 0.78rem; color: var(--alp-text-secondary); }
#device-detail .ia-kaart .sonde-rijen dd { flex-shrink: 1; min-width: 0; }
#device-detail .ia-kaart .sonde-rijen dd > strong { white-space: nowrap; }
#device-detail .ia-noot { border-top: 0; padding-top: 4px; }

/* Hoe berekend: per ochtend een staafje, met de streep op +50 % */
.ia-hoe, .ia-eerder { margin: 0 24px 12px; font-size: 0.85rem; }
.ia-hoe summary, .ia-eerder summary { cursor: pointer; color: var(--alp-brand-primary); font-weight: 500; padding: 4px 0; }
.ia-hoe p { margin: 6px 0; color: var(--alp-text-secondary); line-height: 1.45; max-width: 75ch; }
.ia-dagen, .ia-dagen-as { max-width: 560px; }
.ia-dagen { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 80px; margin: 10px 0 4px; }
.ia-dagen b { flex: 1; background: var(--alp-text-secondary); opacity: 0.45; border-radius: 4px 4px 0 0; min-height: 3px; }
.ia-dagen b.is-hoog { background: var(--pk-overshoot, #d98a1c); opacity: 1; }
.ia-grens { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--alp-text-secondary); pointer-events: none; }
.ia-dagen-as { display: flex; gap: 6px; }
.ia-dagen-as span { flex: 1; text-align: center; font-size: 0.7rem; color: var(--alp-text-secondary); white-space: nowrap; overflow: hidden; }
.ia-klein { font-size: 0.78rem !important; }
.ia-voortgang { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 0.875rem; }
.ia-voortgang i { display: block; width: 120px; height: 7px; border-radius: 7px; background: var(--alp-outline); overflow: hidden; }
.ia-voortgang i b { display: block; height: 100%; background: var(--alp-brand-primary); border-radius: 7px; }
.ia-eerder ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ia-eerder li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--alp-outline); }

/* ---------- Dashboard */
.ia-dash {
    display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px; margin-bottom: var(--alp-space-lg);
    background: var(--alp-surface); border: 1px solid var(--alp-outline); border-radius: var(--alp-radius-md);
}
.ia-dash[hidden] { display: none; }
.ia-dash-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ia-dash-kop h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--alp-text-primary); }
.ia-dash-kop p { margin: 2px 0 0; font-size: 0.8rem; color: var(--alp-text-secondary); max-width: 640px; }
.ia-dash-pillen { display: flex; gap: 6px; flex-wrap: wrap; }
.ia-dash-lijst { display: flex; flex-direction: column; }
.ia-dash-rij {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px;
    border-top: 1px solid var(--alp-outline); color: inherit; text-decoration: none; border-radius: 6px;
}
.ia-dash-rij:first-child { border-top: 0; }
.ia-dash-rij:hover, .ia-dash-rij:focus-visible { background: var(--alp-surface-muted); }
.ia-dash-rij > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ia-dash-rij strong { font-size: 0.9rem; color: var(--alp-text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-dash-rij small { font-size: 0.78rem; color: var(--alp-text-secondary); }
.ia-dash-rij > .tank-pil { flex-shrink: 0; }

/* ---------- Logboek: laatste wijziging bovenaan het Overzicht */
#device-detail .lb-kaart { margin: 0; }
.lb-kaart[hidden] { display: none; }
.lb-regel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.lb-tekst { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 0.9rem; }
.lb-tekst small { font-size: 0.8rem; color: var(--alp-text-secondary); }
.lb-waarde { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-rechts { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lb-alle { padding: 6px 12px; font-size: 0.82rem; }
/* Onder een veld in Instellingen */
.lb-veld { display: block; margin-top: 4px; font-size: 0.74rem; color: var(--alp-text-secondary); line-height: 1.35; }

/* Reden in de tab Wijzigingen */
.wz-pil.is-advies { background: var(--alp-status-aandacht-bg); color: var(--alp-status-aandacht-tekst); }
.wz-pil.is-terug { background: var(--alp-status-toekomst-bg); color: var(--alp-text-secondary); }

@media (max-width: 600px) {
    .ia-hoe, .ia-eerder { margin: 0 16px 12px; }
    .lb-regel { padding: 12px 16px; }
    .lb-rechts { width: 100%; justify-content: space-between; }
    .ia-dagen-as span { font-size: 0.62rem; }
}

/* Verbruik eerlijk (29-11-2026): venster Overnemen zonder flowmeter,
   kalibreren op de nieuwe snelheid, jerrycancontrole */
.ia-dlg { max-width: 460px; }
.ia-let { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 10px; padding: 12px 14px; border-radius: 12px;
    background: var(--alp-status-aandacht-bg); color: var(--alp-text-primary); font-size: 0.9rem; line-height: 1.45; }
.ia-let strong { color: var(--alp-status-aandacht-tekst); }
.ia-vink { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: 0.9rem; line-height: 1.4; cursor: pointer; }
.ia-vink input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--alp-primary, #145c38); }
.ia-dlg .confirm-ok:disabled { opacity: .45; cursor: not-allowed; }
.ia-kal-veld { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; align-items: flex-end; }
.ia-kal-veld label { font-size: 0.8rem; font-weight: 600; color: var(--alp-text-primary); }
.ia-kal-veld > span { display: flex; gap: 6px; }
.ia-kal-veld input { width: 96px; padding: 6px 8px; border: 1px solid var(--alp-border, #d6dad8); border-radius: 8px; background: var(--alp-surface, #fff); color: var(--alp-text-primary); font: inherit; }
.ia-kal-veld button { padding: 6px 12px; }
.ia-kal-veld small { max-width: 280px; text-align: right; }
@media (max-width: 600px) {
    /* Kalibreren: titel boven, taak eronder (geen smalle kolom) */
    .sonde-rijen > div:has(.ia-kal) { flex-direction: column; align-items: stretch; gap: 6px; }
    .sonde-rijen .ia-kal { align-items: flex-start; text-align: left; }
    .ia-kal-veld, .ia-kal-veld small { align-items: flex-start; text-align: left; max-width: none; }
}

/* ---------- Vers water / koude start: 3 stappen met beeldjes (30-11-2026) */
.ia-stappen { list-style: none; max-width: 720px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 8px 24px 4px; padding: 0; }
.ia-stap { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.ia-stap strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ia-stap small { font-size: 0.78rem; color: var(--alp-text-secondary); line-height: 1.3; }
.ia-stap-ik { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 4px; }
.ia-stap-ik .ia-ik { width: 26px; height: 26px; fill: currentColor; }
.ia-stap-ik.is-blauw { background: var(--alp-status-actief-bg); color: var(--alp-status-actief); }
.ia-stap-ik.is-grijs { background: var(--alp-status-toekomst-bg); color: var(--alp-text-secondary); }
.ia-stap-ik.is-groen { background: var(--alp-status-klaar-bg); color: var(--alp-status-klaar); }
.ia-stap-ik.is-oranje { background: var(--alp-status-aandacht-bg); color: var(--alp-status-aandacht); }
.ia-stap-pijl { flex: 0 0 auto; padding-top: 14px; color: var(--alp-text-secondary); }
.ia-stap-pijl .ia-pijl { width: 20px; height: 20px; fill: currentColor; opacity: 0.6; }
.ia-tech { margin: 12px 24px 0; font-size: 0.8rem; color: var(--alp-text-secondary); }
@media (max-width: 600px) {
    .ia-stappen { gap: 2px; margin-inline: 16px; }
    .ia-stap-ik { width: 40px; height: 40px; }
    .ia-stap strong { font-size: 0.95rem; }
    .ia-tech { margin-inline: 16px; }
}
