/* ============================================================
   Piekfijn Verlof — Apple-achtig, clean 2026
   Systeemfont (SF Pro op Apple), hairlines, pill-knoppen
   ============================================================ */
:root {
  --zwart: #1D1D1F;
  --tekst: #1D1D1F;
  --tekst-zacht: #6E6E73;
  --tekst-licht: #A1A1A6;
  --accent: #5E7C6B;
  --accent-tint: #EAF1ED;
  --accent-rand: #CFE0D6;
  --accent-tekst: #3E5A4A;
  --accent-diep: #4A6555;
  --blauw: #5B7C99;
  --blauw-tint: #EAF1F6;
  --blauw-rand: #CDDDE9;
  --blauw-tekst: #3A566B;
  --zand: #BFA06A;
  --zand-tint: #F5EEDF;
  --zand-tekst: #6E5523;
  --groen: #3CAB76;
  --groen-tint: #EAF6EF;
  --groen-tekst: #1F6B47;
  --wit: #FFFFFF;
  --bg: linear-gradient(180deg, #F6F7F7 0%, #EEEFF1 100%);
  --lijn: #E8E8ED;
  --lijn-donker: #D2D2D7;
  --grijs-1: #F0F0F2;
  --rood-zacht: #C9534A;
  --rood-tint: #FAF0EF;
  --schaduw-zacht: 0 1px 2px rgba(31,42,38,.05), 0 5px 16px rgba(31,42,38,.05);
  --schaduw-mid: 0 1px 2px rgba(31,42,38,.06), 0 12px 30px rgba(31,42,38,.09);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  background-attachment: fixed;
  color: var(--tekst);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--tekst); }

h1, h2, h3 { font-weight: 700; letter-spacing: -.022em; }

.icoon { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Inlogscherm ---------- */
.login-scherm {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px;
}
.login-kaart {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 22px;
  padding: 48px 44px; width: 100%; max-width: 420px;
  box-shadow: var(--schaduw-mid);
}
.login-logo { font-weight: 700; font-size: 22px; letter-spacing: -.022em; margin-bottom: 4px; }
.login-logo .punt { color: var(--accent); }
.login-sub { color: var(--tekst-zacht); margin-bottom: 32px; font-size: 14.5px; }
.veld { margin-bottom: 16px; }
.veld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.veld input, .veld select, .veld textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--lijn-donker);
  border-radius: 12px; background: var(--wit); transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.veld select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px;
}
.veld input:focus, .veld select:focus, .veld textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint);
}
.veld input[type="checkbox"] {
  appearance: auto; -webkit-appearance: auto; accent-color: var(--accent);
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 0; box-shadow: none;
}
.veld input[type="checkbox"]:focus { box-shadow: none; }
.knop-primair {
  width: 100%; padding: 13px; background: linear-gradient(180deg, #EFF4F1 0%, var(--accent-tint) 100%);
  color: var(--accent-tekst);
  border: 1px solid var(--accent-rand); border-radius: 980px; font-weight: 600; font-size: 15px;
  box-shadow: 0 1px 2px rgba(31,42,38,.06); transition: filter .15s, box-shadow .15s;
}
.knop-primair:hover { filter: brightness(.96); }
.naam-knop {
  width: 100%; text-align: left; padding: 13px 16px;
  border: 1px solid var(--lijn); border-radius: 12px;
  background: var(--wit); color: var(--tekst);
  font-size: 15px; font-weight: 500; font-family: inherit;
  transition: border-color .12s, background .12s, color .12s;
}
.naam-knop:hover { border-color: var(--accent-rand); background: var(--accent-tint); color: var(--accent-tekst); }
.login-wissel { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--tekst-zacht); }
.login-wissel a { color: var(--tekst); font-weight: 600; cursor: pointer; text-decoration: underline; }
.fout-melding {
  background: var(--rood-tint); color: var(--rood-zacht); border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; margin-bottom: 16px; display: none;
}
.ok-melding {
  background: var(--groen-tint); color: var(--groen-tekst); border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; margin-bottom: 16px; display: none;
}

/* ---------- Merk-titel ---------- */
.merk-tekst { font-weight: 700; letter-spacing: -.022em; color: var(--tekst); font-size: 16px; }
.merk-tekst .merk-sep { color: var(--accent); font-weight: 600; margin: 0 5px; }
.merk-tekst--groot { font-size: 23px; }

/* ---------- App-indeling ---------- */
.app { display: none; min-height: 100vh; }
.app.actief { display: flex; }

.zijbalk {
  width: 240px; background: rgba(255,255,255,.8); backdrop-filter: blur(20px);
  border-right: 1px solid var(--lijn);
  display: flex; flex-direction: column; padding: 28px 14px;
  position: sticky; top: 0; height: 100vh; flex-shrink: 0;
}
.zijbalk-logo { font-weight: 700; font-size: 19px; letter-spacing: -.022em; padding: 0 14px; margin-bottom: 2px; }
.zijbalk-logo .punt { color: var(--accent); }
.zijbalk-sub { font-size: 11px; color: var(--tekst-licht); padding: 0 14px; margin-bottom: 30px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.nav-knop {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: none; color: var(--tekst-zacht);
  padding: 10px 14px; border-radius: 11px; font-size: 14.5px; font-weight: 500;
  text-align: left; transition: background .12s, color .12s; margin-bottom: 2px;
}
.nav-knop:hover { background: rgba(0,0,0,.045); color: var(--tekst); }
.nav-knop.actief { background: var(--accent-tint); color: var(--accent-tekst); font-weight: 600; }
.nav-knop .badge {
  margin-left: auto; background: var(--accent); color: var(--wit);
  border-radius: 99px; font-size: 11px; font-weight: 700; padding: 2px 7px;
}
.zijbalk-onder { margin-top: auto; padding: 0 14px; }
.zijbalk-gebruiker { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.zijbalk-rol { font-size: 12px; color: var(--tekst-licht); margin-bottom: 12px; }
.knop-uitloggen {
  background: none; border: 1px solid var(--lijn-donker); color: var(--tekst-zacht);
  padding: 8px 14px; border-radius: 980px; font-size: 13px; width: 100%;
}
.knop-uitloggen:hover { border-color: var(--zwart); color: var(--zwart); }

.inhoud { flex: 1; padding: 40px 48px; max-width: 1180px; }
.pagina-kop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 14px; }
.pagina-kop h1 { font-size: 26px; }
.knop-actie {
  background: linear-gradient(180deg, #EFF4F1 0%, var(--accent-tint) 100%); color: var(--accent-tekst);
  border: 1px solid var(--accent-rand);
  padding: 11px 22px; border-radius: 980px; font-weight: 600; font-size: 14px;
  box-shadow: 0 1px 2px rgba(31,42,38,.06); transition: filter .15s, box-shadow .15s;
}
.knop-actie:hover { filter: brightness(.96); }
.knop-stil {
  background: var(--wit); border: 1px solid var(--lijn-donker); color: var(--tekst);
  padding: 10px 20px; border-radius: 980px; font-weight: 500; font-size: 14px;
}
.knop-stil:hover { border-color: var(--zwart); }

/* ---------- Saldo-kaarten ---------- */
.saldo-rij { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 32px; }
.saldo-kaart {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--schaduw-zacht);
}
.saldo-kaart.lime:first-child { background: var(--accent-tint); border-color: var(--accent-rand); }
.saldo-label { font-size: 12px; font-weight: 600; color: var(--tekst-zacht); letter-spacing: -.01em; margin-bottom: 10px; }
.saldo-getal { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.saldo-detail { font-size: 13px; color: var(--tekst-zacht); margin-top: 8px; }

/* ---------- Tabellen & lijsten ---------- */
.paneel { background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; box-shadow: var(--schaduw-zacht); }
.paneel-kop { padding: 16px 22px; border-bottom: 1px solid var(--lijn); font-weight: 600; font-size: 15px; letter-spacing: -.01em; display:flex; justify-content: space-between; align-items:center; gap:12px; flex-wrap:wrap; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--tekst-licht);
  letter-spacing: -.005em; padding: 11px 22px; border-bottom: 1px solid var(--lijn); }
td { padding: 14px 22px; border-bottom: 1px solid var(--lijn); font-size: 14px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFC; }
.leeg-melding { padding: 36px 22px; text-align: center; color: var(--tekst-zacht); font-size: 14px; }

/* Terugkomst-blok onder de teamkalender */
.terugkomst-blok { background: var(--wit); border: 1px solid var(--lijn); border-radius: var(--radius); padding: 16px 20px; margin-top: 16px; box-shadow: var(--schaduw-zacht); }
.terugkomst-titel { font-weight: 600; font-size: 14px; letter-spacing: -.01em; margin-bottom: 10px; }
.terugkomst-rij { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--lijn); }
.terugkomst-rij:first-of-type { border-top: none; }
.terugkomst-tekst { font-size: 14px; color: var(--tekst-zacht); }
.terugkomst-tekst b { color: var(--tekst); font-weight: 600; }
.terugkomst-leeg { font-size: 14px; color: var(--tekst-zacht); }

/* Statuspillen */
.pil { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pil::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pil.in_behandeling { background: var(--grijs-1); color: var(--tekst-zacht); }
.pil.goedgekeurd { background: var(--groen-tint); color: var(--groen-tekst); }
.pil.afgekeurd { background: var(--rood-tint); color: var(--rood-zacht); }
.pil.geannuleerd { background: var(--grijs-1); color: var(--tekst-licht); }

/* Typestippen */
.type-stip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.type-vakantie .type-stip, .stip-vakantie { background: #9CC6A8; }
.type-ziekte .type-stip, .stip-ziekte { background: #E89A95; }
.type-kort_verzuim .type-stip, .stip-kort_verzuim { background: #9AC9D2; }
.type-bijzonder .type-stip, .stip-bijzonder { background: #F0B6A8; }
.type-onbetaald .type-stip, .stip-onbetaald { background: #C3B2E0; }

.mini-knop { border: none; border-radius: 980px; padding: 7px 15px; font-size: 13px; font-weight: 600; margin-right: 6px; }
.mini-knop.goed { background: var(--accent-tint); color: var(--accent-tekst); }
.mini-knop.goed:hover { filter: brightness(.96); }
.mini-knop.fout { background: var(--rood-tint); color: var(--rood-zacht); }
.mini-knop.fout:hover { filter: brightness(.97); }
.mini-knop.neutraal { background: var(--wit); color: var(--tekst); border: 1px solid var(--lijn-donker); }
.mini-knop.neutraal:hover { border-color: var(--zwart); }

/* ---------- Kalender ---------- */
.kalender-balk { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.kalender-balk h2 { font-size: 17px; min-width: 180px; text-align: center; font-weight: 600; }
.kalender-nav { background: var(--wit); border: 1px solid var(--lijn-donker); border-radius: 50%; width: 36px; height: 36px; font-size: 16px; color: var(--tekst); display: inline-flex; align-items: center; justify-content: center; }
.kalender-nav:hover { border-color: var(--zwart); }
.legenda { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; font-size: 12.5px; color: var(--tekst-zacht); align-items: center; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kalender { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--wit);
  border: 1px solid var(--lijn); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schaduw-zacht); }
.kalender-dagnaam { padding: 12px 8px; font-size: 11px; font-weight: 600; color: var(--tekst-licht);
  letter-spacing: .04em; text-align: center; border-bottom: 1px solid var(--lijn); }
.kalender-cel { min-height: 96px; border-bottom: 1px solid var(--lijn); border-right: 1px solid var(--lijn); padding: 8px; }
.kalender-cel:nth-child(7n) { border-right: none; }
.kalender-cel.buiten { background: #FAFAFC; }
.kalender-cel.weekend { background: #F7F7F9; }
.kalender-cel.feestdag { background: #FBF7EE; }
.feestdag-label { font-size: 10px; font-weight: 600; color: #9A7B1E; letter-spacing: -.01em;
  margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kalender-datum { font-size: 12px; font-weight: 600; color: var(--tekst-licht); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.kalender-cel.vandaag .kalender-datum {
  background: #CFE7D6; color: #2E5A40; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; font-weight: 700;
}
.afwezig-chip {
  display: block; font-size: 11.5px; font-weight: 500; padding: 3px 8px;
  border-radius: 6px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--grijs-1); color: var(--tekst);
}
.afwezig-chip.vakantie { background: #E0EFE5; color: #3F6B4F; }
.afwezig-chip.ziekte { background: #FBDEDB; color: #8A3A36; }
.afwezig-chip.kort_verzuim { background: #E4F6F9; color: #2B6E78; }
.afwezig-chip.bijzonder { background: #FCE5DE; color: #9A4A39; }
.afwezig-chip.onbetaald { background: #EEE7F6; color: #574886; }
.afwezig-chip.wachtend { opacity: .5; border: 1px dashed currentColor; background: var(--wit); }

/* ---------- Inzichten ---------- */
.staaf-rij { display: flex; align-items: center; gap: 14px; padding: 11px 22px; border-bottom: 1px solid var(--lijn); }
.staaf-rij:last-child { border-bottom: none; }
.staaf-naam { width: 170px; font-size: 14px; font-weight: 500; flex-shrink: 0; }
.staaf-baan { flex: 1; height: 16px; background: var(--grijs-1); border-radius: 99px; overflow: hidden; display: flex; }
.staaf-deel { height: 100%; }
.staaf-getal { width: 80px; text-align: right; font-size: 13px; color: var(--tekst-zacht); flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---------- Modal ---------- */
.modal-achtergrond {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-achtergrond.open { display: flex; }
.modal {
  background: var(--wit); border-radius: 20px; padding: 32px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal h2 { font-size: 18px; margin-bottom: 22px; }
.modal-knoppen { display: flex; gap: 10px; margin-top: 24px; }
.modal-knoppen .knop-actie, .modal-knoppen .knop-stil { flex: 1; }
.veld-rij { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dagen-preview { font-size: 13.5px; color: var(--tekst-zacht); margin-top: -6px; margin-bottom: 16px; }
.dagen-preview b { color: var(--tekst); }
.overlap-waarschuwing { background: #FFF8EC; color: #8A6D1F; border: 1px solid #F2E2BD;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-top: -6px; margin-bottom: 16px; line-height: 1.5; }
.overlap-waarschuwing.saldo-rood { background: #FBDEDB; color: #8A3A36; border-color: #F0B6A8; }
.pil-rood { display: inline-block; background: #FBDEDB; color: #8A3A36; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 2px 9px; margin-left: 6px; white-space: nowrap; }
.knop-actie.waarschuwing { background: linear-gradient(180deg, #FCE7E3, #FBDEDB); color: #8A3A36; border-color: #F0B6A8; }

/* nav-wrapper (desktop: gewoon gestapeld) */
.zijbalk-nav { display: flex; flex-direction: column; gap: 2px; }

/* ============================================================
   MOBIEL / iPhone — tabbalk onderaan, kaarten i.p.v. tabellen
   ============================================================ */
@media (max-width: 860px) {
  .app.actief { flex-direction: column; }

  /* Slanke bovenbalk: logo links, account rechts */
  .zijbalk {
    position: sticky; top: 0; z-index: 30;
    width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    padding: calc(env(safe-area-inset-top) + 11px) 16px 11px;
    border-right: none; border-bottom: 1px solid var(--lijn);
    background: rgba(255,255,255,.86); backdrop-filter: blur(20px);
  }
  .merk-tekst { flex: 1 1 auto; font-size: 16px; margin: 0 !important; }
  .zijbalk-sub, .zijbalk-gebruiker, .zijbalk-rol { display: none; }
  .zijbalk-onder { margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
  .zijbalk-onder .knop-uitloggen { width: auto; margin: 0 !important; padding: 8px 12px; font-size: 12.5px; border-radius: 980px; }

  /* Tabbalk onderaan (iOS-stijl) */
  .zijbalk-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    flex-direction: row; gap: 2px;
    padding: 7px 6px calc(env(safe-area-inset-bottom) + 7px);
    background: rgba(255,255,255,.93); backdrop-filter: blur(22px);
    border-top: 1px solid var(--lijn);
  }
  .nav-knop {
    flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px;
    justify-content: center; align-items: center; text-align: center;
    padding: 5px 2px; margin: 0; border-radius: 12px; color: var(--tekst-zacht);
    position: relative;
  }
  .nav-knop:hover { background: none; }
  .nav-knop.actief { background: var(--accent-tint); color: var(--accent-tekst); font-weight: 600; }
  .nav-knop .nav-tekst { display: block; font-size: 10.5px; line-height: 1.1; }
  .nav-knop .icoon { width: 23px; height: 23px; }
  .nav-knop .badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; padding: 1px 6px; }

  /* Inhoud: ruimte voor de onderbalk */
  .inhoud { padding: 16px 14px calc(env(safe-area-inset-bottom) + 88px); max-width: none; }
  .pagina-kop { margin-bottom: 16px; gap: 10px; }
  .pagina-kop h1 { font-size: 22px; }
  .pagina-kop > div { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .pagina-kop .knop-actie, .pagina-kop .knop-stil { flex: 1 1 auto; justify-content: center; }

  /* Saldokaarten: 2 per rij */
  .saldo-rij { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
  .saldo-kaart { padding: 16px; }
  .saldo-getal { font-size: 30px; }

  /* Tabellen -> kaarten */
  .paneel { overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: auto; }
  thead { display: none; }
  tbody tr {
    background: var(--wit); border: 1px solid var(--lijn); border-radius: 14px;
    padding: 12px 16px; margin: 0 0 10px; box-shadow: var(--schaduw-zacht);
  }
  tbody tr:last-child { margin-bottom: 0; }
  td { border: none !important; padding: 4px 0; font-size: 14px; }
  tr:hover td { background: transparent; }
  td::before {
    content: attr(data-label); display: inline-block; min-width: 104px;
    color: var(--tekst-zacht); font-weight: 500; vertical-align: top;
  }
  td[data-label=""]::before, td:not([data-label])::before { content: ""; min-width: 0; }
  td.acties { padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--lijn) !important; }
  td.acties .mini-knop { margin: 0 8px 0 0; padding: 9px 16px; font-size: 13.5px; }

  /* Kalender */
  .kalender-balk { flex-wrap: wrap; gap: 8px; }
  .kalender-balk h2 { min-width: 0; flex: 1; }
  .legenda { margin-left: 0; width: 100%; gap: 8px 14px; font-size: 12px; }
  .kalender-cel { min-height: 58px; padding: 4px; }
  .kalender-dagnaam { font-size: 10px; padding: 8px 2px; }
  .afwezig-chip { font-size: 9.5px; padding: 2px 4px; }

  /* Inzichten-balken */
  .staaf-rij { padding: 11px 16px; flex-wrap: wrap; }
  .staaf-naam { width: 100%; font-size: 13.5px; }

  /* Per-medewerker filter */
  .paneel-kop { padding: 14px 16px; }
  .paneel-kop select { max-width: 100% !important; width: 100%; }

  /* Modals als bottom-sheet */
  .modal-achtergrond { align-items: flex-end; padding: 0; }
  .modal { max-width: none; width: 100%; max-height: 90vh; border-radius: 20px 20px 0 0;
    padding: 24px 20px calc(env(safe-area-inset-bottom) + 24px); }
  .veld-rij { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; backdrop-filter: none !important; }
}
