/* hic.care — agenda (Coaching → planning & opvolging) en het inplanformulier. */
:root {
  --st-c1: #3f4fb5;  --st-c1-bg: #e6e9f7;
  --st-c2: #b07d1f;  --st-c2-bg: #f6ead0;
  --st-c3: #3d8a73;  --st-c3-bg: #e0efe8;
  --st-c4: #a2557f;  --st-c4-bg: #f4e3ec;
  --done: #6d7f1c;   --done-bg: #eef5c9;
  --hour: 60px;
}

/* Kleur per behandelaar */
.sw-c1, .sw-c2, .sw-c3, .sw-c4, .sw-done { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; flex: none; }
.sw-c1 { background: var(--st-c1); } .sw-c2 { background: var(--st-c2); } .sw-c3 { background: var(--st-c3); } .sw-c4 { background: var(--st-c4); }
.sw-done { background: var(--lime-dot); }
.ev-c1 { --ev: var(--st-c1); --ev-bg: var(--st-c1-bg); }
.ev-c2 { --ev: var(--st-c2); --ev-bg: var(--st-c2-bg); }
.ev-c3 { --ev: var(--st-c3); --ev-bg: var(--st-c3-bg); }
.ev-c4 { --ev: var(--st-c4); --ev-bg: var(--st-c4-bg); }
.ev-done { --ev: var(--done); --ev-bg: var(--done-bg); }
.av-c1 { background: var(--st-c1-bg) !important; color: var(--st-c1) !important; }
.av-c2 { background: var(--st-c2-bg) !important; color: var(--st-c2) !important; }
.av-c3 { background: var(--st-c3-bg) !important; color: var(--st-c3) !important; }
.av-c4 { background: var(--st-c4-bg) !important; color: var(--st-c4) !important; }
.av-done { background: var(--done-bg) !important; color: var(--done) !important; }

/* ── Toolbar ────────────────────────────────────────── */
.cal-card { padding-bottom: 22px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-arrow { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--tile-border); background: #fffcf5; }
.cal-arrow svg { width: 16px; height: 16px; }
.cal-arrow:hover, .cal-today:hover { border-color: #cfd6ea; background: #fbf5e8; }
.cal-today { height: 34px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 8px; border: 1px solid var(--tile-border); background: #fffcf5; font-size: 13px; font-weight: 500; }
.cal-title { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0 8px 0 10px; }
.cal-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg-links a { padding: 6px 14px; border-radius: 6px; font-size: 13.5px; color: #6f6b5e; }
.seg-links a:hover { color: var(--ink); }
.seg-links a.on { background: #fffdf8; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(80, 60, 20, .1); }

.cal-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 16px; border-top: 1px solid var(--line-soft); }
.cal-filters .select select { height: 34px; font-size: 13px; }
.cal-filters .select svg { top: 9px; }
.cal-filters .clear-filter { margin-left: 2px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-left: auto; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; }
.cal-hint { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.cal-empty { font-size: 13px; margin: 0 0 6px; }

/* ── Maand ──────────────────────────────────────────── */
.month { border: 1px solid var(--tile-border); border-radius: 12px; overflow: hidden; background: #fffcf5; }
.month-head, .month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-head { background: var(--tile); border-bottom: 1px solid var(--tile-border); }
.month-head span { padding: 8px 10px; }
.month-row + .month-row { border-top: 1px solid var(--tile-border); }
.mday { min-height: 118px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mday + .mday { border-left: 1px solid var(--tile-border); }
.mday:nth-child(n+6) { background: #faf4e6; }
.mday.out { background: #f6efdf; }
.mday.out .mday-num { color: var(--muted-2); }
.mday.past .ev:not(.ev-done) { opacity: .7; }
.mday-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.mday-num { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.mday-num:hover { background: var(--navy-soft); color: var(--navy); }
.mday.today .mday-num { background: var(--navy); color: #fff; }
.mday-add { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--muted); font-size: 16px; line-height: 1; opacity: 0; transition: opacity .12s; }
.mday:hover .mday-add, .mday-add:focus-visible { opacity: 1; }
.mday-add:hover { background: var(--navy-soft); color: var(--navy); }

.ev {
  display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 6px; border-radius: 5px;
  background: var(--ev-bg); border-left: 3px solid var(--ev); font-size: 11.5px; line-height: 1.35; color: var(--ink);
}
.ev b { font-weight: 600; color: var(--ev); font-variant-numeric: tabular-nums; flex: none; }
.ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev svg { width: 11px; height: 11px; stroke-width: 3; color: var(--ev); flex: none; }
.ev:hover { filter: brightness(.97); box-shadow: 0 1px 3px rgba(80, 60, 20, .12); }
.ev.st-open { border-left-style: dashed; }
.ev-more { font-size: 11.5px; color: var(--navy); padding: 1px 6px; }
.ev-more:hover { text-decoration: underline; }

/* ── Week ───────────────────────────────────────────── */
.wk { border: 1px solid var(--tile-border); border-radius: 12px; overflow-x: auto; background: #fffcf5; }
.wk-head, .wk-allday, .wk-body { display: grid; grid-template-columns: 56px repeat(7, minmax(104px, 1fr)); min-width: 800px; }
.wk-head { background: var(--tile); border-bottom: 1px solid var(--tile-border); }
.wk-day { padding: 8px 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; border-left: 1px solid var(--tile-border); }
.wk-day strong { font-size: 18px; font-weight: 600; }
.wk-day.today strong { color: #fff; background: var(--navy); border-radius: 50%; width: 28px; height: 28px; display: inline-grid; place-items: center; font-size: 14px; }
.wk-absent { flex-basis: 100%; font-size: 11px; color: var(--amber-ink); background: var(--amber-bg); border-radius: 4px; padding: 1px 6px; }
.wk-allday { border-bottom: 1px solid var(--tile-border); }
.wk-gutter { padding: 8px 4px; font-size: 8.5px; letter-spacing: .1em; text-align: center; align-self: center; }
.wk-allday-cell { padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; border-left: 1px solid var(--tile-border); min-width: 0; }
.wk-body { position: relative; }
.wk-hours { display: grid; grid-auto-rows: var(--hour); }
.wk-hours span { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.wk-hours span:first-child { transform: none; padding-top: 2px; }
.wk-col {
  position: relative; height: calc(var(--hours) * var(--hour)); border-left: 1px solid var(--tile-border);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px), var(--line) var(--hour));
}
.wk-col:nth-child(n+7) { background-color: #faf4e6; }
.wk-col.today { background-color: #f3f5fc; }
.wk-col.past { background-color: #f4eee0; }
.wk-col.has-avail { background-color: #eee6d2; }
.wk-col.has-avail::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(92, 76, 40, .06) 6px 7px); pointer-events: none; }
.wk-avail { position: absolute; left: 0; right: 0; background: rgba(216, 238, 92, .28); border-top: 2px solid var(--lime-dot); border-bottom: 2px solid var(--lime-dot); pointer-events: none; z-index: 1; }
.wk-add { position: absolute; inset: 0; z-index: 0; cursor: copy; }
.wk-add:hover { background: rgba(47, 61, 156, .035); }
.wk-ev {
  position: absolute; z-index: 2; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  padding: 4px 7px; border-radius: 7px; background: var(--ev-bg); border-left: 3px solid var(--ev); font-size: 11.5px; line-height: 1.3;
  box-shadow: 0 1px 2px rgba(80, 60, 20, .08);
}
.wk-ev:hover { z-index: 3; box-shadow: 0 3px 12px rgba(80, 60, 20, .18); min-height: fit-content; }
.wk-ev.st-uitgevoerd { background-image: linear-gradient(135deg, transparent 80%, rgba(200, 227, 63, .5) 80%); }
.wk-ev.compact { padding: 2px 6px; gap: 0; font-size: 11px; line-height: 1.25; }
.wk-time b { color: var(--ink); }
.wk-inline { font-weight: 400; color: var(--ink-2); }
.wk-ev { min-height: 22px; }
.wk-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ev); font-variant-numeric: tabular-nums; }
.wk-title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-sub { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.wk-ev.is-new { outline: 2px solid var(--lime-dot); outline-offset: 1px; }
.cal-flash { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: var(--done-bg); color: #3f4a10; font-size: 13px; }

/* Lijst */
.st-chip { font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 2px 8px; border-radius: 5px; background: var(--done-bg); color: var(--done); }
.st-chip.st-open { background: var(--amber-bg); color: var(--amber-ink); }
.week-head a.eyebrow:hover { color: var(--navy); }

/* ── Onder de kalender ──────────────────────────────── */
.cal-below { margin-top: 20px; }
.avail-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.avail-table th, .avail-table td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.avail-table thead th { font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.avail-table tbody th { font-weight: 500; min-width: 170px; }
.avail-table tbody th a { display: inline-flex; align-items: center; }
.avail-table tbody th a:hover { color: var(--navy); }
.avail-table tbody th span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.avail-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.avail-table td.on { color: var(--ink); }
.avail-table td.off { color: var(--muted-2); }

/* ── Inplannen ──────────────────────────────────────── */
.back-link:hover { color: var(--navy); }
.plan-fields { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 22px; }
.plan-fields[disabled] { opacity: .75; }
.form-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field input[type=number].text-input, .field input[type=time].text-input { width: 100%; }
.staff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.staff-option { position: relative; cursor: pointer; }
.staff-option input { position: absolute; opacity: 0; pointer-events: none; }
.staff-card { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--tile-border); background: #fffcf5; height: 100%; }
.staff-name { display: flex; align-items: center; font-weight: 600; font-size: 14px; }
.staff-role, .staff-hours { font-size: 12px; color: var(--muted); }
.staff-no { display: none; font-size: 11.5px; color: var(--amber-ink); }
.staff-option:hover .staff-card { border-color: #cfd6ea; }
.staff-option input:checked + .staff-card { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f6f7fd; }
.staff-option input:focus-visible + .staff-card { outline: 2px solid var(--navy); outline-offset: 2px; }
.staff-option input:disabled + .staff-card { opacity: .5; cursor: not-allowed; background: var(--tile); }
.staff-option input:disabled + .staff-card .staff-no { display: block; }
.cancel-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.link-btn.danger { color: #a3471f; }

.plan-side { display: grid; gap: 20px; }
.plan-side .card { margin: 0; }
.plan-side p.muted { font-size: 13px; line-height: 1.55; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slot { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--tile-border); background: #fffcf5; }
.slot:hover { border-color: #cfd6ea; background: #fbf5e8; }
.slot.on { border-color: var(--navy); background: #f6f7fd; }
.slot-day { font-size: 13px; }
.slot strong { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.slot-staff { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.day-list li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 7px 8px; border-radius: 8px; }
.day-list li.clash-risk { background: var(--amber-bg); }
.dl-time { font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 720px) {
  .cal-legend { margin-left: 0; }
  .mday { min-height: 74px; padding: 4px 3px; }
  .ev { padding: 1px 3px; border-left-width: 2px; }
  .ev span { display: none; }
  .ev b { font-size: 10px; }
  .staff-grid, .form-row.two { grid-template-columns: 1fr; }
}
