/* Ontwerp 1 "Rustig overzicht" (Lovable, 28-09-2026), omgezet naar gewone CSS
   zonder externe bronnen. Kleuren gelijk aan het dashboard in de fabriek. */
:root {
  color-scheme: light;
  --straal: 0.5rem;
  --straal-kaart: 0.75rem;
  --achtergrond: oklch(0.974 0.006 250);
  --inkt: oklch(0.25 0.024 257);
  --kaart: oklch(1 0 0);
  --primair: oklch(0.5 0.115 256.2);
  --primair-inkt: oklch(0.99 0.002 250);
  --vlak-2: oklch(0.946 0.01 250);
  --gedempt: oklch(0.945 0.008 250);
  --inkt-2: oklch(0.47 0.025 257);
  --inkt-3: oklch(0.54 0.021 257);
  --rand: oklch(0.9 0.012 250);
  --invoer: oklch(0.84 0.016 250);
  --focus: oklch(0.5 0.115 256.2);
  --s-productie: oklch(0.63 0.17 149);
  --s-standby: oklch(0.68 0.17 50);
  --s-storing: oklch(0.58 0.22 27);
  --s-offline: oklch(0.71 0.035 257);
  --s-oud: oklch(0.54 0.02 257);
  --zacht-productie: oklch(0.95 0.055 149);
  --zacht-standby: oklch(0.95 0.055 70);
  --zacht-storing: oklch(0.95 0.045 27);
  --zacht-offline: oklch(0.94 0.012 257);
  --kaart-storing: oklch(0.985 0.012 25);
  --demo-vlak: oklch(0.93 0.035 250);
  --demo-rand: oklch(0.83 0.055 253);
  --let-op-vlak: oklch(0.96 0.04 80);
  --let-op-rand: oklch(0.78 0.11 80);
  --schaduw: 0 1px 2px oklch(0.25 0.03 257 / 0.04), 0 8px 30px oklch(0.25 0.03 257 / 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --achtergrond: oklch(0.185 0.018 255);
    --inkt: oklch(0.94 0.008 250);
    --kaart: oklch(0.235 0.02 255);
    --primair: oklch(0.7 0.105 254);
    --primair-inkt: oklch(0.16 0.025 257);
    --vlak-2: oklch(0.29 0.025 255);
    --gedempt: oklch(0.29 0.02 255);
    --inkt-2: oklch(0.72 0.02 250);
    --inkt-3: oklch(0.67 0.018 250);
    --rand: oklch(0.34 0.02 255);
    --invoer: oklch(0.42 0.02 255);
    --focus: oklch(0.7 0.105 254);
    --zacht-productie: oklch(0.3 0.06 149);
    --zacht-standby: oklch(0.32 0.055 50);
    --zacht-storing: oklch(0.31 0.065 27);
    --zacht-offline: oklch(0.32 0.022 257);
    --kaart-storing: oklch(0.255 0.035 25);
    --s-productie: oklch(0.75 0.17 149);
    --s-standby: oklch(0.79 0.16 70);
    --s-storing: oklch(0.72 0.19 28);
    --s-offline: oklch(0.72 0.035 257);
    --s-oud: oklch(0.68 0.02 257);
    --demo-vlak: oklch(0.27 0.04 255);
    --demo-rand: oklch(0.42 0.06 255);
    --let-op-vlak: oklch(0.28 0.05 80);
    --let-op-rand: oklch(0.55 0.09 80);
    --schaduw: 0 1px 2px oklch(0.08 0.02 257 / 0.3), 0 12px 34px oklch(0.08 0.02 257 / 0.24);
  }
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--rand); }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; background: var(--achtergrond); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--achtergrond);
  color: var(--inkt);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}
p, h1, h2 { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.getallen { font-variant-numeric: tabular-nums; }

.schil {
  width: min(100%, 112rem);
  margin-inline: auto;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}
.inhoud { padding-top: 1.75rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); }

/* Demobalk */
.demo-balk {
  padding-top: env(safe-area-inset-top);
  background: var(--demo-vlak);
  border-bottom: 1px solid var(--demo-rand);
}
.demo-inhoud { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.75rem; padding-bottom: 0.75rem; font-size: 0.875rem; font-weight: 500; line-height: 1.35; }
.demo-merk {
  display: inline-flex; flex: none; align-items: center; min-height: 1.5rem;
  border-radius: 0.25rem; background: var(--primair); color: var(--primair-inkt);
  padding-inline: 0.45rem; font-size: 0.625rem; font-weight: 800; letter-spacing: 0.08em;
}

/* Kop */
.kop { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem 1rem; }
.kop-titel { grid-column: 1 / -1; min-width: 0; }
.kop h1 { font-size: 1.875rem; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kop-datum { margin-top: 0.4rem; font-size: 0.875rem; font-weight: 500; color: var(--inkt-2); font-variant-numeric: tabular-nums; }
.vers { display: flex; min-width: 0; align-items: center; gap: 0.6rem; font-size: 0.75rem; font-weight: 600; color: var(--inkt-2); }
.vers .stip { width: 0.55rem; height: 0.55rem; flex: none; border-radius: 999px; background: var(--s-oud); box-shadow: 0 0 0 0.25rem var(--zacht-offline); }
.vers.live .stip { background: var(--s-productie); box-shadow: 0 0 0 0.25rem var(--zacht-productie); }
.vers.oud .stip { background: var(--s-storing); box-shadow: 0 0 0 0.25rem var(--zacht-storing); }

/* Meldingen (sessie verlopen, verouderd, bronfout) */
.meldingen { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.meldingen:empty { display: none; }
.melding { border: 1px solid var(--let-op-rand); background: var(--let-op-vlak); border-radius: var(--straal); padding: 0.75rem 1rem; font-size: 0.9375rem; }
.melding strong { display: block; }
.melding button {
  margin-top: 0.5rem; min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600;
  border: 1px solid var(--rand); border-radius: var(--straal); background: var(--kaart); color: var(--inkt); cursor: pointer;
}

/* Tellers = filters */
.stand { margin-top: 1.5rem; transition: filter 180ms ease, opacity 180ms ease; }
.oud-beeld .stand { filter: grayscale(1); opacity: 0.78; }
.tellers {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden;
  border: 1px solid var(--rand); border-radius: var(--straal-kaart); background: var(--kaart); box-shadow: var(--schaduw);
}
.teller {
  display: flex; min-width: 0; width: 100%; min-height: 4.75rem; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1rem; border: 0; border-right: 1px solid var(--rand); border-bottom: 1px solid var(--rand);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.teller:hover { background: var(--vlak-2); }
.teller[aria-pressed="true"] { background: var(--vlak-2); box-shadow: inset 0 0 0 2px var(--kleur); }
.teller:nth-child(2n) { border-right: 0; }
.teller:nth-child(n+3) { border-bottom: 0; }
.teller .symbool { width: 1.25rem; height: 1.25rem; }
.teller-icoon { display: grid; width: 2.25rem; height: 2.25rem; flex: none; place-items: center; border-radius: 999px; background: var(--zacht); }
.teller-tekst { min-width: 0; }
.teller-aantal { display: block; font-size: 1.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--inkt); }
.teller-label { display: block; margin-top: 0.2rem; font-size: 0.75rem; font-weight: 500; color: var(--inkt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.productie { --kleur: var(--s-productie); --zacht: var(--zacht-productie); }
.standby { --kleur: var(--s-standby); --zacht: var(--zacht-standby); }
.storing { --kleur: var(--s-storing); --zacht: var(--zacht-storing); }
.offline { --kleur: var(--s-offline); --zacht: var(--zacht-offline); }

/* Symbolen: vorm per toestand, nooit alleen kleur */
.symbool { flex: none; display: block; }
.symbool .vul { fill: var(--kleur); }
.symbool .lijn { fill: none; stroke: var(--kleur); stroke-width: 2.4; stroke-linecap: round; }
.symbool .uitsparing { fill: var(--kaart); }

/* Machinekaarten */
.raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.25rem; }
.kaart {
  min-width: 0; border: 1px solid var(--rand); border-left: 4px solid var(--kleur);
  border-radius: var(--straal-kaart); background: var(--kaart); padding: 1rem 1.1rem; box-shadow: var(--schaduw);
}
.kaart.storing { background: var(--kaart-storing); }
.kaart.offline { opacity: 0.8; }
.kaart-kop { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.75rem; }
.kaart-kop h2 { min-width: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.chip {
  display: inline-flex; min-height: 1.75rem; flex: none; align-items: center; gap: 0.35rem;
  border-radius: 999px; padding-inline: 0.55rem; font-size: 0.6875rem; font-weight: 700; white-space: nowrap;
  background: color-mix(in oklab, var(--zacht) 82%, var(--kleur));
  color: color-mix(in oklab, var(--kleur) 70%, var(--inkt));
}
.chip.offline { color: color-mix(in oklab, var(--kleur) 48%, var(--inkt)); }
.chip .symbool { width: 0.875rem; height: 0.875rem; }
.chip.niet-live { --kleur: var(--s-oud); --zacht: var(--zacht-offline); background: var(--zacht-offline); color: var(--inkt-2); }

.feiten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 1rem; }
.cyclus { min-width: 0; padding-right: 1rem; }
.rest { min-width: 0; border-left: 1px solid var(--rand); padding-left: 1rem; }
.label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--inkt-2); }
.waarde { margin-top: 0.25rem; font-size: 2rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--inkt); }
.eenheid { font-size: 0.55em; font-weight: 500; color: var(--inkt-2); margin-left: 0.1em; }
.reden { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 1.05rem; font-weight: 600; line-height: 1.2; color: var(--inkt); }
.reden.alarm { font-weight: 750; }
.reden .symbool { width: 1.35rem; height: 1.35rem; margin-top: 0.05rem; }
.rest-waarde { margin-top: 0.35rem; font-size: 1rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--inkt); }
.rest-voorwaarde { display: block; margin-top: 0.15rem; font-size: 0.8125rem; font-weight: 500; color: var(--inkt-2); }

.leeg {
  grid-column: 1 / -1; color: var(--inkt-2); background: var(--kaart); border: 1px dashed var(--rand);
  border-radius: var(--straal-kaart); padding: 1.5rem 1rem; text-align: center;
}

/* Voet */
.voet { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rand); font-size: 0.75rem; line-height: 1.5; color: var(--inkt-3); }

/* iPad staand en groter */
@media (min-width: 40rem) {
  .inhoud { padding-top: 2.25rem; }
  .kop-titel { grid-column: auto; }
  .kop h1 { font-size: 2.25rem; }
  .kop-datum { font-size: 1rem; }
  .vers { justify-content: flex-end; text-align: right; padding-bottom: 0.15rem; }
  .voet { flex-direction: row; justify-content: space-between; gap: 1.5rem; }
}
@media (min-width: 48rem) {
  .tellers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teller { border-bottom: 0; }
  .teller:nth-child(2n) { border-right: 1px solid var(--rand); }
  .teller:last-child { border-right: 0; }
  .teller-aantal { font-size: 1.875rem; }
  .raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kaart { padding: 1.15rem 1.25rem; }
  .feiten { display: block; margin-top: 1.25rem; }
  .cyclus { min-height: 5rem; padding-right: 0; }
  .rest { margin-top: 1rem; border-left: 0; border-top: 1px solid var(--rand); padding-top: 1rem; padding-left: 0; }
  .reden { font-size: 1.3rem; line-height: 1.15; }
  .rest-waarde { font-size: 1.0625rem; }
}
/* iPad liggend */
@media (min-width: 64rem) {
  .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Laptop: twee rijen van vier, samen met de tellers op 1440×900 zonder scrollen */
@media (min-width: 80rem) {
  .inhoud { padding-top: 1.5rem; padding-bottom: 1.25rem; }
  .stand { margin-top: 1.25rem; }
  .raster { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1rem; }
  .voet { margin-top: 1.25rem; padding-top: 1rem; }
}
@media (min-width: 110rem) {
  .inhoud { padding-top: 2.75rem; }
  .cyclus { min-height: 6rem; }
  .waarde { font-size: 2.25rem; }
  .feiten { margin-top: 1.75rem; }
}

@media (forced-colors: active) {
  .kaart { border-left-width: 6px; }
  .symbool .vul { fill: CanvasText; }
  .symbool .lijn { stroke: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Inlogscherm */
.inlog-body { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
.inlog {
  width: min(100%, 24rem); background: var(--kaart); border: 1px solid var(--rand);
  border-radius: var(--straal-kaart); box-shadow: var(--schaduw); padding: 1.75rem 1.5rem;
}
.inlog h1 { font-size: 1.5rem; font-weight: 600; }
.inlog-sub { margin-top: 0.35rem; color: var(--inkt-2); font-size: 0.9375rem; }
.inlog-melding { margin-top: 1rem; border: 1px solid var(--s-storing); background: var(--zacht-storing); border-radius: var(--straal); padding: 0.6rem 0.75rem; font-size: 0.875rem; font-weight: 600; }
.inlog-melding.neutraal { border-color: var(--rand); background: var(--vlak-2); }
.inlog-formulier { display: grid; gap: 0.4rem; margin-top: 1.25rem; }
.inlog-formulier label { margin-top: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--inkt-2); }
.inlog-formulier input {
  min-height: 2.75rem; width: 100%; padding: 0 0.75rem; font: inherit; font-size: 1rem; color: var(--inkt);
  background: var(--achtergrond); border: 1px solid var(--invoer); border-radius: var(--straal);
}
.inlog-formulier button, .uitlog {
  min-height: 2.75rem; padding: 0 1rem; font: inherit; font-weight: 600; cursor: pointer;
  border-radius: var(--straal); border: 1px solid var(--primair); background: var(--primair); color: var(--primair-inkt);
}
.inlog-formulier button { margin-top: 1rem; }

/* Uitloggen in de kop van het dashboard */
.kop-rechts { grid-column: 1 / -1; display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.kop-rechts .vers { flex: 1 1 auto; }
@media (min-width: 40rem) {
  .kop-rechts { grid-column: auto; justify-content: flex-end; }
  .kop-rechts .vers { flex: 0 1 auto; }
}
.gebruiker { font-size: 0.75rem; color: var(--inkt-2); }
.uitlog-formulier { margin: 0; }
.uitlog { min-height: 2.25rem; background: transparent; color: var(--inkt); border-color: var(--rand); font-size: 0.8125rem; }
.uitlog:hover { background: var(--vlak-2); }
