:root {
  --bg: #f4efe6;
  --card: #fffdf8;
  --ink: #2a2620;
  --muted: #6f675b;
  --line: #e2d9c8;
  --brand: #2b4a6f;
  --brand-ink: #ffffff;
  --ok: #2f7d4a;
  --ok-bg: #e3f1e6;
  --low: #b5531c;
  --low-bg: #fbe8dc;
  --none: #b9b0a0;
  --chip: #efe7d8;
  --today: #fff3cc;
  --radius: 12px;
  --top-h: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a17;
    --card: #25231f;
    --ink: #eee8dc;
    --muted: #a59d8f;
    --line: #3a362f;
    --brand: #8fb4e0;
    --brand-ink: #10140f;
    --ok: #7cc792;
    --ok-bg: #1f3326;
    --low: #f0a070;
    --low-bg: #3b2519;
    --none: #5c564c;
    --chip: #343028;
    --today: #3a3420;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }

/* ---------- kop ---------- */
.top {
  background: var(--brand); color: var(--brand-ink);
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
}
.top-inner { display: flex; align-items: center; gap: 12px; height: var(--top-h); }
.top h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  background: transparent; color: var(--brand-ink); border: 0; opacity: .75;
  padding: 6px 12px; min-height: 36px; border-radius: 999px; font-weight: 600;
}
.tab.active { opacity: 1; background: color-mix(in srgb, var(--brand-ink) 18%, transparent); }
.who { display: flex; align-items: center; gap: 8px; }
.who-name { font-size: .85rem; opacity: .9; }
.on-brand { color: var(--brand-ink) !important; border-color: color-mix(in srgb, var(--brand-ink) 45%, transparent) !important; }
@media (max-width: 520px) {
  body.is-admin .top h1 { display: none; }
  .who-name { display: none; }
}

main { padding-top: 14px; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }

/* ---------- algemeen ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
}
label { display: block; font-weight: 600; font-size: .9rem; }
label small { font-weight: 400; color: var(--muted); }
input, select {
  width: 100%; font: inherit; font-size: 16px; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; margin-top: 4px; min-height: 42px;
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.hint { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
h2 { font-size: 1.15rem; margin: 0 0 6px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }

button {
  font: inherit; border-radius: 8px; padding: 8px 14px; cursor: pointer;
  border: 1px solid transparent; min-height: 42px; touch-action: manipulation;
}
button.small { padding: 4px 10px; min-height: 34px; font-size: .9rem; }
.primary { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.danger { color: var(--low); }
button:disabled { opacity: .45; cursor: default; }

.msg { font-size: .9rem; color: var(--ok); margin: 6px 0 0; min-height: 1em; }
.msg.err { color: var(--low); }
.actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.actions.spread { justify-content: space-between; }
.actions.spread span { display: flex; gap: 8px; }

.grid2, .grid3 { display: grid; gap: 12px; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.align-end { align-items: end; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }

/* ---------- naam + werkbalk ---------- */
.namebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.namebar label { white-space: nowrap; }
.namebar input { margin-top: 0; max-width: 320px; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.period { flex: 1; text-align: center; margin: 0; font-size: 1.1rem; min-width: 160px; }
.navbtns { display: flex; gap: 6px; }
.navbtns .icon { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--card); }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 4px 14px; border-radius: 7px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) {
  .toolbar { display: grid; grid-template-columns: auto 1fr; }
  .period { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .navbtns { justify-self: end; }
  .navbtns .icon { width: 40px; }
  #todayBtn { padding: 8px 10px; }
}

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--none); }
.dot.ok { background: var(--ok); }
.dot.low { background: var(--low); }

/* ---------- weekweergave ---------- */
.strip { display: none; }
.swipe-hint { display: none; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }

.daycol { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.daycol.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.daycol.past { opacity: .6; }
.day-head { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.daycol.today .day-head { background: var(--today); }
.day-name { font-weight: 700; text-transform: capitalize; }
.day-num { color: var(--muted); font-size: .85rem; }
.day-tag { display: inline-block; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 1px; }
.edit-day { min-height: 30px; padding: 2px 8px; font-size: .8rem; flex: none; }
.edit-day .txt { display: none; }
.note { margin: 0; padding: 6px 10px; background: var(--chip); font-size: .82rem; }
.empty { padding: 10px; color: var(--muted); margin: 0; font-size: .9rem; }

.shift { padding: 9px 10px; border-top: 1px solid var(--line); border-left: 4px solid var(--none); }
.shift:first-of-type { border-top: 0; }
.shift.ok { border-left-color: var(--ok); }
.shift.low { border-left-color: var(--low); }
.shift-top { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.time { font-variant-numeric: tabular-nums; font-weight: 700; }
.label { font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-top: 4px; }
.status.ok { color: var(--ok); background: var(--ok-bg); }
.status.low { color: var(--low); background: var(--low-bg); }

.names { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; background: var(--chip);
  border-radius: 999px; padding: 1px 2px 1px 10px; font-size: .88rem; max-width: 100%;
}
.chip.ro { padding-right: 10px; }
.chip.mine { background: var(--ok-bg); font-weight: 600; }
.chip button {
  border: 0; background: transparent; color: var(--muted);
  min-height: 28px; width: 28px; padding: 0; border-radius: 50%; font-size: 1.05rem; line-height: 1;
}
.chip button:hover { color: var(--low); }
.join { padding: 2px 10px; min-height: 30px; font-size: .85rem; }

/* Telefoon / smal scherm: dagstrip + één dag tegelijk */
@media (max-width: 899px) {
  .strip {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
    position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 10;
    background: var(--bg); padding: 6px 0 8px; margin: 0 -2px;
  }
  .strip button {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 5px 0 6px; min-height: 58px; color: var(--ink);
  }
  .strip .s-name { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
  .strip .s-num { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
  .strip .dot { margin: 0; width: 8px; height: 8px; }
  .strip button.today { border-color: var(--brand); }
  .strip button.sel { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
  .strip button.sel .s-name { color: var(--brand-ink); }
  .strip button.past { opacity: .55; }

  .weekgrid { display: block; touch-action: pan-y; }
  .daycol { display: none; }
  .daycol.sel { display: block; }
  .daycol.past { opacity: 1; }
  .day-head { padding: 10px 14px; }
  .day-name { font-size: 1.05rem; }
  .shift { padding: 12px 14px; }
  .time { font-size: 1.1rem; }
  .label { font-size: 1rem; }
  .chip { font-size: 1rem; padding: 3px 2px 3px 12px; }
  .chip button { min-height: 32px; width: 32px; }
  .join { min-height: 38px; padding: 4px 14px; font-size: .95rem; }
  .edit-day .txt { display: inline; }
  .swipe-hint { display: block; text-align: center; color: var(--muted); font-size: .8rem; }
}

/* ---------- maandweergave ---------- */
.monthgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mhead { text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; padding: 4px 0; }
.mcell {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  min-height: 84px; padding: 6px; text-align: left; display: flex; flex-direction: column; gap: 4px;
  color: var(--ink); min-width: 0;
}
.mcell.other { opacity: .4; }
.mcell.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.mcell.past { opacity: .6; }
.mcell .m-num { font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; }
.mcell .m-ov { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.mcell .m-shifts { display: flex; flex-direction: column; gap: 2px; font-size: .72rem; }
.m-shift { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.m-shift .dot { width: 8px; height: 8px; margin: 0; flex: none; }
@media (max-width: 640px) {
  .mcell { min-height: 58px; padding: 4px; align-items: center; }
  .mcell .m-num { font-size: .9rem; }
  .m-shift span:not(.dot) { display: none; }
  .mcell .m-shifts { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
}

/* ---------- beheer ---------- */
.subtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.subtab {
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  white-space: nowrap; border-radius: 999px; min-height: 38px; padding: 4px 14px; font-weight: 600;
}
.subtab.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }

.shift-editor .ed-row { display: grid; grid-template-columns: 84px 1fr 42px; gap: 8px; margin-bottom: 8px; align-items: center; }
.shift-editor input { margin-top: 0; }
.shift-editor input:first-child { text-align: center; font-variant-numeric: tabular-nums; }
.shift-editor .del { padding: 0; }

.list { display: flex; flex-direction: column; margin-top: 10px; }
.row {
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row .r-main { min-width: 0; flex: 1 1 240px; }
.row .r-title { font-weight: 700; }
.row .r-sub { color: var(--muted); font-size: .85rem; }
.row .r-btns { display: flex; gap: 6px; }

.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 760px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters .grow { grid-column: 1 / -1; } }
input[type=date] { min-width: 0; -webkit-appearance: none; appearance: none; }

.audit { margin-top: 8px; }
.a-row { display: grid; grid-template-columns: 150px 140px 190px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.a-row.head { font-weight: 700; color: var(--muted); font-size: .8rem; border-top: 0; }
.a-time { font-variant-numeric: tabular-nums; color: var(--muted); }
.a-who { font-weight: 600; overflow-wrap: anywhere; }
.a-role { font-weight: 400; color: var(--muted); font-size: .78rem; display: block; }
.a-act { font-weight: 600; }
.a-act.warn { color: var(--low); }
.a-det { overflow-wrap: anywhere; }
mark { background: #ffe58a; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 760px) {
  .a-row { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; }
  .a-row.head { display: none; }
  .a-who { grid-column: 1; grid-row: 1; }
  .a-time { grid-column: 2; grid-row: 1; font-size: .8rem; }
  .a-act { grid-column: 1 / -1; }
  .a-det { grid-column: 1 / -1; color: var(--muted); }
}
#auditMore { margin-top: 12px; width: 100%; }

/* ---------- dialogen ---------- */
dialog {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px;
}
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { margin: 0 0 12px; }
dialog label { margin-bottom: 10px; }
.weekdays { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
#dCount { margin: 6px 0 12px; }
.weekdays legend { font-weight: 600; font-size: .9rem; margin-bottom: 4px; padding: 0; }
#dWeekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wd { position: relative; margin: 0; }
.wd input { position: absolute; opacity: 0; pointer-events: none; }
.wd span {
  display: block; text-align: center; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 0; font-weight: 600; font-size: .85rem; cursor: pointer; user-select: none;
}
.wd input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.wd input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 520px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .actions.spread { flex-direction: column-reverse; align-items: stretch; }
  .actions.spread span { justify-content: flex-end; }
}

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 14px; z-index: 50; text-align: center;
  font-size: .9rem; max-width: calc(100vw - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.toast.err { background: var(--low); color: #fff; }

/* ---------- v3: accounts, volgende beurt, keuzes ---------- */
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; }
.namebar { flex-wrap: wrap; }
.guest-hint { flex-basis: 100%; margin: 0; }

.nextbar {
  display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; width: 100%; text-align: left;
  color: var(--ink); border-left: 5px solid var(--brand); cursor: pointer; font: inherit;
}
.nb-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; flex-basis: 100%; }
.nb-text { font-weight: 700; font-size: 1.05rem; flex: 1; }
.nb-more { color: var(--brand); font-weight: 600; font-size: .9rem; white-space: nowrap; }

.badge { display: inline-block; color: var(--ok); font-weight: 800; font-size: .8em; margin-left: 3px; }
.rep { display: inline-block; color: var(--muted); font-weight: 700; font-size: .85em; margin-left: 3px; }
.chip .badge, .chip .rep { margin-left: 3px; }
.chip.member { font-weight: 600; }

.next-big .nb-label { display: block; }
.next-big .nb-date { font-size: 1.35rem; font-weight: 800; margin: 4px 0 2px; }
.next-big .nb-shift { font-size: 1.05rem; }
.next-big .nb-when { color: var(--muted); font-size: .9rem; margin-top: 4px; }

.choices { display: grid; gap: 10px; margin-top: 8px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink);
}
.choice:hover, .choice:focus-visible { border-color: var(--brand); outline: none; box-shadow: 0 0 0 1px var(--brand) inset; }
.choice b { font-size: 1rem; }
.choice span { color: var(--muted); font-size: .88rem; }

.row-form { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.row-form input { margin-top: 0; max-width: 320px; }
.filter { max-width: 220px; margin-top: 0; min-height: 38px; }
.role { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; background: var(--chip); color: var(--muted); }
.role.admin { background: var(--brand); color: var(--brand-ink); }
.role.warn { background: var(--low-bg); color: var(--low); }
#p-accounts .card + .card { margin-top: 0; }

.temp-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--bg); border: 1px dashed var(--brand); border-radius: 10px; padding: 12px 14px; margin: 12px 0 0; }
.temp-box code { font-size: 1.35rem; font-weight: 700; letter-spacing: .06em; user-select: all; }

@media (max-width: 520px) {
  .namebar { padding: 10px 12px; }
  .namebar input { max-width: none; flex: 1; min-width: 0; }
  .row-form input { max-width: none; flex: 1; min-width: 0; }
  .filter { max-width: none; width: 100%; }
  .row .r-btns { flex-wrap: wrap; }
}
.tab .sm { display: none; }
@media (max-width: 520px) {
  .tab .lg { display: none; }
  .tab .sm { display: inline; }
  .tab { padding: 6px 10px; }
}
.mcell.mine { border-color: var(--ok); }
.m-me { color: var(--ok); font-size: .85rem; }
dialog .hint { margin: 0 0 12px; }
dialog .hint.center { margin: 10px 0 0; }

/* ======================= Evenementen ======================= */
:root {
  --c-groen: #2f9e44; --c-roze: #d6336c; --c-blauw: #1c7ed6; --c-oranje: #e8590c;
  --c-paars: #7048e8; --c-geel: #e0a100; --c-grijs: #868e96;
  --s-blauw: #dbe7f6; --s-groen: #dcefd6; --s-geel: #fdf0c4; --s-roze: #fadde7; --s-paars: #e8e1fb; --s-oranje: #fde3d3; --s-grijs: #ebe8e2;
}
@media (prefers-color-scheme: dark) {
  :root { --s-blauw: #1e2d40; --s-groen: #1f3326; --s-geel: #3a3320; --s-roze: #3d2230; --s-paars: #2c2640; --s-oranje: #3d2a1c; --s-grijs: #302d28; }
}
.c-groen { --c: var(--c-groen); } .c-roze { --c: var(--c-roze); } .c-blauw { --c: var(--c-blauw); } .c-oranje { --c: var(--c-oranje); }
.c-paars { --c: var(--c-paars); } .c-geel { --c: var(--c-geel); } .c-grijs { --c: var(--c-grijs); }
.s-blauw { --s: var(--s-blauw); } .s-groen { --s: var(--s-groen); } .s-geel { --s: var(--s-geel); } .s-roze { --s: var(--s-roze); }
.s-paars { --s: var(--s-paars); } .s-oranje { --s: var(--s-oranje); } .s-grijs { --s: var(--s-grijs); }

a { color: var(--brand); }
a.tab { text-decoration: none; display: inline-flex; align-items: center; }
a.subtab { text-decoration: none; display: inline-flex; align-items: center; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); min-height: 42px; }
.back { display: inline-block; margin: 0 0 10px; font-weight: 600; text-decoration: none; }
.intro p { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; min-height: 0; margin: 0; }
.check.big { align-self: end; min-height: 42px; }
textarea { width: 100%; font: inherit; font-size: 16px; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin-top: 4px; resize: vertical; }
.hint.small { font-size: .78rem; }
.toolbar { justify-content: space-between; }

/* overzicht */
.month-head { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 2px 8px; }
.ev-card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--brand));
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: var(--ink);
}
.ev-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.ev-date { text-align: center; line-height: 1.1; }
.ev-date .d { font-size: 1.7rem; font-weight: 800; display: block; }
.ev-date .m { font-size: .8rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ev-date .w { font-size: .75rem; color: var(--muted); display: block; }
.ev-main { min-width: 0; }
.ev-title { font-weight: 700; font-size: 1.05rem; }
.lbl { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; background: var(--c, var(--brand)); color: #fff; }
.draft { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; background: var(--low-bg); color: var(--low); }
.ev-sub { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.ev-mine { color: var(--ok); font-size: .88rem; font-weight: 600; margin-top: 2px; }
.bar { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin-top: 7px; max-width: 320px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.bar.low i { background: var(--low); }
.ev-count { text-align: right; font-size: .85rem; white-space: nowrap; }
.ev-count b { font-size: 1.15rem; display: block; }
.ev-count.full b { color: var(--ok); }
.ev-count.low b { color: var(--low); }
@media (max-width: 520px) {
  .ev-card { grid-template-columns: 52px 1fr; }
  .ev-count { grid-column: 2; text-align: left; }
  .ev-count b { display: inline; font-size: 1rem; margin-right: 4px; }
}

/* evenement */
.ev-head { border-left: 6px solid var(--c, var(--brand)); }
.ev-head h2 { font-size: 1.4rem; margin: 2px 0 4px; }
.ev-head .ev-when { color: var(--muted); font-weight: 600; }
.ev-note { background: var(--chip); border-radius: 8px; padding: 8px 12px; margin: 10px 0 0; font-size: .92rem; }
.ev-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.section { padding: 0; overflow: hidden; }
.section-head { background: var(--s, var(--chip)); padding: 10px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.erole { display: grid; grid-template-columns: minmax(150px, 1.4fr) 150px 3fr; gap: 6px 14px; padding: 10px 16px; border-top: 1px solid var(--line); align-items: start; }
.erole:first-of-type { border-top: 0; }
.role-task { font-weight: 600; }
.role-task .need { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.role-time { font-variant-numeric: tabular-nums; color: var(--ink); }
.role-time .muted { color: var(--muted); }
.slots { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.slot { display: inline-flex; flex-direction: column; align-items: flex-start; }
.slot .chip { font-size: .95rem; }
.slot .chip-note { font-size: .78rem; color: var(--muted); margin: 2px 0 0 12px; max-width: 220px; overflow-wrap: anywhere; }
.open-slot {
  display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border: 1.5px dashed var(--low);
  color: var(--low); border-radius: 999px; font-size: .88rem; font-weight: 600; background: transparent;
}
.open-slot.admin-only { border-color: var(--line); color: var(--muted); font-weight: 500; }
button.open-slot { cursor: pointer; }
button.open-slot:hover { background: var(--low-bg); }
.assign { min-height: 32px; padding: 2px 10px; font-size: .85rem; }
.erole.full .role-task::after { content: ' ✓'; color: var(--ok); }
@media (max-width: 700px) {
  .erole { grid-template-columns: 1fr auto; }
  .role-time { text-align: right; font-size: .9rem; }
  .slots { grid-column: 1 / -1; }
}

/* mijn taken */
.task-date { font-weight: 700; }
.dot-c { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* editor */
.editor .grid3 { margin-bottom: 10px; }
.ed-section { border: 1px solid var(--line); border-left: 6px solid var(--s, var(--line)); border-radius: 10px; padding: 12px; margin: 14px 0; background: var(--bg); }
.ed-section-head { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; }
.ed-section-head input, .ed-section-head select { margin-top: 0; }
.ed-roles { margin-top: 10px; }
.ed-role { display: grid; grid-template-columns: 1fr 104px 104px 64px 150px 110px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ed-role input { margin-top: 0; min-height: 38px; padding: 6px 8px; }
.ed-role .check { font-size: .82rem; white-space: nowrap; }
.ed-head-row { display: grid; grid-template-columns: 1fr 104px 104px 64px 150px 110px; gap: 6px; font-size: .75rem; color: var(--muted); font-weight: 700; padding: 0 2px 2px; }
.mini { display: inline-flex; gap: 2px; }
.mini button { min-height: 34px; width: 34px; padding: 0; font-size: .95rem; }
.has-names { font-size: .72rem; color: var(--low); }
.sticky-actions { position: sticky; bottom: 0; background: var(--card); padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-bottom: -4px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .ed-head-row { display: none; }
  .ed-role { grid-template-columns: 1fr 1fr 64px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
  .ed-role input.task { grid-column: 1 / -1; }
  .ed-role .check { grid-column: 1 / 3; }
  .ed-section-head { grid-template-columns: 1fr 1fr; }
  .ed-section-head input { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  body:not(.is-admin) .tabs { display: none; }
  body:not(.is-admin) .top-inner { justify-content: space-between; }
  .top h1 { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .toolbar { display: flex; }
}
a.nextbar { text-decoration: none; }
input, select, textarea { font-weight: 400; }
a.btn.small { padding: 4px 10px; min-height: 34px; font-size: .9rem; }

/* ---------- startpagina: 3 tabbladen ---------- */
.hometabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.hometabs a { text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 700; color: var(--muted); text-decoration: none; }
.hometabs a.active { background: var(--brand); color: var(--brand-ink); }

.evnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.evnav .evpos { flex: 1; text-align: center; color: var(--muted); font-size: .88rem; }
.evnav button { white-space: nowrap; }
@media (max-width: 520px) { .evnav .lg { display: none; } .evnav #evPrev, .evnav #evNext { width: 44px; padding: 0; font-size: 1.3rem; } }

.calbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calbar h2 { flex: 1; text-align: center; margin: 0; font-size: 1.15rem; }
.calbar .icon { width: 44px; padding: 0; font-size: 1.4rem; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 92px; padding: 5px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell.other { opacity: .4; }
.cal-cell.past { opacity: .65; }
.cal-cell.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.cal-num { font-weight: 700; font-size: .9rem; }
.cal-ev { display: flex; align-items: center; gap: 4px; background: var(--c); color: #fff; border-radius: 6px; padding: 3px 6px; font-size: .78rem; font-weight: 600; text-decoration: none; min-width: 0; }
.cal-ev:hover { filter: brightness(1.1); }
.cal-ev-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-n { background: rgba(0,0,0,.22); border-radius: 99px; padding: 0 6px; font-size: .72rem; white-space: nowrap; }
.cal-ev-me { font-size: .8rem; }
.callist { margin-top: 16px; }
@media (max-width: 640px) {
  .cal-cell { min-height: 58px; padding: 3px; align-items: center; }
  .cal-num { font-size: .85rem; }
  .cal-ev { padding: 2px; justify-content: center; width: 100%; }
  .cal-ev-t, .cal-ev-me { display: none; }
  .cal-ev-n { background: none; padding: 0; font-size: .7rem; }
}
@media (max-width: 520px) { .calbar h2 { font-size: 1rem; white-space: nowrap; } #calToday { padding: 8px 10px; } }

/* ---------- gastbalk ---------- */
.guestbar .gb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.guestbar label { margin: 0; }
.guestbar .hint { margin-top: 8px; }
@media (max-width: 640px) { .guestbar .gb-fields { grid-template-columns: 1fr; } }
.note-edit { background: none; border: 0; min-height: 0; padding: 2px 0 0 12px; font-size: .78rem; color: var(--brand); text-align: left; max-width: 240px; overflow-wrap: anywhere; cursor: pointer; }
.note-edit:hover { text-decoration: underline; }
