:root {
  --ink: #26352f; --muted: #66736d; --paper: #fbfaf6; --card: #fff;
  --green: #236b4b; --green-soft: #e5f2e9; --gold: #b27719; --gold-soft: #fff0ce;
  --red: #a33f39; --red-soft: #f9e4e1; --line: #dce3dd; --shadow: 0 4px 18px rgba(38,53,47,.09);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
html { background: var(--paper); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; }
button, input, select, .button { min-height: 48px; font: inherit; }
button, .button { border: 0; border-radius: 12px; cursor: pointer; font-weight: 750; padding: .7rem 1rem; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4c9c73; outline-offset: 2px; }
.primary { background: var(--green); color: #fff; }
.quiet { background: #edf2ee; color: var(--ink); white-space: nowrap; }
.eyebrow { color: var(--green); font-size: .76rem; font-weight: 850; letter-spacing: .12em; margin: 0 0 .2rem; text-transform: uppercase; }
h1 { font-family: Georgia, serif; font-size: clamp(1.5rem, 4vw, 2.15rem); line-height: 1.05; margin: 0; }
.muted { color: var(--muted); }
.topbar { align-items: center; background: rgba(251,250,246,.96); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: .8rem max(1rem, calc((100% - 1200px)/2)); position: sticky; top: 0; z-index: 20; }
.device-id { color: var(--muted); font-size: .7rem; margin: .2rem 0 0; }
.top-actions { align-items: center; display: flex; gap: .45rem; }.top-actions form { margin: 0; }
.access-mode { background: var(--gold-soft); border: 1px solid #dbbd7a; border-radius: 999px; color: #6f4709; font-size: .78rem; font-weight: 800; margin: 0; padding: .45rem .7rem; }
#app { margin: 0 auto; max-width: 1200px; padding: .8rem 1rem 5rem; }
.syncbar { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: .86rem; gap: .6rem 1.4rem; justify-content: space-between; min-height: 38px; }
.status-guide { background: #f2f5f2; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; font-size: .82rem; gap: .4rem 1rem; margin: .15rem 0 .55rem; padding: .55rem .7rem; }
.dot { background: #9ca59f; border-radius: 50%; display: inline-block; height: .7rem; width: .7rem; }
.dot.online { background: #27895b; }.dot.offline { background: var(--red); }
.controls { background: rgba(251,250,246,.98); padding: .2rem 0 .75rem; position: sticky; top: 69px; z-index: 15; }
.tabs { display: flex; gap: .45rem; overflow-x: auto; padding: .35rem 0 .65rem; scrollbar-width: thin; }
.tab { background: #edf2ee; color: var(--ink); flex: 0 0 auto; min-width: 52px; }
.tab.active { background: var(--ink); color: #fff; }
.filters { display: grid; gap: .6rem; grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr); }
label { display: grid; font-size: .86rem; font-weight: 720; gap: .3rem; }
input, select { background: #fff; border: 1px solid #aebbb3; border-radius: 12px; color: var(--ink); padding: .65rem .8rem; width: 100%; }
.school-filters { align-items: center; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: .25rem .75rem; margin: 0 0 .65rem; padding: .45rem .7rem .55rem; }
.school-filters legend { color: var(--muted); font-size: .78rem; font-weight: 800; padding: 0 .25rem; }
.school-filters label { align-items: center; display: flex; font-size: .82rem; gap: .35rem; min-height: 44px; padding: .15rem; }
.school-filters input { min-height: 24px; width: 24px; }
.summary { display: flex; flex-wrap: wrap; gap: .45rem; padding-top: .65rem; }
.summary button { border: 1px solid transparent; border-radius: 999px; font-size: .84rem; font-weight: 750; min-height: 44px; padding: .42rem .7rem; }
.summary button[aria-pressed="true"] { border-color: currentColor; box-shadow: inset 0 0 0 2px currentColor; }
.summary .AT_SCHOOL { background: #fff2c7; color: #6b5210; }.summary .AFWESIG { background: var(--red-soft); color: #762f2b; }.summary .BLY_BY_SKOOL { background: #e3effb; color: #20577d; }.summary .BY_LEKKER_LAND { background: var(--green-soft); color: #17563a; }.summary .BY_AKTIWITEIT { background: #eee7f8; color: #5b3a7d; }.summary .HUIS_TOE { background: #e8ecea; color: #35443e; }
.feedback { margin: .2rem 0 .6rem; min-height: 1.5rem; color: var(--green); font-weight: 700; }
.feedback.error { color: var(--red); }
.learner-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.learner-card { background: var(--card); border: 1px solid var(--line); border-left: 6px solid #9ca59f; border-radius: 14px; box-shadow: var(--shadow); padding: .9rem; }
.learner-card.status-AT_SCHOOL { border-left-color: #c99a18; }.learner-card.status-AFWESIG { border-left-color: var(--red); }.learner-card.status-BLY_BY_SKOOL { border-left-color: #327eb4; }.learner-card.status-BY_LEKKER_LAND { border-left-color: var(--green); }.learner-card.status-BY_AKTIWITEIT { border-left-color: #76539c; }.learner-card.status-HUIS_TOE { border-left-color: #52665e; }
.card-head { align-items: start; display: flex; justify-content: space-between; gap: .7rem; }
.card-head h2 { font-size: 1.08rem; line-height: 1.2; margin: 0; }
.school { color: var(--muted); font-size: .9rem; margin: .25rem 0 .7rem; }
.current { border-radius: 999px; flex: 0 0 auto; font-size: .78rem; font-weight: 800; padding: .36rem .55rem; }
.status-AT_SCHOOL .current { background: #fff2c7; color: #6b5210; }.status-AFWESIG .current { background: var(--red-soft); color: #762f2b; }.status-BLY_BY_SKOOL .current { background: #e3effb; color: #20577d; }.status-BY_LEKKER_LAND .current { background: var(--green-soft); color: #17563a; }.status-BY_AKTIWITEIT .current { background: #eee7f8; color: #5b3a7d; }.status-HUIS_TOE .current { background: #e8ecea; color: #35443e; }
.status-buttons { display: grid; gap: .35rem; grid-template-columns: repeat(3, 1fr); }
.status-button { background: #f0f3f1; color: var(--ink); font-size: .78rem; line-height: 1.05; padding: .45rem .25rem; }
.status-button[aria-pressed="true"] { box-shadow: inset 0 0 0 3px currentColor; }
.inline-activity { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .7rem; }
.inline-activity-title { font-size: .95rem; margin: 0 0 .5rem; }
.inline-schedule-list { display: grid; gap: .45rem; }
.inline-schedule-list > .muted { margin: 0 0 .35rem; }
.inline-schedule-list .schedule-card { background: #f8faf9; padding: .6rem; }
.inline-schedule-form { background: #f4f7f5; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: .5rem; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: .6rem; padding: .65rem; }
.inline-schedule-form > label:first-child, .inline-schedule-form > label:nth-child(2), .inline-schedule-form > label:nth-child(5), .inline-schedule-form > .inline-error, .inline-schedule-form > .form-actions { grid-column: 1/-1; }
.inline-schedule-form label span { font-size: .76rem; }
.inline-schedule-form .inline-error { margin: 0; }
.inline-schedule-form .form-actions { justify-content: stretch; }
.inline-schedule-form .form-actions button { width: 100%; }
.status-button[data-status="AT_SCHOOL"] { color: #6b5210; }.status-button[data-status="AFWESIG"] { color: #762f2b; }.status-button[data-status="BLY_BY_SKOOL"] { color: #20577d; }.status-button[data-status="BY_LEKKER_LAND"] { color: #17563a; }.status-button[data-status="BY_AKTIWITEIT"] { color: #5b3a7d; }.status-button[data-status="HUIS_TOE"] { color: #35443e; }
.note-row { display: grid; gap: .4rem; grid-template-columns: minmax(0,1fr) auto; margin-top: .65rem; }.note-save { background: #e6ece8; color: var(--ink); font-size: .78rem; }
.updated { color: var(--muted); font-size: .76rem; margin: .55rem 0 0; }
.empty { color: var(--muted); padding: 2rem; text-align: center; }
.toast { align-items: center; background: var(--ink); border-radius: 14px; bottom: max(1rem, env(safe-area-inset-bottom)); box-shadow: var(--shadow); color: #fff; display: flex; gap: .8rem; justify-content: space-between; left: 50%; max-width: calc(100% - 2rem); padding: .6rem .7rem .6rem 1rem; position: fixed; transform: translateX(-50%); width: 420px; z-index: 30; }
.toast[hidden] { display: none; }.toast button { background: #fff; color: var(--ink); }
.auth-shell { display: grid; min-height: 100vh; padding: 1rem; place-items: center; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); display: grid; gap: .9rem; max-width: 430px; padding: clamp(1.2rem, 5vw, 2rem); width: 100%; }
.auth-card h1 { margin-bottom: .4rem; }.check { align-items: center; display: flex; font-weight: 600; }.check input { min-height: 28px; width: 28px; }.form-error { background: var(--red-soft); color: #762f2b; padding: .7rem; border-radius: 10px; }.form-success { background: var(--green-soft); color: #17563a; padding: .7rem; border-radius: 10px; }
.security-note { color: var(--muted); font-size: .82rem; margin: -.55rem 0 0 2.5rem; }
.privacy-cover { align-content: center; background: #1f2e28; border-radius: 0; color: #fff; display: grid; gap: .7rem; inset: 0; justify-items: center; min-height: 100vh; padding: 2rem; position: fixed; width: 100%; z-index: 100; }
.privacy-cover[hidden] { display: none; }
.privacy-cover span { font-size: 3rem; }.privacy-cover strong { font-family: Georgia, serif; font-size: 2rem; }.privacy-cover small { font-size: 1rem; font-weight: 500; }
.app-dialog { background: var(--paper); border: 0; border-radius: 18px; box-shadow: 0 20px 70px rgba(20,30,26,.3); color: var(--ink); max-height: 90vh; max-width: min(900px, calc(100% - 1.5rem)); padding: 1rem; width: 100%; }.app-dialog::backdrop { background: rgba(23,34,29,.62); }
.dialog-head { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: .8rem; padding-bottom: .7rem; }.dialog-head h2, .add-form h3, .remove-section h3 { margin: 0; }
.add-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: .65rem; grid-template-columns: repeat(2,minmax(0,1fr)); padding: .8rem; }.add-form h3 { grid-column: 1/-1; }.add-form button { align-self: end; }
.remove-section { margin-top: 1.2rem; }.remove-section > .muted { margin: .25rem 0 .7rem; }.manage-list, .history-list { display: grid; gap: .5rem; margin-top: .7rem; }
.manage-row, .history-row { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: .7rem; justify-content: space-between; padding: .65rem .75rem; }.manage-row span { display: grid; gap: .15rem; }.manage-row small, .history-row time { color: var(--muted); font-size: .78rem; }.danger { background: var(--red-soft); color: #762f2b; }
.history-row { align-items: stretch; display: grid; }.history-row p { margin: 0; }.history-head { display: flex; gap: .7rem; justify-content: space-between; }
.button { display: inline-grid; place-items: center; text-decoration: none; }
.language-row { display: flex; justify-content: flex-end; margin-bottom: -.5rem; }
.view-switcher { background: #e7ede9; border-radius: 14px; display: grid; gap: .3rem; grid-template-columns: 1fr 1fr; margin: 0 auto .55rem; max-width: 460px; padding: .3rem; }
.view-switcher button { background: transparent; color: var(--ink); }
.view-switcher button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.dialog-body { max-height: calc(90vh - 78px); overflow-y: auto; overscroll-behavior: contain; padding: .1rem .15rem max(1rem, env(safe-area-inset-bottom)); }
.compact-dialog { max-width: 620px; }
.manager-toolbar, .route-controls { align-items: end; display: grid; gap: .65rem; grid-template-columns: minmax(0,2fr) auto; margin-bottom: .8rem; }
.route-controls { grid-template-columns: minmax(220px,2fr) repeat(4,minmax(120px,1fr)); }
.editor-form, .composer-grid { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: .7rem; grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: .8rem; padding: .8rem; }
.editor-form[hidden] { display: none; }
.external-fields, .override-fields { display: grid; gap: .7rem; grid-column: 1/-1; grid-template-columns: repeat(2,minmax(0,1fr)); }
.external-fields[hidden], .override-fields[hidden], .school-help[hidden], .parent-help[hidden] { display: none; }
.school-help, .parent-help, .inline-error { grid-column: 1/-1; margin: 0; }
.inline-error { color: var(--red); font-weight: 700; min-height: 1.2rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1/-1; }
.form-actions button { min-width: 130px; }
.activity-list, .schedule-list, .route-choice-list { display: grid; gap: .55rem; }
.activity-row, .schedule-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 13px; display: flex; gap: .75rem; justify-content: space-between; padding: .75rem; }
.activity-row.inactive, .schedule-card.inactive { opacity: .7; }
.activity-row h3, .schedule-card h3, .activity-row p, .schedule-card p { margin: 0; }
.activity-row p, .schedule-card p { color: var(--muted); font-size: .84rem; margin-top: .2rem; }
.activity-row > div:last-child, .schedule-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.activity-row button, .schedule-card button { min-height: 44px; }
.badge { background: var(--gold-soft); border-radius: 999px; color: #6f4709; display: inline-block; font-size: .75rem; font-weight: 800; margin-top: .35rem; padding: .3rem .5rem; }
.composer-grid { border: 2px dashed #aebbb3; grid-template-columns: 2fr repeat(4,1fr); margin-top: .8rem; }
.composer-grid .inline-error, .composer-grid .form-actions { grid-column: 1/-1; }
.route-grid { display: grid; gap: .65rem; }
.route-section-title { font-size: .9rem; letter-spacing: .05em; margin: .6rem 0 -.2rem; text-transform: uppercase; }
.route-section-title:first-child { margin-top: 0; }
.route-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.route-group.next { border-color: var(--green); border-left: 8px solid var(--green); box-shadow: 0 6px 22px rgba(35,107,75,.2); }
.route-group-head { align-items: center; background: var(--green-soft); border-bottom: 1px solid var(--line); display: flex; gap: .7rem; justify-content: space-between; padding: .65rem .8rem; }
.route-group-time { color: var(--green); font-size: 1.3rem; font-weight: 850; }
.route-group-head > div { align-items: center; display: flex; gap: .5rem; }
.route-group-count { background: var(--green); border-radius: 999px; color: #fff; font-size: .78rem; font-weight: 850; min-width: 1.7rem; padding: .18rem .45rem; text-align: center; }
.route-subgroup { border-bottom: 1px solid var(--line); padding: .55rem .65rem; }
.route-subgroup:last-child { border-bottom: 0; }
.route-subgroup > h3 { font-size: 1rem; margin: 0; }
.route-subgroup > p { color: var(--muted); font-size: .82rem; margin: .1rem 0 .4rem; }
.route-subgroup-items { display: grid; gap: .3rem; }
.route-card { align-items: center; background: #f8faf9; border: 1px solid var(--line); border-left: 5px solid #8c9992; border-radius: 10px; display: grid; gap: .6rem; grid-template-columns: minmax(0,1fr) minmax(150px,auto); padding: .55rem .65rem; }
.route-card.done { opacity: .72; }
.route-card h3 { font-size: 1.05rem; margin: 0; }.route-card small { color: var(--muted); display: block; }
.route-note { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 6px; color: var(--ink); font-size: .9rem; font-weight: 700 !important; margin-top: .45rem !important; overflow-wrap: anywhere; padding: .4rem .55rem; }
.reminder-card { align-items: start; background: #fff7dc; border: 3px solid #c47b00; border-radius: 12px; display: grid; gap: .55rem; grid-template-columns: auto minmax(0,1fr) auto; padding: .65rem; }
.reminder-card.done { background: #f1f4f2; border-color: #849189; opacity: .78; }
.reminder-card > :last-child { align-self: center; }
.reminder-taskbar { display: flex; justify-content: flex-end; margin: .35rem 0; }
.reminder-taskbar button { min-height: 44px; }
.driver-list { display: grid; gap: .45rem; margin-top: .8rem; }
.driver-row { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; }
.route-driver { align-items: center; background: #eef6f2; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; padding: .45rem .65rem; }
.driver-assignment { align-items: center; display: flex; gap: .4rem; margin: 0; }
.driver-assignment input { margin: 0; width: auto; }
.driver-assignment select { min-width: 10rem; padding: .3rem .45rem; }
.reminder-label { align-self: start; background: #7b2d00; border-radius: 999px; color: #fff; font-size: .76rem; letter-spacing: .04em; padding: .32rem .5rem; text-transform: uppercase; }
.reminder-card time { color: #7b2d00; font-size: 1.15rem; font-weight: 900; }
.reminder-card h3 { font-size: 1.05rem; margin: .1rem 0; }
.reminder-card p { font-size: 1rem; font-weight: 800; margin: .12rem 0; }
.reminder-card small { color: var(--muted); display: block; }
.reminder-card::after { color: #7b2d00; content: '⚠'; font-size: 1.35rem; grid-column: 1; grid-row: 2; text-align: center; }
.route-complete { min-height: 52px; width: 100%; }
.choice-card { align-items: start; background: #fff; border: 1px solid var(--line); color: var(--ink); display: grid; gap: .2rem; text-align: left; }
.choice-card small { color: var(--muted); }.wide { margin-top: .7rem; width: 100%; }
@media (min-width: 621px) and (max-width: 1050px) {
  .route-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }.route-controls > :first-child { grid-column: 1/-1; }
  .composer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.top-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 620px) {
  .topbar { align-items: stretch; flex-direction: column; gap: .55rem; padding: .65rem .8rem; position: static; }.topbar h1 { font-size: 1.4rem; }.top-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }.top-actions button, .top-actions form button { font-size: .78rem; padding: .5rem .4rem; width: 100%; }
  #app { padding-left: .7rem; padding-right: .7rem; }.controls { position: static; }
  .filters { grid-template-columns: 1fr; }.learner-grid { grid-template-columns: 1fr; }
  .status-buttons { gap: .3rem; grid-template-columns: repeat(2, 1fr); }.status-button { font-size: .78rem; }
  .school-filters { gap: 0 .6rem; }.add-form { grid-template-columns: 1fr; }.add-form h3 { grid-column: auto; }.app-dialog { border-radius: 12px; inset: 0; margin: auto; max-height: 96vh; max-width: calc(100% - .5rem); padding: .7rem; }.dialog-body { max-height: calc(96vh - 72px); }.history-head { display: grid; gap: .2rem; }
  .top-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }.manager-toolbar, .editor-form, .composer-grid, .external-fields, .override-fields { grid-template-columns: 1fr; }
  .route-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .route-controls > label:first-child { grid-column: 1/-1; }
  .route-controls > button { grid-column: 1/-1; }
  .manager-toolbar > *, .editor-form > *, .composer-grid > *, .external-fields > *, .override-fields > * { grid-column: 1; }
  .route-card { align-items: start; grid-template-columns: 1fr; }.route-card > :last-child { grid-column: auto; }.route-group-head { padding: .45rem .55rem; }.route-subgroup { padding: .4rem .45rem; }.route-group-time { font-size: 1.15rem; }
  .activity-row, .schedule-card { align-items: stretch; flex-direction: column; }.activity-row > div:last-child, .schedule-actions { justify-content: stretch; }.activity-row button, .schedule-card button { flex: 1; }
}

/* Compact operational density */
button, input, select, .button { min-height: 36px; }
button, .button { border-radius: 8px; padding: .35rem .55rem; }
.topbar { padding: .4rem max(.6rem, calc((100% - 1200px)/2)); }
.top-actions { gap: .25rem; }
.top-actions button, .top-actions form button { padding: .3rem .45rem; }
.access-mode { padding: .24rem .4rem; }
#app { padding: .4rem .6rem 2rem; }
.syncbar { font-size: .78rem; gap: .3rem .7rem; min-height: 24px; }
.status-guide { border-radius: 8px; gap: .2rem .5rem; margin: .08rem 0 .3rem; padding: .25rem .35rem; }
.controls { padding: .1rem 0 .35rem; }
.tabs { gap: .25rem; padding: .15rem 0 .3rem; }
.tab { min-width: 42px; }
.filters { gap: .3rem; }
label { font-size: .8rem; gap: .15rem; }
input, select { border-radius: 8px; padding: .32rem .45rem; }
.school-filters { border-radius: 8px; gap: .1rem .4rem; margin-bottom: .3rem; padding: .2rem .35rem; }
.school-filters label { gap: .2rem; min-height: 30px; padding: 0; }
.school-filters input { min-height: 18px; width: 18px; }
.summary { gap: .22rem; padding-top: .3rem; }
.summary button { min-height: 32px; padding: .2rem .4rem; }
.feedback { margin: .1rem 0 .3rem; min-height: .9rem; }
.learner-grid { gap: .4rem; }
.learner-card { padding: .45rem; }
.card-head { gap: .35rem; }
.school { font-size: .82rem; margin: .12rem 0 .35rem; }
.current { padding: .18rem .32rem; }
.status-buttons { gap: .18rem; }
.status-button { font-size: .74rem; min-height: 32px; padding: .2rem .18rem; }
.inline-activity { margin-top: .35rem; padding-top: .35rem; }
.inline-activity-title { margin-bottom: .25rem; }
.inline-schedule-list { gap: .25rem; }
.inline-schedule-list > .muted { margin-bottom: .18rem; }
.inline-schedule-toggle { margin-top: .2rem; width: 100%; }
.inline-schedule-list .schedule-card { padding: .3rem; }
.inline-schedule-form { gap: .25rem; margin-top: .3rem; padding: .35rem; }
.note-row { gap: .2rem; margin-top: .3rem; }
.updated { margin-top: .25rem; }
.auth-card { gap: .45rem; padding: clamp(.8rem, 3vw, 1.2rem); }
.app-dialog { padding: .5rem; }
.dialog-head { margin-bottom: .4rem; padding-bottom: .35rem; }
.add-form, .editor-form, .composer-grid { gap: .35rem; padding: .4rem; }
.remove-section { margin-top: .6rem; }
.manage-list, .history-list { gap: .25rem; margin-top: .35rem; }
.manage-row, .history-row { gap: .35rem; padding: .32rem .4rem; }
.view-switcher { border-radius: 8px; gap: .15rem; margin-bottom: .3rem; padding: .15rem; }
.manager-toolbar, .route-controls { gap: .35rem; margin-bottom: .4rem; }
.editor-form, .composer-grid { margin-bottom: .4rem; }
.external-fields, .override-fields { gap: .35rem; }
.form-actions { gap: .25rem; }
.activity-list, .schedule-list, .route-choice-list { gap: .3rem; }
.activity-row, .schedule-card { gap: .4rem; padding: .4rem; }
.activity-row button, .schedule-card button { min-height: 36px; }
.badge { margin-top: .18rem; padding: .15rem .3rem; }
.composer-grid { margin-top: .4rem; }
.route-grid { gap: .35rem; }
.route-section-title { margin-top: .3rem; }
.route-card { gap: .4rem; padding: .4rem; }
.route-note { margin-top: .22rem !important; padding: .2rem .3rem; }
.route-complete { min-height: 38px; }
.wide { margin-top: .35rem; }
@media (max-width: 620px) {
  .topbar { gap: .3rem; padding: .35rem .5rem; }
  .top-actions { gap: .2rem; }
  .top-actions button, .top-actions form button { padding: .28rem .25rem; }
  #app { padding-left: .45rem; padding-right: .45rem; }
  .status-buttons { gap: .18rem; }
  .school-filters { gap: 0 .35rem; }
  .app-dialog { padding: .4rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* Attendance UX refresh */
button, input, select, .button { min-height: 44px; }
.today-date { color: var(--muted); font-size: .92rem; font-weight: 750; margin: .22rem 0 0; text-transform: capitalize; }
.brand { align-items: center; display: flex; gap: .65rem; min-width: 0; }
.brand-logo { flex: 0 0 auto; height: 54px; object-fit: contain; width: 54px; }
.brand-copy { min-width: 0; }
.brand-copy .eyebrow { margin: 0; }
.header-reminder { white-space: nowrap; }
.app-menu-wrap { position: relative; }
.menu-toggle { font-size: 1.35rem; min-width: 48px; }
.app-menu { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(20,30,26,.2); display: grid; gap: .2rem; min-width: 220px; padding: .4rem; position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40; }
.app-menu form { margin: 0; }
.menu-action { background: transparent; color: var(--ink); text-align: left; width: 100%; }
.menu-action:hover, .menu-action:focus-visible { background: #edf2ee; }
.filter-row { align-items: end; display: grid; gap: .55rem; grid-template-columns: minmax(190px,.8fr) minmax(240px,2fr); }
.school-filter-wrap { position: relative; }
.school-filter-toggle { width: 100%; }
.school-filters { background: #fff; box-shadow: var(--shadow); display: grid; left: 0; max-height: min(60vh,420px); min-width: min(360px,calc(100vw - 1.4rem)); overflow-y: auto; position: absolute; top: calc(100% + .3rem); z-index: 25; }
.school-filter-actions { display: grid; gap: .35rem; grid-template-columns: 1fr 1fr; width: 100%; }
.search-filter { min-width: 0; }
.status-buttons { grid-template-columns: repeat(4,minmax(0,1fr)); }
.status-all { display: grid; gap: .35rem; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: .35rem; }
.status-button { min-height: 44px; }
.saved-note { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 8px; font-weight: 750; margin: .55rem 0 0; overflow-wrap: anywhere; padding: .5rem .65rem; }
.card-details { display: grid; gap: .45rem; margin-top: .55rem; }
.note-toggle { justify-self: start; }
.note-editor { display: grid; gap: .4rem; grid-template-columns: minmax(0,1fr) auto; }
.inline-activity { margin-top: 0; }
.learner-grid { background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: block; overflow: hidden; }
.learner-row { background: var(--card); border: 0; border-bottom: 1px solid var(--line); border-left: 5px solid #9ca59f; border-radius: 0; box-shadow: none; padding: .55rem .65rem; }
.learner-row:last-child { border-bottom: 0; }
.learner-row.status-AT_SCHOOL { border-left-color: #c99a18; }.learner-row.status-AFWESIG { border-left-color: var(--red); }.learner-row.status-BLY_BY_SKOOL { border-left-color: #327eb4; }.learner-row.status-BY_LEKKER_LAND { border-left-color: var(--green); }.learner-row.status-BY_AKTIWITEIT { border-left-color: #76539c; }.learner-row.status-HUIS_TOE { border-left-color: #52665e; }
.learner-row-head { align-items: start; display: flex; gap: .65rem; justify-content: space-between; }
.learner-identity { min-width: 0; }.learner-identity h2 { font-size: 1.08rem; line-height: 1.2; margin: 0; }.learner-identity .school { margin: .12rem 0 0; }
.learner-row .current { font-size: .8rem; padding: .42rem .58rem; }
.learner-activity-summary { color: #365f4c; font-size: .84rem; font-weight: 750; margin: .3rem 0 0; }
.learner-row .saved-note { font-size: .84rem; margin: .3rem 0 0; padding: .35rem .5rem; }
.learner-row .status-buttons { display: grid; gap: .3rem; grid-template-columns: repeat(5,minmax(0,1fr)); margin-top: .45rem; }
.learner-row .status-button { min-width: 0; padding: .35rem .4rem; }
.learner-utility-actions { display: flex; gap: .35rem; margin-top: .35rem; }
.learner-utility-actions button { flex: 0 1 auto; }
.learner-row .note-editor, .learner-activity-panel { border-top: 1px solid var(--line); margin-top: .45rem; padding-top: .45rem; }
.learner-row .updated { margin: .3rem 0 0; }
@media (min-width: 900px) { .learner-row { align-items: center; display: grid; gap: .3rem .65rem; grid-template-columns: minmax(220px,1fr) minmax(520px,1.8fr); }.learner-row-head { grid-column: 1; }.learner-row .status-buttons { grid-column: 2; grid-row: 1; margin-top: 0; }.learner-activity-summary,.learner-row .saved-note,.learner-utility-actions,.learner-row .note-editor,.learner-activity-panel,.learner-row .updated { grid-column: 1/-1; } }
.updated { text-align: right; }
@media (max-width: 620px) {
  button, input, select, .button { min-height: 48px; }
  .topbar { align-items: center; flex-direction: row; position: sticky; }
  .topbar .brand { min-width: 0; }
  .brand-logo { height: 42px; width: 42px; }
  .brand-copy .eyebrow { font-size: .68rem; }
  .today-date { font-size: .78rem; }
  .top-actions { display: flex; width: auto; }
  .top-actions button, .top-actions form button { min-height: 48px; }
  .header-reminder { font-size: .78rem; padding-left: .55rem; padding-right: .55rem; }
  .app-menu { max-height: calc(100vh - 90px); overflow-y: auto; position: fixed; right: .5rem; top: 64px; }
  .controls { position: sticky; top: 63px; }
  .filter-row { grid-template-columns: 1fr; }
  .school-filters { position: fixed; left: .5rem; right: .5rem; top: 126px; }
  .tabs { scroll-snap-type: x proximity; }
  .tab { scroll-snap-align: start; }
  .summary { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
  .summary button { flex: 0 0 auto; min-height: 44px; }
  .status-buttons { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-all { grid-template-columns: 1fr 1fr; }
  .status-button { min-height: 48px; }
  .learner-row { padding: .5rem; }
  .learner-row .status-buttons { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .learner-utility-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .learner-utility-actions button { width: 100%; }
  .note-editor { grid-template-columns: 1fr; }
  .note-save { width: 100%; }
}
/* Individual accounts reuse the familiar register colours and touch sizes. */
#account-app { padding: 1rem; }
#account-app > .auth-card { max-width: 760px; margin: 1rem auto; }
#account-app > p, #account-app > h2 { max-width: 760px; margin: 1rem auto; }
#account-app label { overflow-wrap: anywhere; }
.account-toolbar { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; }
.account-toolbar h2:empty { display: none; }
.account-toolbar button { padding: .5rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
@media(max-width:600px) { .topbar:has(+ #account-app) { flex-wrap: wrap; gap: .5rem; } #account-app { padding: .65rem; } }
