/* Tend – volunteer scheduling. Plain CSS, no build step required. */
:root {
    --brand: #e5007e;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #1f2430;
    --muted: #6b7280;
    --line: #e5e7eb;
    --ok: #15803d;
    --ok-bg: #dcfce7;
    --warn: #a16207;
    --warn-bg: #fef3c7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --sidebar: 250px;
    --surface-2: #f9fafb;
    --blue: #2563eb;
    --purple: #7c3aed;
    color-scheme: light;
}
/* Dark mode: follows the device unless someone picks Licht or Donker (data-theme on <html>, see the layouts). */
:root[data-theme="dark"] {
    --bg: #111318;
    --surface: #1b1e25;
    --surface-2: #232733;
    --text: #e8eaf0;
    --muted: #9aa1ad;
    --line: #2f3440;
    --ok-bg: #12321f;
    --ok: #6ee7a0;
    --warn-bg: #3a2d0c;
    --warn: #fcd34d;
    --danger-bg: #3b1515;
    --danger: #fca5a5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
    --blue: #60a5fa;
    --purple: #a78bfa;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111318;
        --surface: #1b1e25;
        --surface-2: #232733;
        --text: #e8eaf0;
        --muted: #9aa1ad;
        --line: #2f3440;
        --ok-bg: #12321f;
        --ok: #6ee7a0;
        --warn-bg: #3a2d0c;
        --warn: #fcd34d;
        --danger-bg: #3b1515;
        --danger: #fca5a5;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
        --blue: #60a5fa;
        --purple: #a78bfa;
        color-scheme: dark;
    }
}
@media print {
    :root:not(.x), :root[data-theme]:not(.x) { --bg: #fff; --surface: #fff; --surface-2: #f3f4f6; --text: #1f2430; --muted: #6b7280; --line: #e5e7eb; color-scheme: light; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }

/* Layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.topbar { display: none; }
.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 1.25rem 1rem;
    display: flex; flex-direction: column; gap: .25rem;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { font-weight: 800; font-size: 1.6rem; color: var(--text); letter-spacing: -.03em; }
.brand span { color: var(--brand); }
.brand:hover { text-decoration: none; }
.sidebar-org { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section a {
    color: var(--text); padding: .55rem .75rem; border-radius: 8px; display: flex; gap: .6rem; align-items: center;
}
.nav-section a:hover { background: var(--bg); text-decoration: none; }
.nav-section a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 600; }
.nav-section .ico { width: 1.2em; text-align: center; opacity: .8; }
.nav-title { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--muted); margin: 1.25rem .75rem .35rem; }
.sidebar-user { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.user-chip { display: flex; gap: .6rem; align-items: center; color: var(--text); }
.user-chip small { display: block; color: var(--muted); }
.link-button { background: none; border: 0; color: var(--muted); padding: 0; cursor: pointer; font: inherit; }
.link-button:hover { color: var(--brand); }

.content { padding: 2rem; max-width: 1200px; width: 100%; }
.content.is-wide { max-width: none; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; }
    .topbar {
        display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem;
        background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
    }
    .topbar-org { color: var(--muted); font-size: .85rem; margin-left: auto; }
    .menu-toggle { background: none; border: 0; font-size: 1.4rem; color: var(--text); cursor: pointer; }
    .sidebar { display: none; position: fixed; inset: 53px 0 0 0; height: auto; z-index: 19; }
    .sidebar.open { display: flex; }
    .sidebar-brand, .sidebar-org { display: none; }
    .content { padding: 1rem; }
}

/* Page building blocks */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }
.narrow { max-width: 680px; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .9rem; }
.row-bottom > .field { justify-content: flex-end; }
.empty { color: var(--muted); padding: 1rem 0; text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.danger-zone { margin-top: 1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: var(--brand); }
.stat-label { color: var(--muted); font-size: .9rem; }

/* Buttons & forms */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    border: 1px solid transparent; border-radius: 8px; padding: .55rem 1rem;
    font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(.93); }
.btn-light { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-light:hover { background: var(--bg); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-sm { padding: .3rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.disabled { opacity: .45; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: .3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .9rem; }
.field legend { margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=month],
input[type=number], input[type=search], select, textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem;
}
input[type=color] { width: 4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.error { color: var(--danger); }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; }
.checks-inline { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; }
.copy-field { display: flex; gap: .5rem; margin-bottom: .75rem; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .8rem; }

/* Alerts & badges */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1.25rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn { background: var(--warn-bg); color: var(--warn); margin: 1rem 0 .5rem; }
.badge {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
    background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--team, var(--brand)); vertical-align: middle; }
.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 2.2rem; height: 2.2rem; border-radius: 50%; font-weight: 700; font-size: .8rem;
    background: color-mix(in srgb, var(--brand) 15%, var(--surface)); color: var(--brand);
}
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }

/* Shift rows */
.shift-row {
    display: flex; gap: .9rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line);
}
.shift-row:first-of-type { border-top: 0; }
.shift-date {
    flex: none; width: 3.2rem; text-align: center; border-radius: 10px; padding: .3rem 0;
    background: color-mix(in srgb, var(--team, var(--brand)) 14%, var(--surface));
    border-left: 4px solid var(--team, var(--brand)); line-height: 1.1;
}
.shift-date .dow, .shift-date .mon { display: block; font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.shift-date .day { display: block; font-size: 1.25rem; font-weight: 700; }
.shift-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shift-body a { color: var(--text); }
.shift-body .people { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift-side { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.announcement + .announcement { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.announcement h3 { margin: 0; }
.announcement p { margin: .3rem 0 0; }
.prose { margin-top: .75rem; }

/* Month calendar */
.calendar {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem;
}
.cal-head { background: var(--surface); padding: .4rem; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-day { background: var(--surface); min-height: 96px; padding: .35rem; display: flex; flex-direction: column; gap: 3px; }
.cal-day.other-month { background: var(--bg); }
.cal-day.other-month .cal-num { color: var(--muted); }
.cal-day.today .cal-num { background: var(--brand); color: #fff; border-radius: 50%; width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; }
.cal-day.absent { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 6px, var(--bg) 6px, var(--bg) 12px); }
.cal-num { font-size: .85rem; font-weight: 600; }
.cal-shift {
    display: block; font-size: .75rem; padding: 2px 5px; border-radius: 5px; color: var(--text);
    background: color-mix(in srgb, var(--team) 18%, var(--surface)); border-left: 3px solid var(--team);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-absent { font-size: .72rem; color: var(--muted); font-style: italic; }
.month-nav { display: flex; gap: .75rem; align-items: center; }
@media (max-width: 640px) {
    .cal-day { min-height: 64px; }
    .cal-shift { font-size: 0; height: 8px; padding: 0; }
}

/* Week schedule */
.week { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.week-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; display: flex; flex-direction: column; gap: .5rem; }
.week-day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.week-day-head { display: flex; flex-wrap: wrap; gap: 0 .4rem; align-items: baseline; position: relative; padding-right: 1.2rem; }
.week-day-head .add { position: absolute; right: 0; top: 0; }
.week-shift {
    display: flex; flex-direction: column; font-size: .82rem; color: var(--text); padding: .45rem .55rem;
    border-radius: 8px; background: color-mix(in srgb, var(--team) 12%, var(--surface)); border-left: 4px solid var(--team);
}
.week-shift:hover { text-decoration: none; filter: brightness(.97); }
.week-shift.is-mine { outline: 2px solid var(--brand); }
.week-shift .time { color: var(--muted); font-size: .75rem; }
.week-shift .person.open { color: var(--brand); font-style: italic; }
@media (max-width: 860px) { .week { grid-template-columns: 1fr; } }

/* Lists & tables */
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.people-list li:first-child { border-top: 0; }
.people-list li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.people-list li.open .avatar { background: var(--bg); color: var(--muted); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.person-card { display: flex; gap: .9rem; align-items: center; margin: 0; }
.person-card > div { display: flex; flex-direction: column; min-width: 0; }
.person-card a { overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.list-row:first-of-type { border-top: 0; }
.list-row > div { display: flex; flex-direction: column; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 0 0 1rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.table-wrap { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); }
tbody tr:hover { background: color-mix(in srgb, var(--bg) 60%, transparent); }
tfoot th { border-bottom: 0; }
th.right, td.right { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pagination { display: flex; justify-content: center; gap: 1rem; align-items: center; margin: 1rem 0; }

/* Guest pages */
body.guest { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem;
    background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--brand) 18%, var(--bg)), var(--bg) 60%); }
.guest-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.08); padding: 2rem; }
.guest-brand { text-align: center; font-size: 2.4rem; }
@media (max-width: 640px) {
    .stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
    .stat { padding: .7rem; }
    .stat-value { font-size: 1.3rem; }
    .stat-label { font-size: .75rem; line-height: 1.2; display: block; }
    .shift-row { flex-wrap: wrap; }
    .shift-body { flex-basis: calc(100% - 4.5rem); }
    .shift-side { flex-basis: 100%; }
    .shift-side:empty { display: none; }
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }

/* Avatars & user management */
.avatar-photo { object-fit: cover; padding: 0; background: var(--bg); }
.avatar-xl { width: 5.5rem; height: 5.5rem; font-size: 1.6rem; }
.avatar-sm { width: 1.6rem; height: 1.6rem; font-size: .62rem; }
.photo-edit { display: flex; gap: 1.25rem; align-items: flex-start; }
.name-cell { display: flex; gap: .6rem; align-items: center; }
.nowrap { white-space: nowrap; }
form.inline { display: inline; margin-left: .75rem; }
.status-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-left: 4px solid var(--ok); }
.status-bar > div { display: flex; flex-direction: column; }
.status-bar.is-inactive { border-left-color: var(--danger); background: var(--danger-bg); }

/* Roster (Roosterbeheer) */
.roster-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; }
.roster-title { display: flex; align-items: center; gap: 1rem; }
.roster-title h1 { font-size: 1.35rem; }
.roster-actions { display: flex; gap: .75rem; }
.btn-icon { padding: .55rem .7rem; color: var(--brand); }

.week-strip { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.75rem; }
.week-arrow {
    flex: none; width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #2563eb; color: #fff;
}
.week-arrow:hover { filter: brightness(1.1); }
.week-tabs { display: flex; gap: .25rem; overflow-x: auto; }
.week-tab { display: flex; flex-direction: column; align-items: center; padding: .55rem .9rem; border: 2px solid transparent; border-radius: 6px; color: var(--text); white-space: nowrap; }
.week-tab strong { color: var(--blue); text-decoration: underline; font-weight: 700; }
.week-tab:hover { background: var(--surface); text-decoration: none; }
.week-tab.is-current { border-color: var(--text); background: var(--surface); }
.week-tab.is-current strong { color: var(--text); text-decoration: none; }
.week-tab.is-today:not(.is-current) span::after { content: " •"; color: var(--brand); }

.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.group-card {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .95rem 1.1rem;
    background: var(--surface); color: var(--text); font-weight: 600; border-radius: 6px; box-shadow: var(--shadow);
    border-left: 5px solid transparent;
}
.group-card:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.group-card.is-selected { border-left-color: var(--team, var(--brand)); }
.group-check {
    flex: none; width: 1.1rem; height: 1.1rem; border-radius: 4px; border: 1.5px solid var(--line);
    display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; color: #fff;
}
.group-card.is-selected .group-check { background: #2563eb; border-color: #2563eb; }

.roster-wrap { background: var(--surface); border-radius: 6px; box-shadow: var(--shadow); overflow-x: auto; }
.roster-grid { min-width: 1100px; }
.roster-row { display: grid; grid-template-columns: 170px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.roster-row:last-child { border-bottom: 0; }
.roster-header { background: var(--bg); }
.roster-header .roster-cell { text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; color: var(--muted); text-align: center; padding: .9rem .4rem; }
.roster-header .roster-label { text-align: left; padding-left: 1.5rem; }
.roster-cell { padding: .7rem .2rem; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.roster-cell.is-today { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.roster-header .roster-day.is-today { color: var(--brand); font-weight: 700; }
.roster-label { flex-direction: row; align-items: flex-start; gap: .7rem; padding-left: 1rem; }
.shift-code {
    flex: none; min-width: 2rem; height: 2rem; padding: 0 .3rem; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--team); color: #fff; font-size: .72rem; font-weight: 700;
}
.shift-time { color: var(--text); font-size: .95rem; }
.roster-shift, .roster-shift-link { display: flex; flex-direction: column; gap: .35rem; color: var(--text); }
.roster-shift form { margin: 0; }
button.person-chip { width: 100%; font: inherit; font-size: .88rem; cursor: pointer; }
.person-chip.is-open.is-join { font-style: normal; font-weight: 600; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
a.person-chip.is-join:hover, .person-chip.is-join:hover { text-decoration: none; }
.person-chip.is-join:hover { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-style: solid; }
.person-chip.is-open:not(.is-join) { color: var(--muted); }
.roster-shift-link:hover { text-decoration: none; }
.roster-shift-link:hover .person-chip { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.person-chip {
    display: flex; align-items: center; gap: .3rem; padding: .25rem .35rem; min-height: 2.1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: .88rem; position: relative;
}
/* Every chip (person, + Aanmelden, Open plek) has exactly the same height. */
.person-chip { height: 2.25rem; min-height: 0; flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; line-height: 1; }
.person-chip .person-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.person-chip.is-mine { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.person-chip.is-open { border-style: dashed; color: var(--brand); justify-content: center; font-style: italic; background: transparent; }
.chip-tag { flex: none; font-size: .62rem; font-weight: 700; color: #fff; border-radius: 3px; padding: .12rem .28rem; line-height: 1; }
.tag-swap { background: #d97706; }
.tag-inactive { background: #6b7280; }
.chip-warn { color: #d97706; font-size: .85rem; }
.person-chip .chip-warn { position: absolute; top: -.55rem; right: -.2rem; }
.shift-note { font-size: .75rem; color: var(--muted); }
.roster-add { align-self: center; color: var(--muted); opacity: 0; padding: .4rem; }
.roster-cell:hover .roster-add { opacity: 1; }
.roster-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-top: 1rem; }
.roster-legend .person-chip { display: inline-flex; height: 1.8rem; }
.print-only { display: none; }

@media (max-width: 860px) {
    .week-arrow { width: 2.4rem; height: 2.4rem; }
    .week-tab { padding: .4rem .5rem; font-size: .85rem; }
    .roster-grid { min-width: 900px; }
    .roster-row { grid-template-columns: 150px repeat(7, minmax(0, 1fr)); }
}

@media print {
    @page { size: A4 landscape; margin: 10mm; }
    body { background: #fff; font-size: 10px; }
    .shell { display: block; }
    .sidebar, .topbar, .no-print, .alert { display: none !important; }
    .content { padding: 0; max-width: none; }
    .print-only { display: block; margin: 0 0 .5rem; }
    /* Open places print as empty boxes to write a name in by hand. */
    .person-chip.is-open, .person-chip.is-open.is-join { display: block; width: 100%; min-height: 24px; border: 1px solid #555; border-radius: 3px;
        background: #fff; color: transparent; font-size: 0; }
    .person-chip.is-open * { display: none; }
    .chip-tag { font-size: 7px; padding: 0 2px; line-height: 1.4; }
    .person-chip { flex-wrap: nowrap; }
    .person-chip.is-mine { box-shadow: none; border-color: var(--line); }
    .roster-shift form { display: block; }
    .screen-inline { display: none; }
    .roster-wrap { box-shadow: none; overflow: visible; }
    .roster-grid { min-width: 0; }
    .roster-row { grid-template-columns: 120px repeat(7, minmax(0, 1fr)); break-inside: avoid; }
    .person-chip { height: auto; min-height: 0; padding: 1px 3px; font-size: 9px; }
    .avatar-sm { display: none; }
    .roster-title h1 { font-size: 16px; }
    .roster-title svg { width: 24px; height: 24px; }
    .roster-head { margin-bottom: 4px; }
    .roster-header .roster-cell { padding: 4px; font-size: 9px; }
    .roster-label { padding-left: 4px; gap: 4px; font-size: 9px; }
    .shift-time { font-size: 9px; white-space: nowrap; }
    .shift-code { min-width: 20px; height: 20px; font-size: 8px; }
    .roster-cell { padding: 4px 2px; gap: 2px; }
    .roster-shift { gap: 2px; }
    .roster-cell.is-today { background: none; }
    a { color: inherit; }
}

/* Client section in the user form */
.client-box { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.client-box legend { font-weight: 700; padding: 0 .3rem; }
.field .label { font-weight: 600; font-size: .9rem; }
[hidden] { display: none !important; }

.title-with-action { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.contact-box { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: .9rem; }
.contact-box legend { font-weight: 700; padding: 0 .3rem; }

/* Clients */
.client-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .35rem 0 0; }
.tabs { display: flex; gap: .25rem; box-shadow: inset 0 -2px 0 var(--line); margin-bottom: 1.25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: .65rem 1rem; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; flex-shrink: 0; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { font-size: .75rem; background: var(--bg); border-radius: 999px; padding: 0 .45rem; margin-left: .2rem; }
.care-card summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; list-style: none; }
.care-card summary::-webkit-details-marker { display: none; }
.care-card[open] summary { margin-bottom: 1rem; }
.care-type { font-size: .75rem; font-weight: 700; color: #fff; border-radius: 4px; padding: .15rem .45rem; }
.care-type.care-hospice { background: var(--brand); }
.care-type.care-home_watch { background: #7c3aed; }
.readonly-value { margin: 0; padding: .55rem 0; }
.watch-shift { display: grid; grid-template-columns: 11rem 1fr; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); align-items: start; }
.watch-shift:first-of-type { border-top: 0; }
.watch-shift.is-past { opacity: .6; }
.watch-when { display: flex; flex-direction: column; }
.watch-people { display: flex; flex-direction: column; gap: .35rem; }
.watch-people .person-chip form { margin-left: auto; }
.log-entry { padding: .75rem 0; border-top: 1px solid var(--line); }
.log-entry:first-child { border-top: 0; padding-top: 0; }
.log-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .25rem; }
.text-brand { color: var(--brand); }
@media (max-width: 640px) { .watch-shift { grid-template-columns: 1fr; } }

.care-badges { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.care-badge { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; border-radius: 999px; padding: .15rem .6rem;
    border: 1.5px solid; white-space: nowrap; background: var(--surface); }
.care-badge strong { font-weight: 700; }
.care-badge.care-hospice { color: var(--brand); border-color: var(--brand); }
.care-badge.care-home_watch { color: var(--purple); border-color: var(--purple); }
.care-badge.is-waiting { border-style: dashed; background: var(--warn-bg); }

.watch-card { border-left: 4px solid #7c3aed; }
.watch-client { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.watch-client:first-of-type { border-top: 0; }
.watch-client > div:first-child { display: flex; flex-direction: column; gap: .2rem; }
.watch-log p { margin: 0 0 .5rem; }
@media (max-width: 860px) { .watch-client { grid-template-columns: 1fr; } }

/* Guest meals */
.guest-table td { padding: .35rem .75rem; }
.guest-table tr.is-sunday { background: color-mix(in srgb, #f59e0b 8%, transparent); }
.guest-table tr.outside-stay td:first-child strong { color: var(--muted); font-weight: 500; }
.guest-table tr.is-locked { color: var(--muted); }
.num-input { width: 4.5rem !important; }
.money-input { width: 9rem !important; }
.start-care { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .75rem; margin-bottom: 1rem; border-radius: 8px; background: var(--ok-bg); }
.new-invoice h2 { margin-bottom: 1rem; }
.new-invoice-grid { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(170px, 1fr) minmax(220px, 1.4fr) auto; gap: 1rem 1.5rem; align-items: start; }
.new-invoice-grid select, .new-invoice-grid input[type=month] { height: 2.65rem; padding-top: 0; padding-bottom: 0; }
.new-invoice-submit { align-self: end; }
.new-invoice-grid fieldset.field { gap: .45rem; }
.new-invoice-grid fieldset .check { font-weight: 400; }
.new-invoice-submit .btn { height: 2.65rem; }
.new-invoice-help { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); }
@media (max-width: 1000px) { .new-invoice-grid { grid-template-columns: 1fr 1fr; } .new-invoice-submit { grid-column: 1 / -1; } }
@media (max-width: 640px) { .new-invoice-grid { grid-template-columns: 1fr; } }
.invoice-settings { max-width: 46rem; }

/* Central site (tend.nl): sign-up, finding your hospice, platform management */
.guest-card.guest-card-wide { max-width: 1100px; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.divider { border: 0; border-top: 1px solid var(--line); margin: .5rem 0; width: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 .75rem; background: var(--bg); color: var(--muted);
    border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; white-space: nowrap; font-size: .95rem; }
.find-hospice summary { cursor: pointer; color: var(--brand); text-align: center; margin-bottom: .75rem; }
.platform-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.platform-actions form { margin: 0; }
.trial-banner { background: var(--warn-bg); color: var(--warn); padding: .55rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }

/* Beheer > Pakket */
.section-title { margin: 1.75rem 0 .75rem; }
.checklist { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .4rem; }
.checklist li { padding-left: 1.5rem; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; align-items: stretch; }
.module-card { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.module-info { display: flex; flex-direction: column; flex: 1; }
.module-info .checklist { margin-bottom: 1rem; }
.module-status { margin-top: auto; }
.module-status p { margin-bottom: 0; }
.module-tagline { font-weight: 600; color: var(--brand); margin: 0 0 .5rem; }
.module-request { max-width: 32rem; }
.module-preview { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--bg); }
.module-preview figcaption { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; }
.module-preview table { width: 100%; font-size: .9rem; background: var(--surface); border-radius: 8px; overflow: hidden; }
.module-preview td, .module-preview th { padding: .45rem .6rem; }
.module-preview tr.is-missing td { color: var(--warn); background: var(--warn-bg); }


/* Kookdienst module */
.menu-card.is-missing { border-left: 4px solid var(--warn); }
.menu-card.is-late { border-left-color: var(--danger); }
.kitchen-deadline { margin: 0 0 1rem; }
.kitchen-deadline .badge { margin-left: .4rem; }
.kitchen-week tr.is-missing .missing { color: var(--warn); font-weight: 600; }
.kitchen-week tr.is-free td { padding-top: .5rem; padding-bottom: .5rem; }
.kitchen-settings { margin-top: 1.25rem; max-width: 48rem; }
.menu-prompt { border-left: 4px solid var(--brand); }

/* Weekmenu on paper: portrait A4, large readable text, empty lines where a menu is missing. */
@page weekmenu { size: A4 portrait; margin: 14mm; }
@media print {
    .kitchen-print { page: weekmenu; font-size: 12pt; }
    .kitchen-print-head h1 { font-size: 20pt; margin: 0 0 2mm; }
    .kitchen-print-head p { margin: 0 0 6mm; color: #444; }
    .kitchen-week { box-shadow: none; border: 0; }
    .kitchen-week table { width: 100%; border-collapse: collapse; }
    .kitchen-week th, .kitchen-week td { border: 1px solid #999; padding: 3mm; vertical-align: top; font-size: 11pt; }
    .kitchen-week th { background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .kitchen-week tr { break-inside: avoid; }
    .kitchen-week tr.is-free td { color: #666; }
    .kitchen-week small { color: #444; }
    .write-lines { display: block; height: 16mm; background: repeating-linear-gradient(transparent 0 7mm, #999 7mm calc(7mm + 1px)); }
    .kitchen-print-foot { display: block; margin-top: 4mm; font-size: 8pt; color: #666; }
}

/* Berichten (#55) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-badge { margin-left: auto; background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; min-width: 1.3rem; text-align: center; }
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 4rem); min-height: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.chat-list { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.chat-list-head h1 { font-size: 1.25rem; margin: 0; }
.chat-item { display: flex; gap: .7rem; align-items: center; padding: .7rem 1rem; color: var(--text); border-bottom: 1px solid var(--line); text-decoration: none !important; }
.chat-item:hover { background: var(--bg); }
.chat-item.active { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.chat-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-last { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.is-unread .chat-item-title, .chat-item.is-unread .chat-item-last { color: var(--text); font-weight: 700; }
.chat-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; color: var(--muted); }
.chat-unread { background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; }
.chat-group-icon { color: #fff; background: var(--muted); font-size: 1rem; }
.chat-privacy { margin-top: auto; padding: 1rem; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-pane-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.chat-pane-head h2 { margin: 0; font-size: 1.1rem; }
.chat-pane-head > div { flex: 1; min-width: 0; }
.chat-pane-head small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: none; font-size: 1.6rem; line-height: 1; color: var(--text); text-decoration: none !important; }
.chat-group-settings { position: relative; }
.chat-group-settings summary { list-style: none; }
.chat-group-settings summary::-webkit-details-marker { display: none; }
.chat-group-panel { position: absolute; right: 0; top: 2.6rem; width: 300px; z-index: 5; display: grid; gap: 1rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem; background: var(--bg); }
.chat-day { text-align: center; margin: .8rem 0 .4rem; }
.chat-day span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; font-size: .75rem; color: var(--muted); }
.chat-message { display: flex; gap: .5rem; align-items: flex-end; max-width: 75%; }
.chat-message.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: .5rem .75rem; min-width: 0; }
.chat-message.is-mine .chat-bubble { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.chat-sender { display: block; font-size: .78rem; font-weight: 700; color: var(--brand); }
.chat-text { white-space: normal; overflow-wrap: anywhere; }
.chat-bubble time { display: block; text-align: right; font-size: .7rem; color: var(--muted); margin-top: .1rem; }
.chat-older { align-self: center; font-size: .85rem; }
.chat-empty { margin: auto; }
.chat-compose { display: flex; gap: .6rem; padding: .8rem 1rem; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-compose textarea { flex: 1; resize: none; max-height: 9rem; }
.chat-placeholder { margin: auto; text-align: center; color: var(--muted); padding: 2rem; display: grid; gap: 1rem; justify-items: center; }
.chat-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem; max-height: 50vh; overflow-y: auto; }
.chat-person { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.chat-person:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.chat-person[hidden] { display: none; }
@media (max-width: 900px) {
    .chat { grid-template-columns: 1fr; height: calc(100vh - 7rem); }
    .chat.has-open .chat-list { display: none; }
    .chat:not(.has-open) .chat-pane { display: none; }
    .chat-back { display: block; }
    .chat-message { max-width: 88%; }
}

/* Jaarplanning (#17) */
.event-month-block { margin-bottom: 1.5rem; }
.event-month-block h2 { font-size: 1.1rem; margin: 0 0 .6rem; padding-bottom: .3rem; border-bottom: 2px solid var(--line); }
.event { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .6rem; }
.card .event { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .7rem 0; margin: 0; }
.card .event:last-child { border-bottom: 0; }
.event.is-past { opacity: .6; }
.event.is-next { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.event-date { flex: 0 0 3.6rem; text-align: center; border-radius: 10px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand); padding: .35rem 0; line-height: 1.1; }
.event-dow, .event-month { display: block; font-size: .72rem; text-transform: uppercase; font-weight: 700; }
.event-day { display: block; font-size: 1.5rem; font-weight: 800; }
.event-body { min-width: 0; }
.event-body h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.event-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem 1rem; color: var(--muted); font-size: .9rem; }
.event-teams { margin: .4rem 0 0; font-size: .85rem; display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.event-teams .badge { background: transparent; border: 1px solid; }
.event-description { margin: .5rem 0 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .3rem .8rem; margin-top: .4rem; }
@media print { .event { break-inside: avoid; } .event.is-past { opacity: 1; } }

/* Aanwezigheid (#32) */
.attendance-team { border-left: 4px solid var(--team, var(--brand)); }
.attendance-day { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--line); }
.attendance-day.is-first { border-top: 0; }
.attendance-date { display: flex; flex-direction: column; }
.attendance-choice { display: flex; gap: .4rem; }
.attendance-choice form { margin: 0; }
.attendance-btn { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.attendance-btn.is-yes.is-chosen { background: var(--ok); border-color: var(--ok); color: #fff; }
.attendance-btn.is-no.is-chosen { background: var(--danger); border-color: var(--danger); color: #fff; }
.attendance-who { grid-column: 1 / -1; font-size: .9rem; }
.attendance-who summary { cursor: pointer; color: var(--brand); }
.attendance-who p { margin: .35rem 0 0; }
@media (max-width: 640px) { .attendance-day { grid-template-columns: 1fr; } }

/* Kilometerdeclaraties (#9) */
.mileage-check:empty { display: none; }
.mileage-check { margin: -.5rem 0 0; }
.mileage-check.is-off { color: var(--warn); font-weight: 600; }
.mileage-table tr.is-flagged td { background: var(--danger-bg); }
.mileage-review input { width: 11rem; padding: .35rem .5rem; font-size: .85rem; }

/* Briefpapier */
.letterhead-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.letterhead-preview .page-head { margin-bottom: .75rem; }
.letterhead-preview iframe { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.letterhead-logo img { max-height: 70px; max-width: 220px; }
.letterhead-page img { width: 140px; border: 1px solid var(--line); border-radius: 4px; }
[data-letterhead-form] input[type=color] { width: 4rem; height: 2.5rem; padding: .2rem; }
@media (max-width: 900px) { .letterhead-grid { grid-template-columns: 1fr; } .letterhead-preview iframe { height: 70vh; } }
.event-rsvp { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.event-attendees summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.event-attendees p { margin: .3rem 0 0; font-size: .9rem; }

/* Trainingen */
.training-choose h2 { margin-bottom: .2rem; }
.training-sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.training-session { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; cursor: pointer; }
.training-session:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.training-session span { display: flex; flex-direction: column; }
.training-session.is-disabled { opacity: .5; cursor: not-allowed; }
.training-session input { width: auto; margin-top: .2rem; }
.training-change summary { list-style: none; }
.training-change summary::-webkit-details-marker { display: none; }
.training-change[open] form { margin-top: .5rem; }
.session-rows .session-row { display: grid; grid-template-columns: 1.3fr .8fr .8fr 1.6fr .7fr; gap: .5rem; margin-bottom: .5rem; }
.session-rows .session-head { font-size: .8rem; font-weight: 600; color: var(--muted); }
@media (max-width: 760px) { .session-rows .session-row { grid-template-columns: 1fr 1fr; } .session-rows .session-head { display: none; } }

/* Nieuwsbrief */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.newsletter-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.newsletter-preview iframe { width: 100%; height: 80vh; min-height: 560px; border: 1px solid var(--line); border-radius: 8px; background: #f3f4f6; }
.newsletter-frame { width: 100%; min-height: 70vh; border: 0; border-radius: var(--radius); background: #f3f4f6; }
.newsletter-thumb { max-width: 220px; border-radius: 6px; display: block; margin-bottom: .4rem; }
.newsletter-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.newsletter-schedule { display: inline-flex; gap: .4rem; align-items: center; }
.newsletter-schedule input { width: auto; }
.newsletter-row { color: inherit; text-decoration: none; }
.newsletter-row:hover { text-decoration: none; background: color-mix(in srgb, var(--brand) 4%, transparent); }
.md-toolbar { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .35rem; }
.newsletter-editor #body { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
@media (max-width: 1000px) { .newsletter-editor { grid-template-columns: 1fr; } }

/* Weergave: licht / donker */
.sidebar-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .15rem .6rem; font: inherit; font-size: .8rem; cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-choice { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.page-eyebrow { margin: 0 0 .1rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }

/* Platformbeheer: facturatie */
.platform-tabs { margin-top: .5rem; }
.billing-run { margin-top: 1rem; }
.billing-show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.25rem; align-items: start; }
.billing-pdf { width: 100%; height: 80vh; min-height: 560px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.billing-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.billing-facts dt { color: var(--muted); }
.billing-facts dd { margin: 0; }
.billing-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.billing-settings .actions { grid-column: 1 / -1; }
@media (max-width: 900px) { .billing-show, .billing-settings { grid-template-columns: 1fr; } }

/* Keuken: dieetwensen per kamer en weekmenu samenstellen */
.diet-card { margin: 1rem 0; }
.diet-table { width: 100%; }
.diet-table th { text-align: left; padding: .45rem 1rem .45rem 0; vertical-align: top; }
.diet-table td { padding: .45rem 0; border-top: 1px solid var(--line); }
.diet-table tr:first-child td { border-top: 0; }
.diet-table .badge { margin: 0 .2rem .2rem 0; }
.week-compose .compose-day { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .75rem 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.week-compose .compose-day:first-of-type { border-top: 0; }
.week-compose .compose-day.is-past { opacity: .55; }
.compose-slot { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .5rem; }
.compose-slot + .compose-slot { margin-top: .5rem; }
.compose-slot textarea { min-height: 2.6rem; }
@media (max-width: 760px) { .week-compose .compose-day, .compose-slot { grid-template-columns: 1fr; } }
@media print { .diet-card { break-inside: avoid; border: 1px solid #ccc; } }
.price-table { width: 100%; border-collapse: collapse; margin-top: .3rem; }
.price-table th { font-size: .78rem; color: var(--muted); text-align: left; padding: .2rem .4rem; }
.price-table td { padding: .35rem .4rem; border-top: 1px solid var(--line); vertical-align: middle; }
.price-table input { max-width: 9rem; }
.platform-edit { max-width: 720px; margin: 0 auto; }

/* Weekmenu on paper: who eats along, per day per occupied room */
@media print {
    .meal-sheets { break-before: page; }
    .meal-sheets-title { font-size: 16pt; margin: 0 0 1mm; }
    .meal-sheets-help { margin: 0 0 4mm; font-size: 9pt; color: #444; }
    .meal-sheet { break-inside: avoid; margin-bottom: 5mm; }
    .meal-sheet h3 { font-size: 12pt; margin: 0 0 1.5mm; }
    .meal-sheet h3 span { font-weight: normal; font-size: 10pt; color: #333; }
    .meal-sheet table { width: 100%; border-collapse: collapse; }
    .meal-sheet th, .meal-sheet td { border: 1px solid #999; padding: 1.6mm 2mm; font-size: 9.5pt; vertical-align: middle; }
    .meal-sheet th { background: #eee !important; color: #000; text-align: center; font-size: 8.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .meal-sheet th:first-child { text-align: left; }
    .meal-room { width: 24%; }
    .meal-room small { display: block; font-size: 7.5pt; color: #333; line-height: 1.25; }
    .meal-box { text-align: center; font-size: 14pt; white-space: nowrap; width: 11%; }
    .meal-count { font-size: 8pt; }
    .meal-other { width: 28%; }
}
.rooms-table { max-width: 860px; } .rooms-table .inline-form { flex-wrap: nowrap; } .rooms-table input[name=name] { min-width: 14rem; }

/* Overdracht (#31) */
.handover-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.handover-entry { padding: .8rem 0; border-top: 1px solid var(--line); }
.handover-entry:first-of-type { border-top: 0; }
.handover-entry header { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.handover-entry p { margin: .3rem 0 0; }
.handover-entry.is-open { border-left: 3px solid var(--warn); padding-left: .75rem; }
.handover-entry.is-done > p { color: var(--muted); }
.handover-resolution { margin-top: .3rem; }
.handover-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: .4rem; }
.handover-tools input[type=text] { min-width: 14rem; }
.handover-action-check { align-self: center; }
.handover-open { position: sticky; top: 1rem; }
@media (max-width: 900px) { .handover-grid { grid-template-columns: 1fr; } .handover-open { position: static; order: -1; } }
.handover-dash { border-left: 4px solid var(--warn); margin-bottom: 1.25rem; }
.module-card .module-preview { margin-bottom: 1rem; }

/* Evaluatieformulier (#25) */
.evaluation-form { max-width: 640px; margin: 0 auto; }
.rating { display: flex; flex-wrap: wrap; gap: .35rem; }
.rating label { position: relative; }
.rating input { position: absolute; opacity: 0; }
.rating span { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 600; }
.rating input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.rating input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.tasks-dash { border-left: 4px solid var(--brand); margin-bottom: 1.25rem; }
.after-death { margin-bottom: 1.25rem; border-left: 4px solid var(--muted); }
.evaluation-answers { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.roster-mail-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: 1.25rem; } .roster-mail-bar > div:first-child { display: flex; flex-direction: column; }

/* Platform admin: full width with a top bar */
body.platform { background: var(--bg); min-height: 100vh; }
.platform-bar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.platform-bar-inner { max-width: 1320px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.platform-bar .brand { font-size: 1.45rem; }
.platform-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-left: 1rem; border-left: 1px solid var(--line); }
.platform-nav { display: flex; gap: .25rem; flex-wrap: wrap; flex: 1; }
.platform-nav a { padding: .45rem .8rem; border-radius: 8px; color: var(--text); font-weight: 600; font-size: .92rem; }
.platform-nav a:hover { background: var(--surface-2); text-decoration: none; }
.platform-nav a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.platform-user { display: flex; align-items: center; gap: .9rem; }
.platform-user form { margin: 0; }
.platform-main { max-width: 1320px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
.platform-main .page-head h1 { margin: 0; }
.platform-table td { vertical-align: top; }
.tenant-cell { display: flex; flex-direction: column; gap: .2rem; min-width: 14rem; }
.tenant-name { font-weight: 700; color: var(--text); }
.tenant-modules { display: flex; flex-wrap: wrap; gap: .25rem; margin: .15rem 0; }
.tenant-modules .badge { font-size: .7rem; }
.platform-actions-stack { flex-direction: column; align-items: stretch; min-width: 9.5rem; }
.platform-actions-stack .btn { width: 100%; justify-content: center; }
@media (max-width: 760px) {
    .platform-bar-inner { padding: .6rem 1rem; gap: .6rem; }
    .platform-label { display: none; }
    .platform-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .platform-user { margin-left: auto; }
    .platform-user .muted, .platform-me { font-size: 0; gap: 0; }
    .platform-main { padding: 1.25rem 1rem 2.5rem; }
}

/* Website CMS in platform admin */
.cms-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.cms-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.cms-form textarea#body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.55; }
.cms-title-cell { display: flex; gap: .75rem; align-items: flex-start; min-width: 18rem; }
.cms-thumb { width: 64px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--line); }
.cms-thumb-empty { display: block; }
.cms-title-cell .badge { margin-left: .3rem; font-size: .7rem; }
.cms-category { display: flex; gap: .4rem; align-items: center; margin: 0; }
.cms-category input[type=text] { flex: 1; min-width: 0; }
.cms-category input[type=number] { width: 3.4rem; padding-inline: .4rem; }
.cms-editor .md-toolbar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.cms-editor .md-toolbar label.btn { cursor: pointer; margin: 0; font-weight: 700; }
.cms-author { display: flex; gap: .75rem; align-items: center; }
.cms-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-weight: 700; flex-shrink: 0; }
.cms-cover-preview { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.link-button.danger { color: var(--danger, #c0392b); }
@media (max-width: 980px) {
    .cms-layout, .cms-form { grid-template-columns: 1fr; }
}

/* Platform: two-factor authentication */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
@media (max-width: 980px) { .account-grid { grid-template-columns: 1fr; } }
.security-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .8rem; }
.security-qr { margin: .6rem 0; width: 200px; padding: 10px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.security-qr svg { display: block; width: 100%; height: auto; }
.security-secret { font-size: .95rem; letter-spacing: .03em; word-break: break-all; }
.recovery-codes { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .8rem; }
.recovery-codes code { font-size: 1rem; }
.security-action { border-top: 1px solid var(--line); padding-top: 1rem; }
.platform-me { display: inline-flex; align-items: center; gap: .45rem; color: var(--text); font-weight: 600; font-size: .9rem; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; }
.platform-me:hover, .platform-me.active { background: var(--surface-2); text-decoration: none; }
.platform-me img, .platform-me span { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); font-size: .72rem; font-weight: 700; }
.invite-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: 1.25rem; }
.invite-bar h2 { flex-basis: 100%; margin: 0; }
.invite-bar .field { flex: 1 1 14rem; margin: 0; }

/* CMS: front page editor */
.home-editor { display: grid; gap: 1rem; max-width: 980px; }
.home-help { margin: 0; }
.home-section > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; list-style: none; }
.home-section > summary::-webkit-details-marker { display: none; }
.home-section > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.home-section[open] > summary::before { transform: rotate(90deg); }
.home-section[open] > summary { margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.home-row { display: grid; grid-template-columns: 14rem minmax(0, 1fr) auto; gap: .5rem; align-items: start; }
.home-row-feature { grid-template-columns: 11rem 14rem minmax(0, 1fr) auto; }
.home-row-audience { grid-template-columns: 12rem 14rem minmax(0, 1fr) auto; }
.home-row-faq { grid-template-columns: 18rem minmax(0, 1fr) auto; }
.home-row .link-button { padding: .55rem .3rem; }
.home-row [data-repeat-add] { justify-self: start; }
[data-repeater] > [data-repeat-add] { justify-self: start; align-self: flex-start; }
.home-image img { max-width: 420px; }
.home-actions { position: sticky; bottom: 0; display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
    .home-row, .home-row-feature, .home-row-audience, .home-row-faq { grid-template-columns: 1fr; }
}
tr.is-muted td { opacity: .55; }

/* Teamrooster: only my shifts / the whole roster */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented a { padding: .4rem .8rem; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.row.row-postcode { grid-template-columns: minmax(7rem, 1fr) minmax(0, 2.2fr); }
@media (max-width: 480px) { .row.row-postcode { grid-template-columns: 1fr; } }
