/* ============================================================
   Aanwezigheidsrooster — stijl
   Display: Space Grotesk · Body: Inter
   ============================================================ */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #1b1f27;
  --muted: #5b6472;
  --faint: #8a93a3;
  --border: #e5e8ee;
  --border-strong: #d4d9e2;

  --primary: #1f2430;
  --primary-hover: #2c3340;

  /* Statuskleuren */
  --thuis: #0f9d6b;
  --kantoor: #2f6bef;
  --vrij: #7c879c;

  --thuis-bg: #e4f5ec;   --thuis-tx: #0a7a51;   --thuis-bd: #c2e8d5;
  --kantoor-bg: #e7eefe; --kantoor-tx: #1f4fc4; --kantoor-bd: #cbdafb;
  --vrij-bg: #eef0f4;    --vrij-tx: #555f70;    --vrij-bd: #dde1e9;

  --today-tint: #f3f4fb;
  --danger: #c0392b;
  --danger-bg: #fdecea;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.04), 0 8px 24px -16px rgba(20, 24, 33, 0.25);

  --maxw: 980px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 600; letter-spacing: -0.01em; margin: 0; }

a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }

.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: conic-gradient(from 210deg, var(--kantoor) 0deg 120deg, var(--thuis) 120deg 240deg, var(--vrij) 240deg 360deg);
  box-shadow: inset 0 0 0 3px var(--surface), 0 1px 2px rgba(0,0,0,0.12);
}

.brand-text {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px;
  line-height: 1.1; display: flex; flex-direction: column;
}
.brand-domain { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 11px; color: var(--faint); letter-spacing: 0.01em; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.who { font-size: 13px; color: var(--muted); }
.who strong { color: var(--ink); font-weight: 600; }
.inline-form { margin: 0; display: inline; }

@media (max-width: 560px) {
  .who { display: none; }
  .topbar { padding: 12px 16px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: 14px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--faint); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-danger:disabled { color: var(--faint); border-color: var(--border); background: var(--surface-2); cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

:focus-visible { outline: 2px solid var(--kantoor); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */

.container { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 60px; }

@media (max-width: 560px) { .container { padding: 20px 16px 48px; } }

.board-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.board-title h1 { font-size: 26px; }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.hint { color: var(--faint); }

.weeknav { display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) {
  .weeknav { width: 100%; }
}

.date-picker {
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 7px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: #fff;
  color: var(--ink); cursor: pointer;
}
.date-picker:focus { outline: none; border-color: var(--kantoor); box-shadow: 0 0 0 3px rgba(47,107,239,.12); }

/* ---------- Legend ---------- */

.legend {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  margin: 0 0 14px; font-size: 13px; color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.swatch-thuis { background: var(--thuis); }
.swatch-kantoor { background: var(--kantoor); }
.swatch-vrij { background: var(--vrij); }
.swatch-empty { background: transparent; border: 1px dashed var(--border-strong); }

/* ---------- Board (desktop = tabel) ---------- */

.board-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}

.board { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }

.board .corner {
  width: 26%; padding: 12px 16px; text-align: left;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.day-h {
  padding: 12px 4px; text-align: center; vertical-align: middle;
  border-bottom: 1px solid var(--border); border-left: 1px solid var(--border);
  background: var(--surface-2);
}
.day-h .dow { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day-h .dom { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; margin-top: 3px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; border-radius: 50%; }
.day-h.is-today .dom { background: var(--primary); color: #fff; }
.day-h.is-weekend { background: #f1f2f6; }

.person {
  text-align: left; padding: 14px 16px; vertical-align: middle;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.person-name { font-weight: 600; font-size: 15px; }
.role-badge {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 999px;
}

.person-row:last-child .person,
.person-row:last-child .cell { border-bottom: 0; }

.cell {
  text-align: center; vertical-align: middle; height: auto; min-height: 60px;
  border-bottom: 1px solid var(--border); border-left: 1px solid var(--border);
  padding: 6px 4px;
}
.cell.is-today { background: var(--today-tint); }

/* Badges (alleen-lezen weergave) */
.badge-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  padding: 5px 10px; border-radius: 999px; border: 1px solid transparent;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.badge-thuis   { background: var(--thuis-bg);   color: var(--thuis-tx);   border-color: var(--thuis-bd); }
.badge-kantoor { background: var(--kantoor-bg); color: var(--kantoor-tx); border-color: var(--kantoor-bd); }
.badge-vrij    { background: var(--vrij-bg);    color: var(--vrij-tx);    border-color: var(--vrij-bd); }
.badge-thuis   .badge-dot { background: var(--thuis); }
.badge-kantoor .badge-dot { background: var(--kantoor); }
.badge-vrij    .badge-dot { background: var(--vrij); }
.badge-empty { color: var(--faint); background: transparent; font-weight: 400; border: none; }
.leave-time-badge { font-size: 11px; color: var(--muted); }

/* Dropdown (bewerkbare cel) */
.status-wrap {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 4px; padding: 0 4px; position: relative;
  border-radius: var(--radius-sm); transition: box-shadow .15s;
}
.status-wrap.is-selected {
  box-shadow: 0 0 0 2px var(--kantoor), inset 0 0 0 2px rgba(47,107,239,.08);
}

.week-sel-btn {
  font-size: 14px; line-height: 1; padding: 2px 5px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: transparent; color: var(--faint); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  margin-left: auto;
}
.week-sel-btn:hover { background: var(--surface-2); color: var(--kantoor); border-color: var(--kantoor); }

.status-main { display: flex; flex-direction: column; gap: 4px; }
.status-row  { display: flex; align-items: center; gap: 5px; }

/* Dot overlaid inside the select */
.select-dot-wrap { position: relative; display: flex; align-items: center; flex: 1; }
.status-dot {
  position: absolute; left: 8px; z-index: 1; pointer-events: none;
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--border-strong); transition: background .15s;
}
.s-thuis   .status-dot { background: var(--thuis); }
.s-kantoor .status-dot { background: var(--kantoor); }
.s-vrij    .status-dot { background: var(--vrij); }

.status-select {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 4px 6px 4px 24px; width: 100%;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  cursor: pointer; background: #fff; color: var(--faint);
  transition: background .15s, color .15s, border-color .15s;
}
.status-select:focus { outline: none; box-shadow: 0 0 0 2px rgba(47,107,239,.18); }
.s-thuis   .status-select { background: var(--thuis-bg);   color: var(--thuis-tx);   border-color: var(--thuis-bd); }
.s-kantoor .status-select { background: var(--kantoor-bg); color: var(--kantoor-tx); border-color: var(--kantoor-bd); }
.s-vrij    .status-select { background: var(--vrij-bg);    color: var(--vrij-tx);    border-color: var(--vrij-bd); }
.status-select:disabled { opacity: .6; cursor: not-allowed; }

.slots-container {
  display: flex; flex-direction: column; gap: 3px;
}
.slot-row {
  display: flex; align-items: center; gap: 4px;
}
.time-input {
  font: inherit; font-size: 12px; padding: 3px 4px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted);
  flex: 1; min-width: 0; text-align: center;
}
.time-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(47,107,239,.18); }
.time-sep { font-size: 12px; color: var(--muted); flex-shrink: 0; }

.s-thuis   .time-input { border-color: var(--thuis-bd);   background: var(--thuis-bg);   color: var(--thuis-tx); }
.s-kantoor .time-input { border-color: var(--kantoor-bd); background: var(--kantoor-bg); color: var(--kantoor-tx); }
.s-thuis   .time-sep   { color: var(--thuis-tx); }
.s-kantoor .time-sep   { color: var(--kantoor-tx); }

.add-slot-btn {
  font: inherit; font-size: 11px; font-weight: 600;
  padding: 2px 6px; border-radius: var(--radius-sm);
  border: 1px dashed; background: transparent;
  cursor: pointer; margin-top: 1px; opacity: 0.65;
  align-self: flex-start;
}
.add-slot-btn:hover { opacity: 1; }
.s-thuis   .add-slot-btn { color: var(--thuis-tx);   border-color: var(--thuis-tx); }
.s-kantoor .add-slot-btn { color: var(--kantoor-tx); border-color: var(--kantoor-tx); }

.remove-slot-btn {
  font: inherit; font-size: 13px; line-height: 1;
  padding: 1px 4px; border-radius: var(--radius-sm);
  border: none; background: transparent;
  cursor: pointer; color: var(--faint); flex-shrink: 0;
  transition: color .1s;
}
.remove-slot-btn:hover { color: var(--danger); }

/* Bulk action bar */
.bulk-bar {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--primary); color: #fff; border-radius: var(--radius);
  padding: 12px 18px; box-shadow: 0 4px 24px rgba(0,0,0,.25);
  transition: bottom .2s ease; z-index: 100; white-space: nowrap;
}
.bulk-bar.is-visible { bottom: 20px; }
.bulk-count { font-size: 14px; font-weight: 500; }
.bulk-status-select {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
}
.bulk-status-select option { background: var(--primary); }

.empty-row { padding: 28px 16px; text-align: center; color: var(--muted); }

.board-foot-note { min-height: 20px; margin: 12px 2px 0; font-size: 13px; color: var(--muted); }
.board-foot-note.ok { color: var(--thuis-tx); }
.board-foot-note.err { color: var(--danger); }

/* ---------- Board op mobiel = kaarten ---------- */

@media (max-width: 720px) {
  .board-wrap { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .board, .board tbody { display: block; width: 100%; }
  .board thead { display: none; }

  .person-row {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    margin-bottom: 12px; padding: 4px 16px 8px;
  }
  .person-row .person {
    display: flex; padding: 12px 0; border-bottom: 1px solid var(--border);
  }
  .person-row .cell {
    display: flex; align-items: center; justify-content: space-between;
    height: auto; padding: 11px 0; border: 0; border-bottom: 1px solid var(--border);
    text-align: right; background: transparent;
  }
  .person-row .cell:last-child { border-bottom: 0; }
  .cell::before {
    content: attr(data-label); text-transform: capitalize;
    font-weight: 500; color: var(--muted); font-size: 14px;
  }
  .cell.is-today::before { content: attr(data-label) " · vandaag"; color: var(--ink); font-weight: 600; }
  .cell.is-today { background: transparent; }
}

/* ---------- Auth / formulieren ---------- */

.auth-wrap { display: flex; justify-content: center; padding: 24px 0; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px;
}
.auth-card.center { text-align: center; }
.auth-card h1 { font-size: 22px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.auth-back { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--muted); text-decoration: none; }
.auth-back:hover { color: var(--ink); }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--faint); }
.field input, .field select {
  font: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--kantoor); box-shadow: 0 0 0 3px rgba(47,107,239,.12); }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c4be; }
.alert-ok { background: var(--thuis-bg); color: var(--thuis-tx); border: 1px solid var(--thuis-bd); }

/* ---------- Beheer ---------- */

.admin-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
@media (max-width: 820px) { .admin-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel-title { font-size: 16px; margin-bottom: 16px; }

/* Avatars */
.avatar {
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 42px; height: 42px; }
.avatar-ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  text-transform: uppercase;
}
.avatar-sm.avatar-ph { font-size: 13px; }
.avatar-md.avatar-ph { font-size: 16px; }

.avatar-upload-form { margin-top: 10px; }
.avatar-upload-label { display: flex; flex-direction: column; gap: 4px; }
.avatar-upload-row { display: flex; align-items: center; gap: 8px; }
.avatar-upload-row input[type="file"] { font-size: 13px; flex: 1; min-width: 0; }

.user-list { display: flex; flex-direction: column; gap: 14px; }
.user-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); }
.user-id { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.user-name { font-weight: 600; }
.user-handle { font-size: 13px; color: var(--faint); }

.user-edit { display: grid; grid-template-columns: 1fr 130px 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 620px) { .user-edit { grid-template-columns: 1fr 1fr; } }
.field.compact { gap: 4px; }
.field.compact .field-label { font-size: 12px; }
.field.compact input, .field.compact select { padding: 8px 10px; font-size: 13px; }
.user-actions { display: flex; align-items: end; }
.user-delete { margin-top: 10px; }

/* ---------- Footer ---------- */

.site-foot {
  max-width: var(--maxw); margin: 0 auto; padding: 24px;
  color: var(--faint); font-size: 12px; display: flex; gap: 8px; align-items: center;
}
.dot-sep { opacity: .5; }

/* ---------- Maandoverzicht ---------- */

.cal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-grid.has-weeknum {
  grid-template-columns: 30px repeat(7, 1fr);
}
.cal-grid.has-weeknum .cal-day:nth-child(8n) { border-right: 0; }

.cal-head {
  padding: 10px 4px; text-align: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cal-weeknum-head { padding: 0; }

.cal-week-num {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: var(--faint);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.cal-week-num[data-dates] {
  cursor: pointer; color: var(--muted);
  transition: background .1s, color .1s;
}
.cal-week-num[data-dates]:hover { background: var(--kantoor-bg); color: var(--kantoor-tx); }

.cal-day {
  min-height: 80px; padding: 8px 6px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px;
  transition: background .1s;
}
.cal-grid:not(.has-weeknum) .cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-empty { background: var(--surface-2); }
.cal-day.is-weekend { background: #fafbfd; }
.cal-day.is-today { background: var(--today-tint); }
a.cal-day:hover { background: var(--surface-2); }

.cal-day-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14px;
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cal-day.is-today .cal-day-num { background: var(--primary); color: #fff; }

.cal-day-num-link { text-decoration: none; color: inherit; }

/* Statusgroepen per dag in maandoverzicht */
.cal-status-groups {
  display: flex; flex-direction: column; gap: 3px; flex: 1;
}

.cal-group {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 2px; padding: 3px 5px; border-radius: 6px;
  line-height: 1.3;
}

.cal-group-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-right: 2px;
}

.cal-group-kantoor { background: var(--kantoor-bg); }
.cal-group-kantoor .cal-group-dot { background: var(--kantoor); }
.cal-group-kantoor .cal-name { color: var(--kantoor-tx); }

.cal-group-thuis { background: var(--thuis-bg); }
.cal-group-thuis .cal-group-dot { background: var(--thuis); }
.cal-group-thuis .cal-name { color: var(--thuis-tx); }

.cal-group-vrij { background: var(--vrij-bg); }
.cal-group-vrij .cal-group-dot { background: var(--vrij); }
.cal-group-vrij .cal-name { color: var(--vrij-tx); }

.cal-name {
  font-size: 11.5px; font-weight: 600;
}
/* Komma tussen namen via CSS */
.cal-name + .cal-name::before { content: ', '; font-weight: 400; }
.cal-name.cal-pick-trigger {
  cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px;
}
.cal-name.cal-pick-trigger:hover { text-decoration-style: solid; }
.cal-name.cal-pick-trigger:focus { outline: 2px solid var(--kantoor); outline-offset: 2px; border-radius: 2px; }

.cal-add-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px dashed var(--border-strong);
  background: transparent; color: var(--faint);
  font-size: 15px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s, transform .1s;
  padding: 0; margin-top: 2px;
}
.cal-add-btn:hover { border-color: var(--kantoor); color: var(--kantoor); transform: scale(1.1); }
.cal-add-btn:focus { outline: 2px solid var(--kantoor); outline-offset: 2px; }

/* Status picker popup */
.cal-picker {
  position: fixed; z-index: 200;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  min-width: 120px;
}
.cal-picker[hidden] { display: none; }
.cal-pick-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px; border: none; cursor: pointer;
  text-align: left; display: flex; align-items: center; gap: 8px;
  transition: background .1s;
}
.cal-pick-btn::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}
.cal-pick-btn.st-leeg    { color: var(--muted); }
.cal-pick-btn.st-leeg::before { background: var(--border-strong); }
.cal-pick-btn.st-thuis   { color: var(--thuis-tx); }
.cal-pick-btn.st-thuis::before { background: var(--thuis); }
.cal-pick-btn.st-kantoor { color: var(--kantoor-tx); }
.cal-pick-btn.st-kantoor::before { background: var(--kantoor); }
.cal-pick-btn.st-vrij    { color: var(--vrij-tx); }
.cal-pick-btn.st-vrij::before { background: var(--vrij); }
.cal-pick-btn:hover { background: var(--surface-2); }

@media (max-width: 560px) {
  .cal-day { min-height: 56px; padding: 5px 4px; }
  .cal-day-num { font-size: 12px; width: 22px; height: 22px; }
  .cal-name { font-size: 10px; }
  .cal-group { padding: 2px 4px; }
}

/* ---------- Active multiselect toggle ---------- */
.btn.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
