/* Rooster De Mert — huisstijl van demertswalmen.nl, licht en donker thema */

/* ---------- kleuren: licht ---------- */
:root {
  color-scheme: light;
  --red: #ed1c24;        /* knoppen en vlakken */
  --red-hover: #c4121a;
  --accent: #ed1c24;     /* rode tekst */
  --red-soft: #fdeaea;
  --green: #8bc34a;
  --ink: #222;
  --muted: #777;
  --line: #e4e4e4;
  --line-soft: #f0f0f0;
  --border: #d6d6d6;
  --bg: #f3f3f3;
  --card: #fff;
  --input: #fff;
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.25);
  --backdrop: rgba(15,19,23,.45);
  --toast-bg: #222; --toast-ink: #fff;

  --over: #c4121a; --left: #a86400; --ok: #4c8a17;

  --av-yes: #e7f4d9;   --av-yes-b: #8bc34a;
  --av-eve: #e4e8fb;   --av-eve-b: #5c6bc0;
  --av-maybe: #fff1d9; --av-maybe-b: #f5a623;
  --av-no: #e9e9e9;    --av-no-b: #555;
  --av-day: #fff8cc;   --av-day-b: #d4a800;
  --av-leave: #f3e5f5; --av-leave-b: #9c4dcc;
  --hol: #fde3e4;
  --weekend: #fafafa;
  --planned: #8bc34a; --planned-ink: #1f3a0a;
  --warn-bg: #fff4d6; --warn-line: #f1dfa8;

  --f-body: Lora, Georgia, serif;
  --f-hand: 'Shadows Into Light Two', 'Comic Sans MS', cursive;
  --f-ui: Poppins, system-ui, sans-serif;
}

/* ---------- kleuren: donker (automatisch of gekozen) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent: #ff5a60; --red-soft: #3a1c1e;
    --ink: #ececec; --muted: #9a9a9a;
    --line: #2c3034; --line-soft: #24282b; --border: #3a3f44;
    --bg: #121416; --card: #1c1f22; --input: #16191c;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 64px rgba(0,0,0,.6);
    --backdrop: rgba(0,0,0,.6);
    --toast-bg: #ececec; --toast-ink: #121416;
    --over: #ff7a7e; --left: #f0b050; --ok: #9ccc65;
    --av-yes: #26361a; --av-eve: #252a45; --av-eve-b: #8c9eff; --av-maybe: #3a2e14; --av-no: #2b2d30; --av-no-b: #a0a0a0; --av-day: #37321a; --av-day-b: #e6c440; --av-leave: #33223b; --av-leave-b: #c77dff;
    --hol: #3a1c1e; --weekend: #191c1f;
    --warn-bg: #3a2e14; --warn-line: #5a4a20;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #ff5a60; --red-soft: #3a1c1e;
  --ink: #ececec; --muted: #9a9a9a;
  --line: #2c3034; --line-soft: #24282b; --border: #3a3f44;
  --bg: #121416; --card: #1c1f22; --input: #16191c;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 64px rgba(0,0,0,.6);
  --backdrop: rgba(0,0,0,.6);
  --toast-bg: #ececec; --toast-ink: #121416;
  --over: #ff7a7e; --left: #f0b050; --ok: #9ccc65;
  --av-yes: #26361a; --av-eve: #252a45; --av-eve-b: #8c9eff; --av-maybe: #3a2e14; --av-no: #2b2d30; --av-no-b: #a0a0a0; --av-day: #37321a; --av-day-b: #e6c440; --av-leave: #33223b; --av-leave-b: #c77dff;
  --hol: #3a1c1e; --weekend: #191c1f;
  --warn-bg: #3a2e14; --warn-line: #5a4a20;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); min-height: 100vh; display: flex; flex-direction: column; transition: background-color .2s, color .2s; }
main { flex: 1; width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.inner { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .inner { display: flex; align-items: center; gap: 14px; min-height: 72px; flex-wrap: nowrap; }
.logo { height: 56px; width: auto; display: block; }
.tabs { display: flex; gap: 0; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 24px 11px 22px; font-family: var(--f-body); font-weight: 600; font-size: 15px; color: var(--ink); border-bottom: 3px solid transparent; white-space: nowrap; flex: 0 0 auto; }
.tabs button:hover { color: var(--accent); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--red); }
.tabs button { position: relative; }
.tabs .count { font-style: normal; font-family: var(--f-ui); font-size: 11px; font-weight: 600; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 6px; margin-left: 5px; vertical-align: 2px; }
.account { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.acct { position: relative; }
.acct summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-family: var(--f-ui); font-weight: 600; font-size: 16px; user-select: none; }
.acct summary::-webkit-details-marker { display: none; }
.acct[open] summary { box-shadow: 0 0 0 3px var(--red-soft); }
.acct-menu { position: absolute; right: 0; top: 46px; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px; width: 240px; display: flex; flex-direction: column; gap: 8px; }
.acct-menu small { color: var(--muted); font-size: 12px; word-break: break-all; margin-top: -6px; }
.acct-menu p { margin: 0; font-size: 13px; }
.who { display: flex; flex-direction: column; line-height: 1.2; text-align: right; margin-right: 6px; font-weight: 600; }
.who small { font-weight: 400; color: var(--muted); font-size: 12px; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; width: 38px; height: 38px; padding: 0; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.theme-btn span { display: none; }
.theme-btn:hover { border-color: var(--red); color: var(--accent); }
.theme-btn svg { width: 16px; height: 16px; }

.demo-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); font-size: 14px; }
.demo-bar .inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.demo-bar strong { background: var(--red); color: #fff; font-family: var(--f-ui); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.demo-bar select { padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--input); }

.dev-bar { background: var(--card); border-bottom: 1px solid var(--line); font-size: 14px; }
.dev-bar .inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.dev-bar strong { background: var(--ink); color: var(--card); font-family: var(--f-ui); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.dev-bar select { padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--input); }
.dev-bar .dev-note { color: var(--muted); font-size: 13px; flex: 1; }
.dev-bar #devExit { display: none; }
.dev-bar.active { background: var(--warn-bg); border-bottom-color: var(--warn-line); }
.dev-bar.active .dev-note { color: var(--ink); font-weight: 600; }
.dev-bar.active #devExit { display: inline-block; }
.site-footer { color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }

/* ---------- algemene onderdelen ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 16px; }
.title { font-family: var(--f-hand); font-weight: 400; font-size: 36px; line-height: 1.1; margin: 0; }
.grow { flex: 1; }
.card { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.muted { color: var(--muted); }
.over { color: var(--over); font-weight: 600; }
.left { color: var(--left); }
.ok { color: var(--ok); }

.btn { border: 1px solid var(--border); background: var(--card); padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.btn:hover { border-color: var(--red); color: var(--accent); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: #fff; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.icon { padding: 4px 12px; font-size: 20px; line-height: 1.2; }
.btn.wide { width: 100%; padding: 11px; }
.btn:disabled { opacity: .45; cursor: default; }
.link-danger { border: 0; background: none; color: var(--accent); padding: 8px 0; font-weight: 600; }
.linkish { border: 0; background: none; color: var(--accent); padding: 10px 0 0; font-size: 14px; text-decoration: underline; }
.pager { display: flex; gap: 6px; align-items: center; }

.seg { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--red); color: #fff; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--f-ui); font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--b, var(--border)); }

.av-yes   { background: var(--av-yes);   --b: var(--av-yes-b); }
.av-eve   { background: var(--av-eve);   --b: var(--av-eve-b); }
.av-maybe { background: var(--av-maybe); --b: var(--av-maybe-b); }
.av-no    { background: var(--av-no);    --b: var(--av-no-b); }
.av-day   { background: var(--av-day);   --b: var(--av-day-b); }
.av-leave { background: var(--av-leave); --b: var(--av-leave-b); }
.sw.hol   { background: var(--hol); --b: var(--red); }

/* ---------- maandrooster (past op het scherm) ---------- */
body.wide main.inner { max-width: none; }
.grid-card { overflow: hidden; }
.grid-wrap { overflow-x: auto; }
table.month { border-collapse: separate; border-spacing: 0; font-family: var(--f-ui); font-size: 12px; width: 100%; table-layout: fixed; }
.month col.c-name { width: 118px; }
.month col.c-num { width: 66px; }
.month th, .month td { border-bottom: 1px solid var(--line); padding: 0; }
.month thead th { background: var(--card); font-weight: 500; color: var(--muted); padding: 6px 0 4px; }
.month th.d, .month td.d { text-align: center; border-left: 1px solid var(--line-soft); }
.month thead th.d span { display: block; font-size: 10px; }
.month thead th.d b { display: inline-block; min-width: 22px; font-size: 12px; color: var(--ink); font-weight: 600; border-radius: 11px; }
.month thead th.d.today b { background: var(--red); color: #fff; }
.month .we { background: var(--weekend); }
.month .hol { background: var(--hol); }
.month .star { display: block; color: var(--accent); font-style: normal; font-size: 9px; line-height: 1; }
.month .name { position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; padding: 0 10px; font-weight: 600; color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); }
.month .name small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; }
.month thead .name { color: var(--muted); font-weight: 500; }
.month tr.mine .name { box-shadow: inset 4px 0 0 var(--red); }
.month td.num, .month th.num { text-align: right; padding: 0 8px; white-space: nowrap; }
.month td.num small { color: var(--muted); margin-left: 2px; }
.month th.num { color: var(--muted); }
.month tbody tr { height: 62px; }
.month tfoot td, .month tfoot th { color: var(--muted); height: 30px; text-align: center; border-bottom: 0; }
.cell { display: flex; align-items: center; justify-content: center; width: 100%; height: 61px; border: 0; padding: 0; background: transparent; }
.month td .cell { border-radius: 0; }
button.cell:hover { box-shadow: inset 0 0 0 2px var(--red); }
.cell em { font-style: normal; color: var(--b); font-weight: 600; font-size: 12px; opacity: .85; }
.cell.planned { background: var(--planned); }
/* Hele woord staand in het vakje, zodat het ook in smalle kolommen past */
.cell .dept { color: var(--planned-ink); font-weight: 600; font-size: 10px; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; line-height: 1; }
.sw.planned { background: var(--planned); --b: var(--planned); }
.month-notes { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 12px 2px; font-size: 13px; color: var(--muted); }
.month-notes b { color: var(--accent); font-weight: 600; }
@media (max-width: 900px) { table.month { width: 900px; } }

/* ---------- dialoog ---------- */
dialog { border: 0; border-radius: 14px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); background: var(--card); color: var(--ink); }
dialog::backdrop { background: var(--backdrop); }
.dlg-title { font-family: var(--f-hand); font-weight: 400; font-size: 28px; margin: 0 0 10px; line-height: 1.15; }
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 400; font-size: 14px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=time], input[type=number], input[type=date], select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--input); font-family: var(--f-ui); font-size: 14px; color: var(--ink);
}
input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; }
label.inline select { width: auto; margin: 0; }
textarea { resize: vertical; font-family: var(--f-body); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.row { display: flex; gap: 12px; }
.row > label { flex: 1; min-width: 0; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.field-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.dept-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.dept-pick button { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 9px 4px; font-weight: 600; font-size: 13px; }
.dept-pick button:hover { border-color: var(--planned); }
.dept-pick button.on { background: var(--planned); border-color: var(--planned); color: var(--planned-ink); }
.ask p { margin: 0 0 16px; }
.btn.big { padding: 10px 26px; font-size: 15px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.presets button { border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 4px 12px; font-family: var(--f-ui); font-size: 13px; }
.presets button:hover { border-color: var(--red); color: var(--accent); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badge { font-family: var(--f-ui); font-size: 12px; padding: 3px 10px; border-radius: 999px; border-left: 3px solid var(--b, var(--border)); background: var(--bg); }
.badge.av-yes { background: var(--av-yes); } .badge.av-eve { background: var(--av-eve); }
.badge.av-maybe { background: var(--av-maybe); } .badge.av-no { background: var(--av-no); }
.badge.av-day { background: var(--av-day); } .badge.av-leave { background: var(--av-leave); }
.badge.hol { background: var(--hol); color: var(--over); border-left-color: var(--red); }
.hours-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--bg); border-radius: 10px; padding: 12px; margin-bottom: 12px; font-family: var(--f-ui); }
.hours-info div { display: flex; flex-direction: column; }
.hours-info span { font-size: 11px; color: var(--muted); }
.hours-info b { font-size: 16px; font-weight: 600; }

/* ---------- beschikbaarheid ---------- */
.notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; border-left: 4px solid; }
.notice.warn   { background: var(--warn-bg); border-color: var(--av-maybe-b); }
.notice.ok     { background: var(--av-yes); border-color: var(--green); }
.notice.closed { background: var(--red-soft); border-color: var(--red); }
.notice.info   { background: var(--card); border-color: var(--border); }
.brushes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.brush { border: 2px solid transparent; border-left: 6px solid var(--b, var(--border)); border-radius: 8px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.brush.clear { background: var(--card); border-color: var(--border); }
.brush.on { border-color: var(--ink); border-left-color: var(--b, var(--ink)); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.progress { font-family: var(--f-ui); font-size: 13px; color: var(--muted); }
.cal { padding: 12px; margin-top: 4px; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head span { text-align: center; font-family: var(--f-ui); font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.cal-day { min-height: 76px; border: 1px solid var(--line); border-left: 5px solid var(--b, var(--line)); border-radius: 10px; background-color: var(--card); padding: 6px 8px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.cal-day.av-yes { background-color: var(--av-yes); } .cal-day.av-eve { background-color: var(--av-eve); }
.cal-day.av-maybe { background-color: var(--av-maybe); } .cal-day.av-no { background-color: var(--av-no); }
.cal-day.av-day { background-color: var(--av-day); }
.cal-day.av-yes, .cal-day.av-eve, .cal-day.av-maybe, .cal-day.av-no, .cal-day.av-day { border-color: transparent; border-left-color: var(--b); }
.cal-day b { font-family: var(--f-ui); font-size: 15px; }
.cal-day small { font-size: 12px; line-height: 1.25; }
.cal-day:not(:disabled):hover { box-shadow: inset 0 0 0 2px var(--red); }
.cal-day:disabled { cursor: default; opacity: .6; }
.cal-day.hol { background-color: var(--hol); border-left-color: var(--red); opacity: 1; }
.cal-day.hol small { color: var(--over); }
.cal-day.today b { color: var(--accent); }
.cal-day.changed { outline: 2px dashed var(--ink); outline-offset: -4px; }
.submit-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-top: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.submit-bar > div { flex: 1; font-size: 14px; }
.pending { color: var(--left); font-weight: 600; }

/* mijn rooster: maandkalender */
.mine-cal .cal-day { border-left-width: 1px; min-height: 84px; }
.mine-cal .cal-day.planned { background: var(--planned); border-color: var(--planned); color: var(--planned-ink); }
.mine-cal .cal-day.planned small { color: var(--planned-ink); }
.mine-cal .cal-day.past { opacity: .55; }
.mine-cal .cal-day.hol:not(.planned) { background: var(--hol); }
.mine-cal .shift-time { font-family: var(--f-ui); font-weight: 600; font-size: 13px; }
.mine-cal .hol-name { color: var(--over); }
.mine-cal .cal-day.planned .hol-name { color: var(--planned-ink); font-weight: 600; }

/* ---------- mijn diensten / uren ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px; }
.stat span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-family: var(--f-ui); font-size: 26px; font-weight: 600; line-height: 1.3; }
.stat small { color: var(--muted); font-size: 13px; }
.list .item { display: grid; grid-template-columns: 130px 150px 1fr auto; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .item.past { color: var(--muted); }
.list .item.is-today { box-shadow: inset 4px 0 0 var(--red); }
.list .date b { color: var(--accent); }
.list .time { font-family: var(--f-ui); font-weight: 500; }
.list .time small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.list .hrs { font-family: var(--f-ui); font-weight: 600; }
.tag { display: inline-block; font-size: 12px; background: var(--hol); color: var(--over); padding: 1px 8px; border-radius: 999px; margin-right: 6px; }

table.data { width: 100%; border-collapse: collapse; font-family: var(--f-ui); font-size: 14px; }
.data th, .data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data th { font-size: 12px; color: var(--muted); font-weight: 500; }
.data .n { text-align: right; }
.data tfoot td { font-weight: 600; border-bottom: 0; }
.data tr.archived td { color: var(--muted); }
.data .linkcell { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; }
.data .linkcell.small { font-size: 12px; margin-left: 6px; }
.status { font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status.in { background: var(--av-yes); color: var(--ok); }
.status.wait { background: var(--av-maybe); color: var(--left); }
.status.none { background: var(--bg); color: var(--muted); }
.table-wrap { overflow-x: auto; }
.role { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--bg); }
.role.owner { background: var(--red); color: #fff; }
.role.developer { background: var(--ink); color: var(--card); }
.role.planner { background: var(--red-soft); color: var(--over); }

/* ---------- inloggen ---------- */
.auth { max-width: 400px; margin: 48px auto; padding: 28px; }
.auth .title { margin-bottom: 4px; }
.error { color: var(--over); background: var(--red-soft); padding: 8px 12px; border-radius: 6px; font-size: 14px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px); background: var(--toast-bg); color: var(--toast-ink); padding: 11px 18px; border-radius: 8px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- mijn uren / grafieken ---------- */
.insight { font-size: 15px; margin: 4px 2px 12px; }
.charts { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-bottom: 8px; }
.chart { padding: 14px 16px 10px; }
.chart h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 150px; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.bar-col .bar { width: 100%; max-width: 28px; background: var(--red); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.bar-col:hover .bar { opacity: .75; }
.bar-col span { font-family: var(--f-ui); font-size: 10px; color: var(--muted); margin-top: 4px; height: 14px; }
.bar-col em { font-style: normal; font-family: var(--f-ui); font-size: 11px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.bars { border-bottom: 1px solid var(--line); }
.back { padding: 18px 0 0; text-decoration: none; font-weight: 600; }
.person-title { font-family: var(--f-hand); font-weight: 400; font-size: 30px; margin: 6px 0 -12px; }
.toolbar.sub { margin: 20px 0 8px; }
.toolbar.sub .sub-title { margin: 0; }
.open-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.open-bar span { flex: 1; }
.work-list .item { grid-template-columns: 120px 1fr auto; }
.work-list .item.todo { box-shadow: inset 4px 0 0 var(--av-maybe-b); }
.work-actions { display: flex; gap: 6px; }
button.pill { border: 0; cursor: pointer; }
.work-info { font-family: var(--f-ui); font-weight: 600; margin: -4px 0 8px; min-height: 1.2em; }
.cal-day.blocked { background-color: var(--hol); }


/* ---------- mijn uren: simpele lijst ---------- */
.work-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-bottom: 12px; }
.work-total span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.work-total b { font-family: var(--f-ui); font-size: 26px; font-weight: 600; }
.todo-note { background: var(--av-maybe); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.work-rows { overflow: hidden; }
.work-row { display: grid; grid-template-columns: 1fr auto 150px; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.work-row:last-child { border-bottom: 0; }
.work-row.open { border-left-color: var(--av-maybe-b); }
.work-row.saved { border-left-color: var(--planned); }
.work-row.future { opacity: .55; }
.wr-date { display: flex; flex-direction: column; min-width: 0; }
.wr-date small { color: var(--muted); font-size: 12px; font-family: var(--f-ui); }
.wr-times { display: flex; align-items: center; gap: 8px; font-family: var(--f-ui); }
.wr-times input { width: 112px; margin: 0; }
.wr-times span { color: var(--muted); font-size: 13px; }
.wr-times .wr-hours { min-width: 52px; text-align: right; color: var(--ink); font-weight: 600; }
.wr-action { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.wr-action .btn { min-width: 112px; }
.btn.done { background: var(--av-yes); border-color: var(--av-yes); color: var(--ok); }
.wr-del { border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 6px; }
.wr-del:hover { color: var(--accent); }
.add-day { display: block; margin: 12px 2px 0; text-decoration: none; font-weight: 600; }
details.more { margin-top: 20px; }
details.more summary { cursor: pointer; font-weight: 600; padding: 12px 16px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); list-style: none; }
details.more summary::after { content: ' ▾'; color: var(--muted); }
details.more[open] summary { margin-bottom: 12px; }
details.more[open] summary::after { content: ' ▴'; }

/* Smallere schermen (tablet, kleine laptop): korte namen in het menu, zodat alles op één regel past */
@media (min-width: 761px) and (max-width: 1240px) {
  .tabs button { padding: 24px 8px 22px; font-size: 14px; }
  .tabs .long { display: none; }
  .tabs .short { display: inline !important; }
  .logo { height: 46px; }
}

/* Onderdelen die alleen op de telefoon of alleen op een groot scherm horen */
.tabs svg, .tabs .short, .show-m { display: none; }
.sub-title { font-family: var(--f-hand); font-weight: 400; font-size: 28px; margin: 24px 0 10px; }

/* ---------- rooster per dag (telefoon) ---------- */
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; scroll-behavior: smooth; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-pill { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-family: var(--f-ui); }
.day-pill span { font-size: 11px; color: var(--muted); }
.day-pill b { font-size: 17px; font-weight: 600; line-height: 1.2; }
.day-pill i { font-style: normal; font-size: 10px; color: var(--ok); min-height: 13px; }
.day-pill.today b { color: var(--accent); }
.day-pill.hol { background: var(--hol); }
.day-pill.on { background: var(--red); border-color: var(--red); color: #fff; }
.day-pill.on span, .day-pill.on i, .day-pill.on b { color: #fff; }
.day-head { margin: 6px 2px 12px; }
.day-head h2 { font-family: var(--f-hand); font-weight: 400; font-size: 26px; margin: 0; display: inline; }
.day-head .tag { margin-left: 8px; vertical-align: 4px; }
.day-head p { margin: 2px 0 0; font-size: 13px; font-family: var(--f-ui); }
.people { overflow: hidden; }
.person-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; min-height: 60px; }
.people > :last-child { border-bottom: 0; }
.person-row.mine { box-shadow: inset 4px 0 0 var(--red); }
button.person-row:active { background: var(--bg); }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-main b { font-size: 15px; }
.pr-main small { font-family: var(--f-ui); font-size: 12px; color: var(--muted); }
.pill { font-family: var(--f-ui); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 10px; text-align: right; white-space: nowrap; line-height: 1.25; }
.pill small { display: block; font-weight: 500; font-size: 11px; }
.pill.planned { background: var(--planned); color: var(--planned-ink); }
.pill.none { background: var(--bg); color: var(--muted); font-weight: 500; }
.pill.av-yes, .pill.av-eve, .pill.av-maybe, .pill.av-no, .pill.av-day, .pill.av-leave { color: var(--ink); border-left: 3px solid var(--b); }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }

@media (max-width: 760px) {
  .inner { padding: 0 12px; }
  .site-header { position: sticky; top: 0; }
  .site-header .inner { gap: 8px; min-height: 56px; padding-top: env(safe-area-inset-top); flex-wrap: wrap; }
  .theme-btn { margin-left: auto; width: 34px; height: 34px; }
  .acct summary { width: 34px; height: 34px; font-size: 15px; }
  .acct-menu { position: fixed; right: 12px; top: calc(52px + env(safe-area-inset-top)); width: min(280px, calc(100vw - 24px)); }
  .logo { height: 40px; }
  .who { display: none; }
  .account { gap: 6px; }
  .account .btn.small { padding: 5px 9px; font-size: 12px; }


  /* menu bovenin, onder het logo, met icoontjes */
  .site-header .inner { padding-bottom: 0; }
  .tabs { order: 3; flex: 1 1 100%; display: flex; gap: 2px; margin: 0 -12px; padding: 0 6px; border-top: 1px solid var(--line); overflow: visible; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .count { position: absolute; top: 3px; right: calc(50% - 20px); margin: 0; font-size: 10px; padding: 0 5px; }
  .tabs button { flex: 1 0 58px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; font-size: 11px; font-family: var(--f-ui); font-weight: 500; color: var(--muted); }
  .tabs button.on { color: var(--accent); border-bottom-color: var(--red); background: none; }
  .tabs svg { display: block; width: 22px; height: 22px; }
  .tabs .long { display: none; }
  .tabs .short { display: block; }

  .toolbar { margin: 16px 0 12px; gap: 8px; }
  .title { font-size: 28px; flex: 1 1 100%; }
  .toolbar .pager { order: 2; }
  .toolbar .grow { display: none; }
  .toolbar > :not(.title):not(.pager):not(.grow) { order: 3; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat b { font-size: 21px; }
  .notice { font-size: 13px; padding: 10px 12px; }

  .work-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
  .wr-times input { flex: 1; width: auto; min-width: 0; }
  .wr-action .btn { flex: 1; padding: 10px; }
  .wr-action .muted { width: 100%; text-align: center; font-size: 13px; }
  .work-total b { font-size: 22px; }
  .charts { grid-template-columns: 1fr; }
  .bars { height: 120px; }
  .work-list .item { grid-template-columns: 1fr auto; }
  .work-list .item .meta { grid-column: 1 / -1; grid-row: 2; }
  .work-list .item .hrs { grid-row: 1; grid-column: 2; }
  .open-bar .btn { width: 100%; }

  /* lijsten */
  .list .item { grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; }
  .list .item .meta { grid-column: 1 / -1; font-size: 13px; }
  .list .item .hrs { grid-row: 1; grid-column: 2; }

  /* kalenders */
  .cal { padding: 8px; }
  .cal-head, .cal-grid { gap: 4px; }
  .cal-day { min-height: 54px; padding: 4px 5px; border-left-width: 4px; border-radius: 8px; }
  .cal-day b { font-size: 13px; }
  .cal-day small { font-size: 9px; }
  .mine-cal .cal-day { min-height: 50px; border-left-width: 1px; }
  .mine-cal .shift-time { font-size: 10px; }

  /* beschikbaarheid */
  .brushes { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .brush { flex: 0 0 auto; padding: 7px 11px; font-size: 13px; }
  .brushes .btn { flex: 0 0 auto; }
  .submit-bar { bottom: calc(10px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; text-align: center; gap: 10px; padding: 12px; }

  /* tabellen worden kaartjes */
  .table-wrap.card { background: none; box-shadow: none; overflow: visible; }
  table.data, .data tbody, .data tfoot, .data tr, .data td { display: block; width: 100%; }
  .data thead { display: none; }
  .data tr { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 10px; padding: 8px 14px; }
  .data td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); white-space: normal; text-align: right; }
  .data td:last-child { border-bottom: 0; }
  .data td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; }
  .data td.card-title { font-size: 16px; justify-content: flex-start; gap: 8px; padding-top: 4px; text-align: left; }
  .data td.card-action { justify-content: flex-end; }
  .data td.empty { justify-content: center; }
  .data .hide-m { display: none; }
  .show-m { display: inline-block; }
  .data tfoot tr { background: var(--red-soft); }

  /* vensters komen van onderen omhoog */
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; }
  .row { flex-wrap: wrap; }
  .dept-pick { grid-template-columns: repeat(2, 1fr); }
  .actions .btn { flex: 1; }
  .actions .grow { display: none; }
  input[type=text], input[type=email], input[type=password], input[type=time], input[type=number], input[type=date], select, textarea { font-size: 16px; } /* voorkomt inzoomen op iPhone */

  #toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .site-footer { display: none; }
  .auth { margin: 24px auto; padding: 22px; }
}

/* ---------- verlof ---------- */
.btn.danger { background: var(--over); border-color: var(--over); color: #fff; }
.btn.small.yes { border-color: var(--planned); color: var(--ok); }
.btn.small.yes:hover { background: var(--planned); color: var(--planned-ink); }
.btn.small.no:hover { border-color: var(--over); color: var(--over); }
.leave-list { display: grid; gap: 10px; }
.leave { padding: 14px 18px; border-left: 5px solid var(--border); }
.leave.lv-wait { border-left-color: var(--av-maybe-b); }
.leave.lv-yes { border-left-color: var(--planned); }
.leave.lv-no { border-left-color: var(--over); }
.leave.lv-talk { border-left-color: var(--av-eve-b); }
.lv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-name { font-size: 16px; }
.lv-dates { font-family: var(--f-ui); font-weight: 600; }
.lv-head .lv { margin-left: auto; }
.lv { font-family: var(--f-ui); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.lv.lv-wait { background: var(--av-maybe); color: var(--left); }
.lv.lv-yes { background: var(--av-yes); color: var(--ok); }
.lv.lv-no { background: var(--red-soft); color: var(--over); }
.lv.lv-talk { background: var(--av-eve); color: var(--av-eve-b); }
.lv-meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.lv-warn { margin: 8px 0 0; font-size: 13px; color: var(--left); }
.lv-answer { margin: 8px 0 0; font-size: 14px; background: var(--bg); border-radius: 8px; padding: 8px 12px; }
.lv-answer q { font-style: italic; }
.lv-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lv-foot .linkcell { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; }
#decideText { margin: 0 0 14px; }

/* ---------- keuken ---------- */
.k-legend { margin: 0 2px 10px; font-size: 13px; color: var(--ink); }
.k-cal .cal-day { border-left-width: 1px; min-height: 92px; overflow: hidden; }
.k-cal .cal-day.has { border-color: var(--av-eve-b); }
.k-cal .cal-day.past { opacity: .6; }
.k-chip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-ui); font-size: 11px; background: var(--bg); border-radius: 4px; padding: 1px 4px; }
.k-chip.done { text-decoration: line-through; color: var(--muted); }
.k-cal .hol-name { color: var(--over); }
.k-agenda { display: grid; gap: 14px; }
.k-day h3 { margin: 0 2px 6px; font-size: 15px; }
.k-day.past { opacity: .6; }
.k-day.is-today h3 { color: var(--accent); }
.k-day .card { overflow: hidden; }
.k-item { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.k-item:last-child { border-bottom: 0; }
.k-check { margin: 0; padding: 14px 4px 14px 16px; }
.k-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 12px 16px 12px 8px; }
.k-main:hover { background: var(--bg); }
.k-icon { font-size: 20px; }
.k-text { display: flex; flex-direction: column; min-width: 0; }
.k-text small { color: var(--muted); font-size: 13px; }
.k-item.done .k-text b { text-decoration: line-through; color: var(--muted); }
@media (max-width: 760px) {
  .k-cal .cal-day { min-height: 54px; }
  .k-cal .cal-day small { font-size: 11px; }
  .leave { padding: 12px 14px; }
  .lv-foot .btn { flex: 1; }
}

/* ---------- planning: voorkeur onder elke naam ---------- */
.month tr.has-pref th, .month tr.has-pref td { border-bottom: 0; }
.month tbody tr.pref { height: 22px; }
.month tr.pref th.name { font-size: 10px; font-weight: 400; color: var(--muted); font-style: italic; padding-left: 18px; }
.month tr.pref td { border-bottom: 1px solid var(--line); }
.pcell { display: flex; align-items: center; justify-content: center; height: 18px; margin: 0 2px 3px; border-radius: 4px; font-size: 9px; font-weight: 600; color: var(--b, var(--muted)); background: transparent; opacity: .75; }
.pcell.av-yes, .pcell.av-day, .pcell.av-eve, .pcell.av-no, .pcell.av-maybe, .pcell.av-leave { box-shadow: inset 0 -2px 0 var(--b); }
.pcell.av-no { color: var(--muted); }
.month .cell.clash { box-shadow: inset 0 0 0 2px var(--over); }
.month .cell.clash::after { content: '!'; position: absolute; top: 2px; right: 3px; font-size: 10px; font-weight: 700; color: var(--over); }
.month td .cell { position: relative; }
.sw.clash { background: var(--card); --b: var(--over); border-width: 2px; }
.pill.clash { box-shadow: inset 0 0 0 2px var(--over); }
.pill .why { color: var(--over); font-weight: 600; }

/* ---------- teamoverzicht ---------- */
.team-switch { margin: 24px 0 -12px; display: flex; justify-content: flex-end; }
.week-strip .day-pill { flex: 1 0 64px; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.t-box { padding: 14px 16px; }
.t-box h3 { margin: 0 0 8px; font-size: 16px; }
.t-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line-soft); width: 100%; }
.t-box h3 + .t-row { border-top: 0; }
.t-row b { flex: 1; min-width: 100px; }
.t-row > small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.t-time { font-family: var(--f-ui); font-weight: 600; }
.t-dept { font-family: var(--f-ui); font-size: 12px; background: var(--av-yes); color: var(--planned-ink); padding: 2px 8px; border-radius: 999px; }
.t-item { border: 0; border-top: 1px solid var(--line-soft); background: none; text-align: left; flex-wrap: nowrap; }
.t-item:hover { background: var(--bg); }
.t-item.done b { text-decoration: line-through; color: var(--muted); }
.t-empty { margin: 4px 0; font-size: 14px; }
.team-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 760px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-switch { margin: 16px 0 -8px; }
  .team-actions .btn { flex: 1; }
}
@media (max-width: 760px) {
  .month col.c-name { width: 96px; }
  .month .name { padding: 0 6px; font-size: 12px; }
  .month tr.pref th.name { padding-left: 10px; }
}

/* ---------- keuken: elders ingepland ---------- */
.cell.elsewhere { background: repeating-linear-gradient(135deg, var(--av-no), var(--av-no) 5px, var(--card) 5px, var(--card) 9px); }
.cell.elsewhere .dept { color: var(--muted); }
.sw.elsewhere { background: repeating-linear-gradient(135deg, var(--av-no-b) 0 2px, var(--card) 2px 4px); --b: var(--av-no-b); }
.pill.elsewhere { background: var(--av-no); color: var(--muted); }
.dept-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; }
.dept-checks label.check { margin: 0; }
textarea { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--input); color: var(--ink); font-size: 14px; }

/* ---------- events ---------- */
.ev-feest { --ev: #ed1c24; --ev-soft: var(--red-soft); }
.ev-uitvaart { --ev: #6b6f76; --ev-soft: var(--av-no); }
.ev-catering { --ev: #e08a00; --ev-soft: var(--av-maybe); }
.ev-overleg { --ev: #5c6bc0; --ev-soft: var(--av-eve); }
.ev-levering { --ev: #4c8a17; --ev-soft: var(--av-yes); }
.ev-bijzonder { --ev: #9c4dcc; --ev-soft: var(--av-leave); }
.ev-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.ev-kinds button { border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 8px 4px; font-size: 13px; font-weight: 600; }
.ev-kinds button.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
#eventForm label small { font-weight: 400; }

.ev-hero { display: flex; align-items: center; gap: 20px; padding: 20px 22px; border-radius: 16px; margin-bottom: 14px; color: #fff;
  background: linear-gradient(120deg, var(--ev), color-mix(in srgb, var(--ev) 60%, #000)); box-shadow: var(--shadow); }
.ev-hero[data-act] { cursor: pointer; }
.hero-count { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; background: rgba(255,255,255,.16); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--f-ui); }
.hero-count b { font-size: 36px; line-height: 1; }
.hero-count span { font-size: 12px; opacity: .9; }
.hero-main { min-width: 0; }
.hero-main small { text-transform: uppercase; letter-spacing: .08em; font-family: var(--f-ui); font-size: 11px; opacity: .85; }
.hero-main h2 { font-family: var(--f-hand); font-weight: 400; font-size: 32px; margin: 2px 0 4px; line-height: 1.1; }
.hero-main p { margin: 0; font-family: var(--f-ui); font-size: 14px; }
.hero-main .you { display: inline-block; margin-top: 8px; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 999px; }

.busy { padding: 14px 16px; margin-bottom: 14px; }
.busy-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.busy-head h3 { margin: 0; font-size: 15px; }
.busy-head span { font-size: 12px; }
.busy-grid { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.busy-day { border-radius: 8px; padding: 4px 0; text-align: center; font-family: var(--f-ui); background: var(--bg); display: flex; flex-direction: column; line-height: 1.2; cursor: default; }
.busy-day span { font-size: 10px; color: var(--muted); }
.busy-day b { font-size: 13px; }
.busy-day i { font-style: normal; font-size: 13px; min-height: 16px; }
.busy-day.lvl1 { background: #fde3e4; }
.busy-day.lvl2 { background: #f8a5a8; }
.busy-day.lvl3 { background: var(--red); color: #fff; }
.busy-day.lvl3 span { color: #fff; }
.busy-day.today { outline: 2px solid var(--ink); outline-offset: -2px; }
:root[data-theme="dark"] .busy-day.lvl1 { background: #3a1c1e; } :root[data-theme="dark"] .busy-day.lvl2 { background: #7a2a2e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .busy-day.lvl1 { background: #3a1c1e; } :root:not([data-theme="light"]) .busy-day.lvl2 { background: #7a2a2e; } }
.ev-filter { margin-bottom: 4px; flex-wrap: wrap; }
.ev-group { margin: 20px 2px 8px; font-size: 24px; }

.ticket { display: flex; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; border-left: 6px solid var(--ev); }
.ticket[data-act] { cursor: pointer; }
.ticket[data-act]:hover { box-shadow: 0 0 0 2px var(--ev); }
.ticket.past { opacity: .6; }
.stub { flex: 0 0 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ev-soft); font-family: var(--f-ui); border-right: 2px dashed var(--line); position: relative; }
.stub::before, .stub::after { content: ''; position: absolute; right: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); }
.stub::before { top: -8px; } .stub::after { bottom: -8px; }
.stub span { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.stub b { font-size: 28px; line-height: 1.1; color: var(--ev); }
.tk-body { flex: 1; min-width: 0; padding: 12px 16px; }
.tk-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-family: var(--f-ui); font-size: 12px; }
.tk-kind { color: var(--ev); font-weight: 600; }
.tk-when { margin-left: auto; background: var(--bg); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.ticket h3 { margin: 4px 0 6px; font-size: 18px; }
.tk-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-ui); font-size: 13px; }
.tk-know { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.tk-know li { margin: 2px 0; }
.tk-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-family: var(--f-ui); font-size: 11px; background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.you { font-family: var(--f-ui); font-size: 12px; font-weight: 600; background: var(--planned); color: var(--planned-ink); padding: 3px 10px; border-radius: 999px; }
.ev-past { margin-top: 4px; }
@media (max-width: 760px) {
  .ev-hero { gap: 14px; padding: 16px; }
  .hero-count { width: 70px; height: 70px; }
  .hero-count b { font-size: 28px; }
  .hero-main h2 { font-size: 25px; }
  .busy-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .stub { flex-basis: 60px; }
  .stub b { font-size: 24px; }
  .tk-body { padding: 10px 12px; }
  .ev-kinds { grid-template-columns: repeat(2, 1fr); }
  .tk-when { margin-left: 0; }
}
.hero-main .you { color: #fff; }
@media (max-width: 760px) { .row > label.full-m { flex-basis: 100%; } }
.wr-done { font-family: var(--f-ui); font-size: 12px; color: var(--ok); font-weight: 600; text-align: right; }
.wr-stamp { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-family: var(--f-ui); margin-top: -6px; }
@media (max-width: 760px) {
  .wr-times input { flex: 1 1 0; width: 0; min-width: 0; }
  .wr-times .wr-hours { min-width: 0; flex: 0 0 auto; }
  .wr-action { justify-content: flex-start; }
  .wr-done { text-align: left; }
  .wr-stamp { margin-top: 0; }
}
