/* WerfHero – beheer (app.werfhero.be)
   Kleuren: geel #FFC20E, inktzwart #141414, neutrale grijzen, wit.
   Rood alleen voor waarschuwingen. NOOIT blauw of navy. */

:root {
  --geel: #FFC20E;
  --geel-zacht: #FFF4D1;
  --inkt: #141414;
  --inkt-2: #1C1C1C;
  --inkt-3: #2A2A2A;
  --grijs-1: #333333;
  --grijs-2: #555555;
  --zacht: #6B6B6B;
  --grijs-4: #A3A3A3;
  --lijn: #E4E2DC;
  --lijn-zacht: #F0EEE9;
  --vlak: #F2F1EE;
  --bg: #FAFAF8;
  --wit: #FFFFFF;
  --rood: #D7263D;
  --rood-zacht: #FBE4E7;
  --groen: #12805C;
  --groen-zacht: #E2F3EC;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
  --strepen: repeating-linear-gradient(-45deg, var(--geel) 0 14px, var(--inkt) 14px 28px);
  --zij: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-weight: 500; font-size: 15px; line-height: 1.5;
  color: var(--inkt); background: var(--bg); -webkit-font-smoothing: antialiased;
  accent-color: var(--geel); overflow-x: hidden;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 900; letter-spacing: -0.01em; }
p { margin: 0 0 .8em; }
a { color: inherit; text-decoration-color: var(--geel); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--inkt); outline-offset: 2px; border-radius: 6px; }
.zij :focus-visible, .aanmeld__merk :focus-visible { outline-color: var(--geel); }
::selection { background: var(--geel); color: var(--inkt); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--geel); color: var(--inkt); padding: 10px 16px; font-weight: 800; border-radius: 8px; }
.skip:focus { top: 12px; }
.zacht { color: var(--zacht); }

/* ---------- Knoppen en velden ---------- */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; font: inherit; font-weight: 800; font-size: 15px;
  border: 2px solid transparent; border-radius: 12px; cursor: pointer; white-space: nowrap;
  text-decoration: none; background: none; color: inherit;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.knop:disabled { opacity: .5; cursor: not-allowed; }
.knop svg { width: 18px; height: 18px; }
.knop--geel { background: var(--geel); color: var(--inkt); }
.knop--geel:hover:not(:disabled) { background: #FFD24D; }
.knop--inkt { background: var(--inkt); color: var(--geel); }
.knop--inkt:hover:not(:disabled) { background: var(--grijs-1); }
.knop--rand { border-color: var(--lijn); background: var(--wit); }
.knop--rand:hover:not(:disabled) { border-color: var(--inkt); }
.knop--rood { background: var(--rood); color: var(--wit); }
.knop--rood:hover:not(:disabled) { background: #B81E33; }
.knop--klein { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.knop--breed { width: 100%; }
.link { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: var(--inkt); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--geel); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.link--rood { color: var(--rood); text-decoration-color: currentColor; }
.ikoon-knop { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.ikoon-knop:hover { background: rgba(127,127,127,.15); }

.veld { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.veld input, .veld select, .invoer {
  font: inherit; font-weight: 600; font-size: 16px; color: var(--inkt);
  min-height: 48px; padding: 0 14px; border: 2px solid var(--lijn); border-radius: 12px; background: var(--wit); width: 100%;
}
.veld input:focus, .veld select:focus, .invoer:focus { outline: none; border-color: var(--inkt); box-shadow: 0 0 0 3px var(--geel); }
.veld small { font-weight: 500; color: var(--zacht); }
.code-invoer { letter-spacing: .5em; font-size: 24px !important; font-weight: 800 !important; text-align: center; }
.fout { background: var(--rood-zacht); color: #8E1526; border-left: 4px solid var(--rood); padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.ok { background: var(--groen-zacht); color: #0B5A40; border-left: 4px solid var(--groen); padding: 10px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; }

.strepen { height: 12px; background: var(--strepen); }
.strepen--dun { height: 8px; background: repeating-linear-gradient(-45deg, var(--geel) 0 8px, var(--inkt) 8px 16px); }

.merk { display: inline-flex; align-items: center; gap: 10px; color: var(--wit); }
.merk img { width: 32px; height: auto; }
.merk span { font-weight: 900; font-stretch: 118%; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; }
.merk--donker { color: var(--inkt); }

/* Taalkeuze */
.taal { display: inline-flex; border: 2px solid var(--lijn); border-radius: 10px; overflow: hidden; background: var(--wit); }
.taal button { font: inherit; font-weight: 800; font-size: 13px; letter-spacing: .04em; border: 0; background: none; color: var(--zacht); padding: 6px 10px; cursor: pointer; min-height: 34px; }
.taal button[aria-pressed="true"] { background: var(--inkt); color: var(--geel); }
.taal button:hover:not([aria-pressed="true"]) { color: var(--inkt); }

/* ---------- Laden ---------- */
.scherm--laden { min-height: 100vh; display: grid; place-items: center; background: var(--inkt); }
.scherm--laden img { animation: puls 1.2s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .scherm--laden img { animation: none; } }

/* ---------- Inloggen ---------- */
.aanmeld { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; }
.aanmeld__merk { background: var(--inkt); color: var(--wit); padding: 40px 44px 0; display: flex; flex-direction: column; }
.aanmeld__slogan { margin-top: auto; font-weight: 900; font-stretch: 112%; font-size: clamp(34px, 4.4vw, 58px); line-height: 1; color: var(--geel); }
.aanmeld__uitleg { color: #CFCFCF; font-size: 17px; max-width: 30ch; margin-bottom: 40px; }
.aanmeld__merk .strepen { margin: 0 -44px; height: 16px; }
.aanmeld__vak { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; position: relative; }
.aanmeld__taal { position: absolute; top: 20px; right: 20px; }
.aanmeld__kaart { width: 100%; max-width: 420px; background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 28px; }
.aanmeld__kaart h1 { font-size: 28px; margin-bottom: 10px; }
.aanmeld__kaart .fout { margin-bottom: 14px; }
.aanmeld__extra { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: 14px; }
.aanmeld__voet { margin-top: 18px; font-size: 14px; text-align: center; }

/* ---------- Melding (geen beheerder) ---------- */
.melding { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px 0; }
.melding__kaart { max-width: 520px; width: 100%; background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 28px; margin-bottom: auto; margin-top: auto; }
.melding__kaart h1 { font-size: 26px; margin: 22px 0 10px; }
.melding__icoon { width: 56px; height: 56px; border-radius: 16px; background: var(--geel); display: grid; place-items: center; margin-top: 22px; }
.melding__icoon svg { width: 28px; height: 28px; }
.melding__acties { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.melding__strepen { align-self: stretch; margin: 24px -16px 0; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.zij { width: var(--zij); flex: none; background: var(--inkt); color: var(--wit); display: flex; flex-direction: column;
  padding: 22px 16px 0; position: sticky; top: 0; height: 100vh; z-index: 40; }
.zij__kop { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 26px; }
.zij__sluit { display: none; color: var(--wit); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #CFCFCF; text-decoration: none; font-weight: 600; font-size: 15px; margin-bottom: 3px; }
.menu a:hover { background: var(--inkt-3); color: var(--wit); }
.menu a[aria-current="page"] { background: var(--geel); color: var(--inkt); font-weight: 800; }
.teller { margin-left: auto; background: var(--wit); color: var(--inkt); font-size: 12px; font-weight: 800; border-radius: 10px; padding: 1px 8px; }
.menu a[aria-current="page"] .teller { background: var(--inkt); color: var(--geel); }
.zij__bedrijf { margin-top: auto; border-top: 1px solid var(--inkt-3); padding: 16px 8px 16px; font-size: 13px; color: #9A9A9A; display: grid; gap: 2px; }
.zij__bedrijf b { color: var(--wit); font-size: 15px; overflow-wrap: anywhere; }
.zij__bedrijf select { font: inherit; font-weight: 700; color: var(--wit); background: var(--inkt-3); border: 1px solid #444; border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; }
.zij__strepen { margin: 0 -16px; }
.zij__gebruiker { display: none; margin-top: 6px; color: #CFCFCF; overflow-wrap: anywhere; }
.zij__scherm { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }

.hoofd { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.balk { display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--lijn); background: var(--wit); position: sticky; top: 0; z-index: 30; }
.balk__menu { display: none; }
.balk__bedrijf { display: grid; min-width: 0; }
.balk__label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--zacht); }
.balk__bedrijf b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balk__rechts { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.gebruiker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gebruiker__tekst { display: grid; line-height: 1.25; min-width: 0; }
.gebruiker__tekst b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.gebruiker__tekst small { font-size: 12px; color: var(--zacht); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--geel); display: grid; place-items: center; font-weight: 900; font-size: 14px; flex: none; }

main#inhoud { padding: 26px 32px 48px; display: grid; gap: 20px; align-content: start; outline: none; }
.pagina { display: grid; gap: 20px; }
.pagina__kop { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pagina__kop h1 { font-size: 30px; }
.pagina__kop p { color: var(--zacht); margin: 4px 0 0; }

/* Waarschuwingsbalk */
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 16px; font-weight: 600; }
.banner svg { margin-top: 2px; }
.banner b { display: block; font-weight: 800; }
.banner--rood { background: var(--rood-zacht); color: #8E1526; border: 1px solid #F3C2CA; }
.banner--geel { background: var(--geel-zacht); color: #4A3800; border: 1px solid #F5DE95; }
.banner p { margin: 2px 0 0; }

/* KPI's */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.kpi__l { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--zacht); }
.kpi__v { font-size: 34px; font-weight: 900; margin-top: 6px; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; }
.kpi__v--tekst { font-size: 28px; }
.kpi__d { font-size: 13px; color: var(--zacht); margin-top: 4px; }
.kpi--geel { background: var(--geel); border-color: var(--geel); }
.kpi--geel .kpi__l, .kpi--geel .kpi__d { color: #3A3000; }
.kpi--alarm .kpi__v { color: var(--rood); }
.meter { height: 8px; border-radius: 4px; background: var(--vlak); margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--inkt); border-radius: 4px; }
.meter--vol i { background: var(--rood); }

/* Kaarten */
.rij { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.rij--gelijk { grid-template-columns: 1fr 1fr; align-items: stretch; }
.kaart { background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 20px; min-width: 0; }
.kaart h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.kaart h2 .meer { margin-left: auto; font-size: 13px; color: var(--zacht); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.kaart h2 .meer:hover { color: var(--inkt); }
.kaart h2 .meer svg { width: 14px; height: 14px; }
.kaart > p:last-child { margin-bottom: 0; }
.kaart + .kaart { margin-top: 0; }
.kaart__sub { font-size: 14px; color: var(--zacht); margin-top: -8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--inkt); color: var(--geel); }
.chip svg { width: 14px; height: 14px; }
.chip--uit { background: var(--vlak); color: var(--zacht); font-weight: 700; text-decoration: line-through; text-decoration-color: var(--grijs-4); }
.chip--basis { background: var(--geel); color: var(--inkt); }

.pill { display: inline-block; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 800; background: var(--vlak); white-space: nowrap; }
.pill--inkt { background: var(--inkt); color: var(--geel); }
.pill--geel { background: var(--geel); color: var(--inkt); }
.pill--groen { background: var(--groen-zacht); color: var(--groen); }
.pill--rood { background: var(--rood-zacht); color: var(--rood); }

.lijst { list-style: none; margin: 0; padding: 0; }
.lijst li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--lijn-zacht); align-items: flex-start; font-size: 14px; }
.lijst li:last-child { border-bottom: 0; }
.lijst small { display: block; color: var(--zacht); font-size: 12px; margin-top: 2px; }
.dot { width: 10px; height: 10px; border-radius: 5px; margin-top: 5px; flex: none; background: var(--grijs-4); }
.dot--rood { background: var(--rood); }
.dot--geel { background: var(--geel); }
.dot--inkt { background: var(--inkt); }

.gegevens { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.gegevens dt { color: var(--zacht); font-weight: 700; }
.gegevens dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

/* Tabel */
.tabel-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--zacht); font-weight: 800; padding: 6px 8px; border-bottom: 1px solid var(--lijn); white-space: nowrap; }
td { padding: 12px 8px; border-bottom: 1px solid var(--lijn-zacht); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.acties { text-align: right; white-space: nowrap; }
td.acties .link + .link { margin-left: 14px; }
.persoon { display: flex; align-items: center; gap: 10px; min-width: 0; }
.persoon .avatar { width: 34px; height: 34px; font-size: 12px; background: var(--inkt); color: var(--geel); }
.persoon b { display: block; font-weight: 800; overflow-wrap: anywhere; }
.persoon small { display: block; color: var(--zacht); font-size: 12px; overflow-wrap: anywhere; }
.leeg { color: var(--zacht); font-size: 14px; padding: 8px 0; margin: 0; }

/* Uitnodigen */
.uitnodig { display: grid; grid-template-columns: 2fr 1.5fr minmax(190px, 1.2fr) auto; gap: 12px; align-items: end; }
.uitnodig .veld { margin: 0; }
.uitnodig .knop { min-height: 48px; }
.uitnodig__melding { margin-top: 12px; }
.uitnodig__melding:empty { display: none; }

.form-rij { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.form-rij .veld { flex: 1 1 260px; margin: 0; }
.form-rij .knop { min-height: 48px; }

.schakel { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.schakel input { width: 22px; height: 22px; }

.info { font-size: 14px; color: var(--zacht); background: var(--vlak); border-radius: 12px; padding: 12px 14px; margin: 0; }

/* Dialoog */
.dialoog { border: 0; border-radius: var(--radius); padding: 24px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--inkt); }
.dialoog::backdrop { background: rgba(0,0,0,.55); }
.dialoog h2 { font-size: 21px; margin-bottom: 10px; }
.dialoog__knoppen { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); visibility: hidden; background: var(--inkt); color: var(--wit); padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 60; transition: transform .2s ease; max-width: calc(100% - 32px); border-left: 6px solid var(--geel); }
.toast.toon { transform: translate(-50%, 0); visibility: visible; }
.toast--fout { border-left-color: var(--rood); }

/* ---------- Responsief ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rij, .rij--gelijk { grid-template-columns: 1fr; }
  .uitnodig { grid-template-columns: 1fr 1fr; }
  .gebruiker__tekst { display: none; }
}
@media (max-width: 900px) {
  .zij { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s ease; visibility: hidden; }
  .zij.open { transform: none; visibility: visible; }
  .zij { width: min(300px, 86vw); }
  .zij__kop { padding-right: 0; }
  .zij__sluit, .balk__menu { display: inline-grid; }
  .zij__gebruiker { display: block; }
  .balk { padding: 10px 16px; gap: 8px; }
  main#inhoud { padding: 20px 16px 40px; }
  .aanmeld { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .aanmeld__merk { padding: 24px 20px 0; }
  .aanmeld__slogan { margin-top: 24px; font-size: 34px; }
  .aanmeld__uitleg { margin-bottom: 24px; }
  .aanmeld__merk .strepen { margin: 0 -20px; }
  .aanmeld__vak { justify-content: flex-start; padding-top: 68px; }
}
@media (max-width: 640px) {
  .balk__rechts .knop span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .balk__rechts .knop { padding: 0 10px; }
  .balk__rechts { gap: 8px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .balk__label { display: none; }
  .balk__bedrijf b { font-size: 15px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi__v { font-size: 26px; }
  .kpi__v--tekst { font-size: 21px; }
  .kpi__l { font-size: 11px; }
  .pagina__kop h1 { font-size: 25px; }
  .uitnodig { grid-template-columns: 1fr; }
  .kaart { padding: 16px; }
  .aanmeld__kaart { padding: 20px; }
  /* Tabel als kaartjes */
  .tabel-wrap { overflow: visible; margin: 0; }
  table.stapel, table.stapel tbody, table.stapel tr, table.stapel td { display: block; width: 100%; }
  table.stapel thead { display: none; }
  table.stapel tr { border-bottom: 1px solid var(--lijn); padding: 10px 0; }
  table.stapel tr:last-child { border-bottom: 0; }
  table.stapel td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.stapel td::before { content: attr(data-label); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--zacht); text-align: left; }
  table.stapel td.eerste { display: block; text-align: left; }
  table.stapel td.eerste::before { content: none; }
  table.stapel td.acties { justify-content: flex-end; padding-top: 8px; }
  table.stapel td.acties::before { content: none; }
  .gegevens { grid-template-columns: 1fr; gap: 2px; }
  .gegevens dd { margin-bottom: 8px; }
}
@media (max-width: 380px) {
  .balk__rechts [data-taalkeuze] .taal button { padding: 6px 7px; }
}

/* Kop krijgt focus na het wisselen van pagina; geen kader nodig. */
h1[tabindex="-1"]:focus { outline: none; }
