/* ProcesSlim – administratie-app. Kleuren uit het logo: teal #0a7f78, blauw #2563eb, donker #0f2a28. */
:root {
  --merk: #0a7f78; --merk-donker: #075e59; --merk-licht: #e3f4f2; --blauw: #2563eb;
  --tekst: #0f2a28; --zacht: #4d6866; --lijn: #d6ebe8; --vlak: #ffffff; --grond: #f4fbfa; --grond2: #eaf5f3;
  --rood: #b42318; --rood-licht: #fdecea; --oranje: #b54708; --oranje-licht: #fef3e6; --groen: #067647; --groen-licht: #e6f6ee;
  --schaduw: 0 1px 2px rgba(15,42,40,.06), 0 2px 8px rgba(15,42,40,.05);
  --r: 14px; --nav-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --merk: #2bb3a8; --merk-donker: #5fd0c6; --merk-licht: #10322f; --blauw: #6b9cff;
    --tekst: #e8f3f1; --zacht: #a3bcb9; --lijn: #24413e; --vlak: #13221f; --grond: #0b1715; --grond2: #102421;
    --rood: #ff8a7a; --rood-licht: #3a1714; --oranje: #ffb36b; --oranje-licht: #38240f; --groen: #5fd39a; --groen-licht: #0f2e20;
    --schaduw: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--tekst); background: var(--grond); }
a { color: var(--merk-donker); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 24px; letter-spacing: -.3px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Iconen zonder eigen maat: standaard 22px (anders tekent de browser ze schermvullend). */
svg:not([width]) { width: 22px; height: 22px; flex: none; }
.item > svg { color: var(--zacht); }
.belknop svg, .terug svg { width: 24px; height: 24px; }
.laden { padding: 40px; text-align: center; color: var(--zacht); }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Opbouw ---------- */
.schil { min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
.balk { position: sticky; top: 0; z-index: 20; background: var(--vlak); border-bottom: 1px solid var(--lijn); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; min-height: 56px; }
.balk .titel { flex: 1; min-width: 0; }
.balk .titel small { display: block; color: var(--zacht); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balk .titel strong { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balk .terug { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; margin-left: -8px; }
.belknop { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--tekst); }
.belknop .teller { position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rood); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.inhoud { max-width: 880px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--vlak); border-top: 1px solid var(--lijn); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--nav-h); text-decoration: none; color: var(--zacht); font-size: 11.5px; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--merk); }
.nav svg { width: 24px; height: 24px; }
.merkje { display: none; }

@media (min-width: 960px) {
  .schil { padding-bottom: 24px; padding-left: 232px; }
  .nav { top: 0; right: auto; width: 232px; grid-template-columns: 1fr; align-content: start; border-top: 0; border-right: 1px solid var(--lijn); padding: 16px 12px; gap: 2px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 12px; border-radius: 10px; font-size: 15px; }
  .nav a[aria-current="page"] { background: var(--merk-licht); }
  .merkje { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: var(--tekst); }
  .merkje span { color: var(--merk); }
  .inhoud { padding: 24px; }
}

/* ---------- Bouwstenen ---------- */
.kaart { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r); box-shadow: var(--schaduw); padding: 16px; }
.kaart > h2, .kaart > .kop { margin-bottom: 12px; }
.kop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kop h2 { font-size: 16px; }
.rij { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rij.uit { justify-content: space-between; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.raster2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.raster3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .raster3 { grid-template-columns: 1fr 1fr; } }
.zacht { color: var(--zacht); }
.klein { font-size: 13px; }
.dik { font-weight: 700; }
.rechts { text-align: right; }
.bedrag { font-variant-numeric: tabular-nums; white-space: nowrap; }

.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: var(--merk); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knop:hover { background: var(--merk-donker); }
.knop:disabled { opacity: .55; cursor: default; }
.knop.tweede { background: var(--vlak); color: var(--tekst); border-color: var(--lijn); }
.knop.tweede:hover { background: var(--grond2); }
.knop.gevaar { background: var(--vlak); color: var(--rood); border-color: var(--lijn); }
.knop.klein { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.knop.breed { width: 100%; }
.knop svg { width: 18px; height: 18px; }
.linkknop { border: 0; background: none; color: var(--merk-donker); font-weight: 600; cursor: pointer; padding: 8px 4px; min-height: 44px; }
.plus { position: fixed; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 25; width: 60px; height: 60px; border-radius: 18px; border: 0; background: var(--merk); color: #fff; box-shadow: 0 6px 18px rgba(10,127,120,.35); display: grid; place-items: center; cursor: pointer; }
.plus svg { width: 28px; height: 28px; }
@media (min-width: 960px) { .plus { bottom: 28px; right: 28px; } }

label.veld, .veld { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tekst); }
.veld .hulp { font-weight: 400; color: var(--zacht); font-size: 13px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--lijn); border-radius: 10px; background: var(--vlak); font-size: 16px; font-weight: 400;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--merk) 45%, transparent); outline-offset: 1px; border-color: var(--merk); }
input:disabled, select:disabled, textarea:disabled { background: var(--grond2); color: var(--zacht); }
.vinkje { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 15px; cursor: pointer; }
.vinkje input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--merk); flex: none; }
.zoek { position: relative; }
.zoek input { padding-left: 40px; }
.zoek svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: var(--zacht); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--lijn); background: var(--vlak); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--tekst); }
.chip[aria-pressed="true"] { background: var(--tekst); border-color: var(--tekst); color: var(--vlak); }

.status { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--grond2); color: var(--zacht); }
.status.blauw { background: color-mix(in srgb, var(--blauw) 12%, var(--vlak)); color: var(--blauw); }
.status.groen { background: var(--groen-licht); color: var(--groen); }
.status.oranje { background: var(--oranje-licht); color: var(--oranje); }
.status.rood { background: var(--rood-licht); color: var(--rood); }
.status.teal { background: var(--merk-licht); color: var(--merk-donker); }

/* Lijsten */
.lijst { display: flex; flex-direction: column; background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r); overflow: hidden; }
.lijst > a, .lijst > .item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--lijn); min-height: 64px; }
.lijst > :first-child { border-top: 0; }
.lijst > a:hover { background: var(--grond); }
.item .hoofd { flex: 1; min-width: 0; }
.item .hoofd strong, .item .hoofd .regel1 { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .hoofd small { display: block; color: var(--zacht); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .eind { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.leeg { padding: 28px 16px; text-align: center; color: var(--zacht); }
.leeg strong { display: block; color: var(--tekst); margin-bottom: 4px; }

/* Overzicht */
.tegels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 720px) { .tegels { grid-template-columns: repeat(4, 1fr); } }
.tegel { background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r); padding: 14px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--schaduw); }
.tegel .label { font-size: 13px; color: var(--zacht); font-weight: 600; }
.tegel .getal { font-size: 22px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.tegel .sub { font-size: 13px; color: var(--zacht); }
.tegel.waarschuwing { border-color: color-mix(in srgb, var(--rood) 35%, var(--lijn)); }
.tegel.waarschuwing .getal { color: var(--rood); }
.signaal { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--oranje-licht); border: 1px solid color-mix(in srgb, var(--oranje) 25%, transparent); }
.signaal.goed { background: var(--groen-licht); border-color: color-mix(in srgb, var(--groen) 25%, transparent); }
.signaal.info { background: var(--vlak); border-color: var(--lijn); }
.signaal.info svg { color: var(--merk); }
.signaal svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--oranje); }
.signaal.goed svg { color: var(--groen); }
.signaal .tekst { flex: 1; min-width: 0; }
.signaal .tekst strong { display: block; }
.tijdlijn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tijdlijn li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; padding: 8px 0; }
.tijdlijn .punt { width: 10px; height: 10px; border-radius: 5px; background: var(--lijn); margin-top: 6px; justify-self: center; }
.tijdlijn .punt.auto { background: var(--merk); }
.tijdlijn .punt.goed { background: var(--groen); }
.tijdlijn .punt.fout { background: var(--rood); }
.tijdlijn small { color: var(--zacht); display: block; font-size: 13px; }

/* Regels-editor */
.regels { display: flex; flex-direction: column; gap: 10px; }
.regel { border: 1px solid var(--lijn); border-radius: 12px; padding: 12px; background: var(--vlak); display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; position: relative; }
.regel .oms { grid-column: 1 / -1; }
.regel.kopje { grid-template-columns: 1fr auto; background: var(--grond2); }
.regel .bedragregel { grid-column: 2 / -1; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--zacht); }
.regel .bedragregel strong { color: var(--tekst); font-size: 15px; }
.regel input, .regel select { min-height: 42px; }
.regel .regelknoppen { grid-column: 1 / -1; justify-content: flex-end; }
.regel .klein-label { font-size: 12px; color: var(--zacht); font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.regelknoppen { display: flex; gap: 4px; }
.icoonknop { width: 40px; height: 40px; border: 1px solid var(--lijn); background: var(--vlak); border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--zacht); }
.icoonknop svg { width: 18px; height: 18px; }
@media (min-width: 720px) {
  .regel { grid-template-columns: minmax(0,1fr) 90px 80px 120px 110px auto; align-items: end; }
  .regel .oms { grid-column: auto; }
  .regel .regelknoppen { grid-column: auto; }
  .regel .bedragregel { grid-column: auto; flex-direction: column; align-items: flex-end; justify-content: flex-end; min-height: 42px; }
  .regel.kopje { grid-template-columns: 1fr auto; }
}
.totalenbalk { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 15; background: var(--vlak); border: 1px solid var(--lijn); border-radius: var(--r); padding: 12px 16px; box-shadow: 0 -2px 12px rgba(15,42,40,.08); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (min-width: 960px) { .totalenbalk { bottom: 12px; } }
.totalenbalk .getal { font-size: 20px; font-weight: 800; }
.totalen { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.totalen div { display: flex; justify-content: space-between; gap: 16px; }
.totalen .eind { font-weight: 800; font-size: 16px; border-top: 2px solid var(--tekst); padding-top: 6px; margin-top: 4px; }

/* Vensters (sheet) */
.achter { position: fixed; inset: 0; z-index: 50; background: rgba(8,24,22,.45); display: flex; align-items: flex-end; justify-content: center; }
.venster { background: var(--vlak); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 720px) { .achter { align-items: center; } .venster { border-radius: 20px; padding: 24px; } }
.venster .kop h2 { font-size: 19px; }
.sluit { width: 44px; height: 44px; border: 0; background: var(--grond2); border-radius: 12px; cursor: pointer; display: grid; place-items: center; }
.sluit svg { width: 20px; height: 20px; }
.kiezer { max-height: 50vh; overflow: auto; }

#melding-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 480px; }
.toast { background: var(--tekst); color: var(--vlak); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: 0 6px 20px rgba(0,0,0,.2); pointer-events: auto; }
.toast.fout { background: var(--rood); color: #fff; }

/* Inlogscherm */
.inlog { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, var(--merk-licht), var(--grond) 60%); }
.inlog .kaart { width: 100%; max-width: 400px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; letter-spacing: -.8px; }
.logo span { color: var(--merk); }
.foutmelding { background: var(--rood-licht); color: var(--rood); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }

/* Tabs in instellingen */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--lijn); }
.tabs button { flex: none; border: 0; background: none; padding: 10px 12px; min-height: 44px; font-weight: 650; color: var(--zacht); border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--merk-donker); border-bottom-color: var(--merk); }
.kleurkeus { display: flex; gap: 8px; align-items: center; }
.kleurkeus input[type=color] { width: 56px; height: 46px; padding: 2px; border: 1px solid var(--lijn); border-radius: 10px; background: var(--vlak); }
.logovoorbeeld { max-width: 200px; max-height: 70px; border: 1px dashed var(--lijn); border-radius: 8px; padding: 6px; background: #fff; }
.soon { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--lijn); }
.soon:first-of-type { border-top: 0; }
details.uitklap summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; background: var(--grond2); padding: 10px 12px; border-radius: 10px; user-select: all; word-break: break-all; }
