:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --line: #e2e5ea;
  --line-strong: #c9cfd8;
  --text: #1c2430;
  --muted: #5f6b7d;
  --accent: #1f5fbf;
  --accent-ink: #ffffff;
  --accent-soft: #e6eefb;
  --ok: #1f7a46;
  --ok-bg: #dcf2e4;
  --warn: #9a5a00;
  --warn-bg: #fdebc8;
  --bad: #b3261e;
  --bad-bg: #fadbd7;
  --cover: #f1f8b4;
  --cover-ink: #4a5200;
  --absent: #c6e0b4;
  --absent-ink: #24451a;
  --train: #ddd3f5;
  --train-ink: #3b2a73;
  --away: #d7e8fb;
  --away-ink: #174a96;
  --we: #eef0f3;
  --hol: #fff2e2;
  --today: #eaf1fd;
  --remark: #b3261e;
  --shadow: 0 12px 32px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .08);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121519;
    --surface: #1a1e24;
    --surface-2: #20252d;
    --line: #2d333d;
    --line-strong: #3d4552;
    --text: #e6e9ee;
    --muted: #9aa5b4;
    --accent: #6c9cff;
    --accent-ink: #0d1420;
    --accent-soft: #1d2a44;
    --ok: #7fd6a0;
    --ok-bg: #173325;
    --warn: #f3c06b;
    --warn-bg: #3a2c12;
    --bad: #ff8f86;
    --bad-bg: #3d1b19;
    --cover: #3b4216;
    --cover-ink: #e4ef9b;
    --absent: #2a4a22;
    --absent-ink: #c8ebb8;
    --train: #352b55;
    --train-ink: #d9cdfb;
    --away: #1d2f4a;
    --away-ink: #a9c8ff;
    --we: #171a1f;
    --hol: #2c2318;
    --today: #1c2840;
    --remark: #ff8f86;
    --shadow: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.print-only { display: none; }

/* ---------- knoppen & formulieren ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
  font-weight: 500;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .iconbtn:focus-visible, .tab:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; font-size: 18px; line-height: 1;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn.xs { width: 26px; height: 26px; font-size: 13px; }

label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.field > span { color: var(--text); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=month], select, textarea {
  width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
}
textarea { height: auto; padding: 8px 10px; resize: vertical; }
input[type=color] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-error { color: var(--bad); margin: 0; min-height: 0; font-size: 13px; }
.form-error:empty { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- aanmelden ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.auth { width: 100%; max-width: 380px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.auth h1 { font-size: 22px; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 0; font-size: 13px; }
.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

/* ---------- kopbalk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
  padding: 0 20px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; white-space: nowrap; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.logo { width: 28px; height: 28px; flex: none; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active { background: var(--accent-soft); color: var(--accent); }
.userbtn { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 10px; text-align: left; }
.userbtn:hover { background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.uname { display: grid; line-height: 1.2; font-weight: 600; font-size: 13px; }
.uname small { color: var(--muted); font-weight: 500; }
.menu { position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 200px; display: grid; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }

main { padding: 16px 20px 32px; max-width: 100%; }

/* ---------- werkbalk ---------- */
.toolbar { display: grid; gap: 12px; margin-bottom: 12px; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tab {
  padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; margin-bottom: -1px;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab.active { color: var(--text); background: var(--surface); border-color: var(--line); }
.tab .mine { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.monthnav { display: flex; align-items: center; gap: 8px; }
.monthnav h2 { font-size: 20px; min-width: 170px; text-align: center; }
.monthnav h2.wide { min-width: 280px; }
.monthnav h2::first-letter, .pop-head p::first-letter { text-transform: uppercase; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- kantoorrooster ---------- */
.sheet-wrap {
  overflow: auto; max-height: calc(100vh - 230px); min-height: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 100%; user-select: none; }
.sheet th, .sheet td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0 6px; height: 30px; white-space: nowrap; }
.sheet thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-weight: 600; height: 42px; }
.sheet thead tr.sub th { top: 42px; height: 26px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sheet th.date { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 82px; font-weight: 500; }
.sheet thead th.date { z-index: 4; background: var(--surface-2); }
.sheet th.person { text-align: center; border-left: 2px solid var(--line-strong); line-height: 1.15; padding: 4px 8px; }
.sheet th.person small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.sheet thead tr.sub th.first { border-left: 2px solid var(--line-strong); }
.slot { text-align: center; cursor: default; min-width: 48px; }
.editable .slot { cursor: cell; }
.slot.a { border-left: 2px solid var(--line-strong); position: relative; }
.slot.c, .slot.l, .slot.n { overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 12px; color: var(--muted); }
.slot.c { min-width: 72px; max-width: 110px; }
.slot.l { min-width: 72px; max-width: 110px; }
.slot.n { min-width: 110px; max-width: 200px; }
.slot.c.covered { background: var(--cover); color: var(--cover-ink); }
.slot.l.away { background: var(--away); color: var(--away-ink); font-weight: 600; }
.slot.training { background-color: var(--train); color: var(--train-ink); }
.slot.a.training { font-weight: 700; font-size: 12px; }
.slot.parttrain { background-image: linear-gradient(to top, var(--train) 0 4px, transparent 4px); }
.slot .abs.opl { background: var(--train); color: var(--train-ink); }
.slot.st { color: #1c2430; }
.slot.absent { background-color: var(--absent); color: var(--absent-ink); }
.slot.a.absent { font-weight: 700; font-size: 12px; }
.slot.partabs { background-image: linear-gradient(to top, var(--absent) 0 4px, transparent 4px); }
.slot .abs { display: inline-block; background: var(--absent); color: var(--absent-ink); font-weight: 600; padding: 0 5px; border-radius: 4px; line-height: 18px; }
.slot.code { font-weight: 700; font-size: 12px; }
.slot.has-note::after {
  content: ''; position: absolute; top: 0; left: 0; border-style: solid; border-width: 7px 7px 0 0;
  border-color: var(--accent) transparent transparent transparent;
}
.slot.sel { box-shadow: inset 0 0 0 2px var(--accent); background-image: linear-gradient(rgba(31, 95, 191, .14), rgba(31, 95, 191, .14)); }
tr.wk td { background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; height: 22px; padding-left: 10px; }
tr.we th, tr.we td { background: var(--we); height: 20px; color: var(--muted); font-size: 11px; }
tr.hol th.date, tr.hol td { background-color: var(--hol); }
.sheet th.date small { display: inline; margin-left: 6px; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
tr.hol th.date small { color: var(--warn); text-transform: none; letter-spacing: 0; font-size: 11px; }
tr.today th.date { color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); background: var(--today); }
tr.today td { background-color: var(--today); }
td.notes { min-width: 220px; max-width: 360px; white-space: normal; font-size: 12px; line-height: 1.35; padding: 4px 8px; }
.editable td.notes { cursor: pointer; }
.editable td.notes:hover { background-color: var(--surface-2); }
td.notes strong { color: var(--remark); font-weight: 700; }
td.notes .hol-name { color: var(--warn); font-weight: 600; }
td.notes .pnote { color: var(--muted); }
td.notes .pnote.guest { color: var(--away-ink); }
th.cnt-h { text-align: center; }
td.cnt { text-align: center; font-weight: 700; min-width: 46px; }
td.cnt.ok { color: var(--ok); background: var(--ok-bg); }
td.cnt.warn { color: var(--warn); background: var(--warn-bg); }
td.cnt.bad { color: var(--bad); background: var(--bad-bg); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 16px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); align-items: center; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 4px; font-size: 10px; font-weight: 700; color: #1c2430; border: 1px solid rgba(0, 0, 0, .08); }
.sw.cover { background: var(--cover); color: var(--cover-ink); }
.sw.absent { background: var(--absent); color: var(--absent-ink); }
.sw.partabs { background: linear-gradient(to top, var(--absent) 0 4px, var(--surface) 4px); color: var(--absent-ink); border-color: var(--line-strong); }
.sw.training { background: var(--train); color: var(--train-ink); }
.sw.away { background: var(--away); color: var(--away-ink); }
.sw.hol { background: var(--hol); border-color: var(--line-strong); }
.sw.ok { background: var(--ok-bg); color: var(--ok); }
.sw.warn { background: var(--warn-bg); color: var(--warn); }
.sw.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- popover-editor ---------- */
.popover {
  position: fixed; z-index: 50; width: 380px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: grid; gap: 12px;
}
.popover.sheet-mode { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; max-height: 88vh; border-radius: 16px 16px 0 0; }
.pop-head h3 { font-size: 15px; }
.pop-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.chip.quick { font-weight: 500; border-style: dashed; }
.chip.quick:hover { background: var(--surface-2); }
.absbox { display: grid; gap: 10px; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.absbox[hidden] { display: none; }
.pop-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pop-actions .spacer { flex: 1; }
.meta { margin: 0; font-size: 12px; color: var(--muted); }
.detail { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 0; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }

/* ---------- regio-overzicht ---------- */
.daystrip { display: flex; gap: 4px; flex-wrap: wrap; }
.daystrip a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; border: 1px solid transparent; }
.daystrip a:hover { background: var(--surface); }
.daystrip a.active { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.daystrip a.today { color: var(--accent); }
.regiongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ocard header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ocard h3 { font-size: 15px; }
.ocard h3 a { color: inherit; text-decoration: none; }
.ocard h3 a:hover { text-decoration: underline; }
.badges { display: flex; gap: 6px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.role { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ocard .onote { padding: 8px 14px; font-size: 12px; font-weight: 700; color: var(--remark); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.plist { list-style: none; margin: 0; padding: 4px 0; }
.plist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 14px; }
.plist li.click { cursor: pointer; }
.plist li.click:hover { background: var(--surface-2); }
.plist .pname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist .ptime { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.plist .pextra { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.plist .pextra .cv { background: var(--cover); color: var(--cover-ink); padding: 0 6px; border-radius: 4px; }
.plist li.off .pname { color: var(--muted); }
.stchip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #1c2430; }
.stchip.abs { background: var(--absent); color: var(--absent-ink); }
.stchip.abs.opl { background: var(--train); color: var(--train-ink); }
.plist .pextra .guestchip, .plist .pextra .awaychip { background: var(--away); color: var(--away-ink); padding: 0 6px; border-radius: 4px; font-weight: 600; }
.plist li.guest { background: color-mix(in srgb, var(--away) 35%, transparent); }

/* ---------- beheer ---------- */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.subtabs a:hover { background: var(--surface); color: var(--text); }
.subtabs a.active { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-head h2 { font-size: 18px; }
.admin-head p { margin: 4px 0 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.nowrap { white-space: nowrap; }
table.list input[type=text], table.list input[type=number] { height: 32px; }
table.list tr.new td { background: var(--surface-2); }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.settings-form { max-width: 560px; }
.filter { max-width: 280px; }

/* ---------- modaal venster ---------- */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(15, 20, 28, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; }
.modal.wide { max-width: 720px; }
.modal h3 { font-size: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.creds td.code { font-size: 14px; }

/* ---------- meldingen ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; }
.toast { background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; max-width: 360px; transition: opacity .3s, transform .3s; }
.toast.err { background: var(--bad); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- klein scherm ---------- */
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .brand span { display: none; }
  .uname { display: none; }
  .mainnav a { padding: 8px 8px; font-size: 13px; }
  main { padding: 12px 16px 24px; }
  .monthnav h2, .monthnav h2.wide { font-size: 17px; min-width: 0; flex: 1; }
  .monthnav { width: 100%; }
  .sheet-wrap { max-height: none; }
  .grid2:not(.keep) { grid-template-columns: 1fr; }
  .daystrip { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .tools { width: 100%; }
  .regiongrid { grid-template-columns: 1fr; }
}

/* ---------- afdrukken ---------- */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; color: #000; }
  .topbar, .tabs, .tools, .monthnav .iconbtn, .monthnav .btn, #toasts, .popover, .menu, .subtabs, .daystrip, .legend { display: none !important; }
  .print-only { display: block; font-size: 16px; margin: 0 0 6px; }
  main { padding: 0; }
  .sheet-wrap { max-height: none; overflow: visible; border: 0; }
  .sheet thead th, .sheet th.date { position: static; }
  table.sheet { font-size: 8px; }
  .sheet th, .sheet td { height: 15px; padding: 0 2px; }
  .sheet thead th { height: auto; }
  .sheet thead tr.sub th { font-size: 7px; letter-spacing: 0; }
  .sheet thead tr.sub th[data-s] { font-size: 0; }
  .sheet thead tr.sub th[data-s]::after { content: attr(data-s); font-size: 7px; }
  .sheet th.date { min-width: 0; }
  .sheet th.date small, tr.hol th.date small { font-size: 7px; margin-left: 2px; }
  tr.wk td { height: 13px; font-size: 7px; }
  tr.we th, tr.we td { height: 11px; font-size: 7px; }
  td.notes { font-size: 7px; }
  td.cnt { min-width: 0; }
  .slot.a.absent, .slot.a.training { font-size: 8px; }
  .slot .abs { line-height: 11px; padding: 0 2px; }
  .slot, td.cnt, .slot.c.covered, .slot .abs, tr.hol td, tr.we td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .slot { min-width: 0; }
  .slot.c, .slot.l { min-width: 0; max-width: 50px; }
  .slot.n { min-width: 0; max-width: 80px; }
  td.notes { min-width: 90px; max-width: 160px; }
  body.print-modal > *:not(.overlay) { display: none !important; }
  body.print-modal .overlay { position: static; background: none; padding: 0; }
  body.print-modal .modal { box-shadow: none; max-height: none; }
  body.print-modal .modal-actions { display: none; }
}

/* ---------- vaste uurroosters ---------- */
.sched { border-collapse: collapse; font-size: 13px; }
.sched th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 4px 6px; text-align: center; }
.sched th.wk { text-align: left; white-space: nowrap; padding-left: 0; }
.sched td { padding: 3px 4px; vertical-align: top; }
.sched .pair { display: grid; gap: 3px; }
.sched input[type=text] { width: 66px; height: 30px; padding: 0 6px; text-align: center; }
.sched tr.mirrored input { opacity: .55; }
.sched-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.modal.xwide { max-width: 860px; }
.weekline { font-size: 12px; color: var(--muted); line-height: 1.5; }
.weekline b { color: var(--text); font-weight: 600; }
.weekline .off { color: var(--muted); font-style: italic; }
.cyclebox { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 16px; }
.cyclebox .chips { margin: 0; }
.seedbox { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.seedbox p { margin: 0; }
table.list td.new-tag { color: var(--ok); font-weight: 600; }
@media (max-width: 760px) {
  .sched input[type=text] { width: 54px; }
}
