:root { --carbon: #0B0D0F; --carbon-2: #191D21; --blauw: #0066FF; --blauw-diep: #0052CC; --blauw-licht: #E8F1FF; --turquoise: #19C2C9; --turquoise-licht: #D3F3F4; --mist: #F1F5F6; --wit: #FFF; --grijs: #51626A; --lijn: #DCE4E7; --uit: cubic-bezier(.23, 1, .32, 1); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--mist); color: var(--carbon); font: 400 16px/1.5 "Figtree", "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, p, fieldset { margin: 0; }
h1, h2 { font-family: "Archivo", Arial, sans-serif; font-weight: 800; font-stretch: 110%; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: 30px; font-style: italic; }
h1::first-letter, h2::first-letter, .groep::first-letter { text-transform: uppercase; }
h2 { font-size: 21px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 2px; }

button { font: 600 15px/1.2 "Figtree", sans-serif; border: 1px solid var(--blauw); background: var(--blauw); color: var(--wit); border-radius: 8px; padding: 12px 18px; min-height: 44px; cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, transform 140ms var(--uit); }
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: default; }
.licht { background: transparent; color: inherit; border-color: var(--lijn); }
.klein { padding: 8px 14px; min-height: 40px; font-size: 14px; }
@media (hover: hover) {
  button:hover { background: var(--blauw-diep); border-color: var(--blauw-diep); }
  .licht:hover { background: transparent; border-color: currentColor; }
}
.knoppen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; min-width: 0; }
input, select, textarea { font: 400 16px/1.4 "Figtree", sans-serif; color: inherit; background: var(--wit); border: 1px solid #B4C2C7; border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; min-height: 46px; transition: border-color 150ms ease, box-shadow 150ms ease; }
input:focus, select:focus, textarea:focus { border-color: var(--blauw); box-shadow: 0 0 0 3px rgb(0 102 255 / .18); outline: none; }
textarea { resize: vertical; }
.velden { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.fout { font-weight: 600; border: 2px solid currentColor; border-radius: 8px; padding: 10px 12px; }

#login { min-height: 100dvh; padding: 32px max(24px, calc(50vw - 180px)); display: grid; gap: 18px; align-content: center; color: var(--wit); background: linear-gradient(105deg, transparent 0 58%, var(--carbon-2) 58% 74%, transparent 74% 80%, var(--carbon-2) 80%) var(--carbon); }
#login img { width: 220px; margin-bottom: 20px; }
#login input { border-color: transparent; color: var(--carbon); min-height: 50px; }
#login button { min-height: 50px; }

#agenda { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100dvh; }
.zij { background: var(--carbon); color: var(--wit); padding: 26px 18px 20px; display: flex; flex-direction: column; gap: 28px; overflow-y: auto; }
.zij img { width: 168px; display: block; margin-left: 4px; }
.tabs { display: grid; gap: 4px; }
.tabs button { background: transparent; border-color: transparent; color: #C3CDD1; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; }
.tabs b { font-weight: 700; font-size: 13px; min-width: 26px; padding: 3px 7px; border-radius: 99px; text-align: center; background: #2A3036; color: var(--wit); }
.tabs button[aria-pressed="true"] { background: var(--carbon-2); border-color: #333B42; color: var(--wit); }
.tabs button[aria-pressed="true"] b { background: var(--turquoise); color: var(--carbon); }
.acties { display: grid; gap: 8px; }
.voet { margin-top: auto; display: grid; gap: 14px; }
#sync { font-size: 13px; line-height: 1.4; color: #A7B3B8; padding: 0 4px; }
.zij .licht { border-color: #3A434A; }
@media (hover: hover) { .tabs button:hover { background: var(--carbon-2); border-color: transparent; color: var(--wit); } }

main { display: grid; grid-template-columns: minmax(0, 1fr) clamp(350px, 31vw, 480px); min-height: 0; }
.kalender { padding: 26px 28px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.paneel { background: var(--wit); border-left: 1px solid var(--lijn); padding: 28px 24px 40px; overflow-y: auto; }
.maand { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.maand .licht { background: var(--wit); }
.raster { flex: 1 0 auto; display: grid; grid-template: auto / repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(98px, 1fr); gap: 1px; background: var(--lijn); border: 1px solid var(--lijn); border-radius: 12px; overflow: hidden; }
.raster > span { font-size: 13px; font-weight: 600; color: var(--grijs); background: var(--wit); padding: 9px 12px; }
.raster > i { background: var(--mist); }
.raster > button { background: var(--wit); color: var(--carbon); border: 0; border-radius: 0; padding: 7px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-weight: 500; text-align: left; min-width: 0; min-height: 0; overflow: hidden; transition: background-color 150ms ease; }
.raster > button:active { transform: none; }
@media (hover: hover) { .raster > button:hover { background-color: var(--blauw-licht); } }
.raster > button:focus-visible { outline-offset: -3px; }
.raster > button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--blauw); background-color: var(--blauw-licht); }
.raster em { font-style: normal; font-weight: 600; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; flex: none; }
.raster .geweest em { color: #7B8A90; font-weight: 500; }
.raster .nu em { background: var(--carbon); color: var(--wit); }
.dichtvak, .raster > button.dicht { background-image: repeating-linear-gradient(135deg, #DDE5E7 0 1.5px, transparent 1.5px 8px); }
.raster > button.keus, .raster > button.keus:hover { box-shadow: inset 0 0 0 3px var(--blauw); background-color: #CFE2FF; }
.raster { user-select: none; -webkit-user-select: none; }
.raster.kiezen > button { touch-action: none; }
.raster .aanrader em { box-shadow: inset 0 0 0 2px var(--turquoise); }
.raster .aanrader.nu em { box-shadow: 0 0 0 2px var(--turquoise); }
.legenda .aanrader { box-shadow: inset 0 0 0 2px var(--turquoise); background: var(--wit); }
#meer[aria-pressed="true"] { background: var(--blauw); border-color: var(--blauw); color: var(--wit); }
#sleeptip { margin-top: 10px; }
.twee { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.pil { font-size: 12px; font-weight: 600; line-height: 1.35; border-radius: 6px; padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.s-aangevraagd { background: var(--turquoise-licht); color: #064B4F; }
.s-ingepland { background: var(--blauw); color: var(--wit); }
.s-afgerond { background: #E3E9EB; color: #3A474D; }
.s-geannuleerd { background: var(--wit); color: var(--grijs); box-shadow: inset 0 0 0 1px var(--lijn); }
.s-dicht { background-color: var(--wit); color: var(--grijs); box-shadow: inset 0 0 0 1px var(--lijn); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 600; }
.legenda span { border-radius: 6px; padding: 3px 10px; }
.legenda .dichtvak { background-color: var(--wit); box-shadow: inset 0 0 0 1px var(--lijn); }

.groep { font-size: 14px; font-weight: 600; color: var(--grijs); margin: 22px 0 8px; }
.regel { width: 100%; background: var(--wit); color: inherit; border: 1px solid var(--lijn); border-radius: 10px; display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 1px 12px; align-items: center; text-align: left; padding: 13px 14px; margin-bottom: 8px; font-weight: 400; line-height: 1.4; }
.regel.blok { grid-template-columns: minmax(0, 1fr) auto; }
.regel.blok button { background: var(--wit); }
.regel strong { overflow-wrap: anywhere; font-weight: 650; }
.wanneer { grid-row: span 2; font: 800 16px/1.2 "Archivo", Arial, sans-serif; }
.regel small { grid-column: 2 / -1; font-size: 14px; color: var(--grijs); overflow-wrap: anywhere; }
.regel.blok small { grid-column: 1 / -1; }
.regel small.antwoord { color: var(--blauw-diep); font-weight: 600; }
@media (hover: hover) { button.regel:hover { background: var(--wit); border-color: var(--blauw); } }
.leeg { color: var(--grijs); padding: 44px 16px; margin: 18px 0; text-align: center; background: var(--mist); border-radius: 10px; }

.detail { display: grid; gap: 20px; }
.detail .titel { display: flex; gap: 12px; justify-content: space-between; align-items: start; }
dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; background: var(--mist); border-radius: 10px; padding: 16px; }
dt { color: var(--grijs); }
dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
a { color: var(--blauw-diep); }
.detail hr { border: 0; border-top: 1px solid var(--lijn); margin: 4px 0; width: 100%; }
.mails { display: grid; gap: 10px; }
.mail { border-radius: 12px; padding: 12px 16px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; justify-self: start; background: var(--mist); }
.mail.uit { justify-self: end; background: var(--blauw-licht); }
.mail small { display: block; color: var(--grijs); font-size: 13px; margin-bottom: 3px; }
.mail small.let { color: var(--carbon); font-weight: 600; margin: 6px 0 0; }
.schrijf { display: grid; gap: 14px; }
.uitleg { font-size: 14px; color: var(--grijs); }

dialog { border: 0; border-radius: 14px; padding: 30px; width: min(480px, calc(100vw - 32px)); color: inherit; box-shadow: 0 24px 60px rgb(11 13 15 / .3); transition: opacity 180ms var(--uit), transform 180ms var(--uit); }
@starting-style { dialog[open] { opacity: 0; transform: scale(.97); } }
dialog::backdrop { background: rgb(11 13 15 / .6); }
dialog form { display: grid; gap: 18px; }
.keuze { border: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; min-width: 0; }
.keuze legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.keuze input { position: absolute; opacity: 0; width: 1px; min-height: 0; }
.keuze span { border: 1px solid #B4C2C7; border-radius: 8px; padding: 11px; text-align: center; font-size: 15px; cursor: pointer; }
.keuze input:checked + span { border-color: var(--blauw); box-shadow: inset 0 0 0 1px var(--blauw); background: var(--blauw-licht); color: var(--blauw-diep); }
.keuze input:focus-visible + span { outline: 3px solid var(--turquoise); outline-offset: 2px; }
.keuze .breed { grid-column: 1 / -1; }
.delen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.tijden { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-bottom: 14px; }
.schakel { background: var(--wit); color: var(--carbon); border-color: #B4C2C7; padding: 8px 4px; font-size: 14px; }
#inhoud .schakel[aria-pressed="true"] { color: var(--grijs); border-style: dashed; background-image: repeating-linear-gradient(135deg, #DDE5E7 0 1.5px, transparent 1.5px 8px); text-decoration: line-through; }
#urenvenster { width: min(600px, calc(100vw - 24px)); }
#urenvenster .schakel[aria-pressed="true"], .dagkeuze button[aria-pressed="true"] { background: var(--blauw); border-color: var(--blauw); color: var(--wit); }
#urentijden { max-height: 264px; overflow-y: auto; margin: 0; padding: 3px; }
.dagkeuze { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dagkeuze button { background: var(--blauw-licht); border-color: var(--blauw-licht); color: var(--blauw-diep); padding: 8px 2px; }
.dagkeuze .leegdag { background: var(--mist); border-color: var(--mist); color: var(--grijs); }
@media (hover: hover) {
  .schakel:hover, .dagkeuze button:hover { border-color: var(--blauw); }
  .schakel:not([aria-pressed="true"]):hover { background: var(--blauw-licht); }
  #inhoud .schakel:hover { background-color: var(--blauw-licht); }
}

@media (max-width: 1180px) {
  .acties { display: flex; }
  #agenda { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); }
  .zij { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 20px; overflow: visible; }
  .tabs { display: flex; flex-wrap: wrap; }
  .voet { margin: 0 0 0 auto; display: flex; align-items: center; }
  #sync { max-width: 210px; text-align: right; }
}
@media (max-width: 900px) {
  #agenda { display: block; height: auto; }
  main { display: block; }
  .kalender { padding: 18px 14px; overflow: visible; }
  .paneel { border: 0; border-top: 1px solid var(--lijn); padding: 24px 16px 48px; min-height: 60vh; overflow: visible; }
}
@media (max-width: 640px) {
  .zij { padding: 14px; justify-content: space-between; }
  .zij img { width: 138px; margin: 0; }
  .tabs { order: 2; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tabs button { flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 6px; font-size: 13px; padding: 10px; background: var(--carbon-2); }
  .acties { order: 3; width: 100%; }
  .acties button { flex: 1; padding: 8px 10px; }
  dialog { padding: 20px; }
  .voet { order: 4; width: 100%; justify-content: space-between; }
  #sync { text-align: left; max-width: none; }
  h1 { font-size: 25px; }
  .raster { grid-auto-rows: 58px; }
  .raster > span { padding: 7px 0; text-align: center; }
  .raster > button { padding: 4px; align-items: center; }
  .raster .pil { font-size: 0; padding: 0; height: 6px; width: 80%; border-radius: 3px; }
  .raster .s-aangevraagd { background: var(--turquoise); }
  .regel { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 12px; }
  .wanneer { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, ::backdrop { transition-duration: 1ms !important; } }
