:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  font-synthesis: none;
  --brand: #1948b8;
  --brand-dark: #123789;
  --brand-soft: #eaf0ff;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe5ef;
  --line-soft: #edf1f6;
  --surface: #fff;
  --surface-soft: #f8faff;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(29, 48, 83, .08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 8% 0, rgba(25, 72, 184, .08), transparent 26rem), #f4f7fb;
  color: var(--ink);
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: none; }
button, input, select, textarea { font: inherit; }
code { padding: 2px 5px; border-radius: 6px; background: #f0f3f8; color: #344054; }
.wrap { width: min(1880px,calc(100% - 20px)); max-width: none; margin: 0 auto; padding: 8px 0 24px; }
.narrow-page { max-width: 860px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 7px; }
.app-header { position: relative; overflow: hidden; padding: 9px 14px; border: 1px solid #dce4f2; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
.app-header::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--brand); }
.top h1 { margin: 0 0 1px; font-size: clamp(19px,1.8vw,24px); line-height: 1.08; letter-spacing: -.02em; }
.eyebrow { margin-bottom: 3px; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.app-header .muted { line-height: 1.3; }
.app-header .btn { min-height: 34px; padding: 6px 10px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.toolbar form { display: inline-flex; margin: 0; }
.icon { flex: 0 0 auto; width: 17px; height: 17px; }
.btn .icon + span, .btn span + .icon { margin-left: 7px; }
.btn.icon-action { width: 38px; padding-inline: 0; }
.btn.icon-action .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid #cfd7e4; border-radius: 10px; background: #fff; color: #344054; font-weight: 700; line-height: 1.2; cursor: pointer; transition: border-color .15s ease,background .15s ease,color .15s ease,transform .15s ease,box-shadow .15s ease; }
.btn:hover { border-color: #aebbd0; background: var(--surface-soft); color: #1d2939; }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.active { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(25,72,184,.2); }
.btn.primary:hover, .btn.active:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }
.btn.danger { border-color: #f2b8b5; color: var(--danger); }
.btn.danger:hover { border-color: #ef8e88; background: #fff3f2; }
.select, .input, textarea { width: auto; min-height: 42px; border: 1px solid #cfd7e4; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s ease,box-shadow .15s ease,background .15s ease; }
.select:focus, .input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(25,72,184,.12); }
.input:disabled, .select:disabled { background: #f2f4f7; color: #667085; }
textarea { width: 100%; min-height: 124px; resize: vertical; }
input[type="checkbox"] { width: 17px; height: 17px; margin: 0 7px 0 0; accent-color: var(--brand); vertical-align: -3px; }
input[type="color"] { min-height: 42px; padding: 5px; }
.notice { padding: 12px 14px; border: 1px solid #b9d7c6; border-radius: 11px; margin: 12px 0; background: #ecfdf3; color: #067647; font-size: 13px; line-height: 1.45; }
.notice.error { border-color: #fecdca; background: #fef3f2; color: var(--danger); }
.notice.warn { border-color: #fedf89; background: #fffaeb; color: #b54708; }
.calendar-controls { margin-bottom: 7px; padding: 7px 10px; }
.calendar-controls > .controls-body { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-controls-toggle { display: none; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; }
.main-filters { flex: 1 1 auto; }
.pdf-filters { flex: 0 0 auto; padding-left: 14px; border-left: 1px solid var(--line); }
.filters label { display: inline-flex; align-items: center; font-size: 13px; font-weight: 650; }
.filters details { position: relative; }
.filters summary { list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.calendar-filter-options { position: absolute; top: calc(100% + 7px); left: 0; z-index: 20; display: grid; grid-template-columns: repeat(2,minmax(190px,1fr)); gap: 4px 14px; width: min(560px,82vw); max-height: 430px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 18px 38px rgba(29,48,83,.18); }
.calendar-filter-options label { display: flex; min-height: 34px; padding: 6px 7px; border-radius: 7px; }
.calendar-filter-options label:hover { background: var(--brand-soft); }
.month-switcher { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-bottom: 5px; padding: 5px 7px; }
.month-switcher > strong { color: #344054; font-size: 15px; text-align: center; }
.month-switcher > div { display: flex; justify-content: flex-end; gap: 8px; }
.month-switcher > .btn:first-child { justify-self: start; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.weekday { padding: 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.day { min-height: clamp(88px,calc((100vh - 218px)/6),118px); overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 8px rgba(29,48,83,.025); }
.day.outside { opacity: .5; background: #f8fafc; }
.day.today { border: 2px solid var(--brand); box-shadow: 0 0 0 3px rgba(25,72,184,.08); }
.day-number { margin-bottom: 4px; color: #344054; font-size: 11px; font-weight: 800; }
.event-pill { position: relative; display: block; overflow: hidden; margin: 3px 0; padding: 4px 6px; border-left: 4px solid var(--color); border-radius: 6px; background: #f8fafc; color: var(--ink); font-size: 10px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.event-pill.editable { cursor: pointer; }
.event-pill.editable:hover { background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1px rgba(25,72,184,.18); }
.event-pill.has-conflict { padding-right: 25px; background: #fff1f0; box-shadow: inset 0 0 0 1px #fda29b; }
.participation-counts { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.participant-stat { display: inline-flex; align-items: center; gap: 5px; }
.participant-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; color: #fff; font-size: 10px; font-weight: 850; line-height: 1; box-shadow: 0 1px 3px rgba(29,48,83,.2); }
.participant-confirmed { background: #067647; }
.participant-maybe { background: #b54708; }
.participant-rejected { background: #b42318; }
.participant-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.event-pill.has-participants { padding-right: 75px; }
.event-pill.has-participants.has-conflict { padding-right: 94px; }
.event-pill .compact-counts { position: absolute; top: 50%; right: 3px; z-index: 1; transform: translateY(-50%); }
.event-pill.has-conflict .compact-counts { right: 22px; }
.event-pill .participant-count { min-width: 17px; height: 17px; padding: 0 3px; font-size: 9px; box-shadow: none; }
.conflict-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #d92d20; color: #fff; font-size: 12px; font-weight: 900; line-height: 1; vertical-align: -3px; box-shadow: 0 1px 3px rgba(180,35,24,.25); }
.event-pill .conflict-icon { position: absolute; top: 50%; right: 4px; width: 15px; height: 15px; font-size: 10px; transform: translateY(-50%); }
.event-row-conflict { margin-inline: -8px; padding-inline: 8px; border-left: 3px solid #d92d20; background: #fff8f7; }
.list-card { overflow: hidden; }
.day-section { padding: 15px 18px; border-top: 1px solid var(--line-soft); }
.day-section:first-child { border-top: 0; }
.day-section h2 { margin: 0 0 8px; color: #344054; font-size: 14px; }
.event-row { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 16px; padding: 11px 0; border-top: 1px dashed #dfe5ed; }
.event-row:first-of-type { border-top: 0; }
.event-title { font-weight: 750; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.badge { padding: 4px 9px; border: 1px solid #e1e7ef; border-radius: 999px; background: #f5f7fa; color: #475467; font-size: 12px; }
.table-wrap { overflow: auto; }
.vehicle-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.vehicle-table th, .vehicle-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; text-align: left; }
.vehicle-table th { position: sticky; top: 0; z-index: 1; background: #f6f8fb; color: #344054; font-weight: 800; }
.vehicle-table tbody tr:hover { background: #fafbfe; }
.vehicle-table input[type="text"] { width: 150px; }
.vehicle-table .center { text-align: center; }
.conflict { background: #fff7f7 !important; }
.vehicle-conflict-cell { background: #fee4e2 !important; box-shadow: inset 0 0 0 2px #f04438; }
.vehicle-conflict-cell input { outline: 2px solid rgba(180,35,24,.22); outline-offset: 2px; }
.conflict-legend { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: #7a271a; font-size: 13px; font-weight: 650; }
.conflict-dot { width: 12px; height: 12px; border: 2px solid #f04438; border-radius: 3px; background: #fee4e2; }
.conflict-badge { display: inline-flex; margin-left: 7px; padding: 2px 7px; border: 1px solid #fda29b; border-radius: 999px; background: #fee4e2; color: #b42318; font-size: 11px; font-weight: 800; }
.vehicle-picker { margin: 18px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.vehicle-picker legend { padding: 0 7px; color: #344054; font-size: 13px; font-weight: 800; }
.vehicle-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px; }
.vehicle-options label { display: flex; align-items: center; min-height: 40px; padding: 8px 10px; border: 1px solid #e1e7ef; border-radius: 9px; background: #fff; color: #344054; font-size: 13px; font-weight: 650; cursor: pointer; }
.vehicle-options label:has(input:checked) { border-color: #9ab3ef; background: var(--brand-soft); color: var(--brand-dark); }
.vehicle-options label span { display: grid; gap: 2px; min-width: 0; }
.vehicle-availability { color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.35; }
.vehicle-availability.is-free { color: #067647; }
.vehicle-options label.vehicle-option-conflict { border-color: #fda29b; background: #fff1f0; color: #b42318; }
.vehicle-option-conflict .vehicle-availability { color: #b42318; }
.live-state { display: inline-flex; align-items: center; gap: 4px; color: #067647; font-weight: 750; }
.live-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px rgba(18,183,106,.12); }
.form-card { max-width: 760px; margin: 22px auto; padding: 24px; }
.form-card > h1, .form-card > h2, .form-card > h3 { margin: 0 0 8px; letter-spacing: -.015em; }
.form-card > h1 { font-size: 25px; }
.form-card > h2 { font-size: 20px; }
.form-card > h3 { font-size: 16px; }
.event-detail-card { max-width: 760px; }
.event-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.event-detail-heading h2 { margin: 12px 0 4px; font-size: 24px; line-height: 1.2; }
.rich-text { line-height: 1.55; }
.rich-text p { margin: 0 0 .75em; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text ul,.rich-text ol { margin: .5em 0 .75em; padding-left: 1.4em; }
.rich-text a { color: var(--brand); text-decoration: underline; }
.event-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 22px 0 0; border-top: 1px solid var(--line); }
.event-details > div { padding: 14px 8px; border-bottom: 1px solid var(--line-soft); }
.event-details dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.event-details dd { margin: 0; color: #344054; font-size: 14px; line-height: 1.5; }
.event-details .event-detail-wide { grid-column: 1 / -1; }
.event-detail-actions { margin-top: 18px; }
.detail-counts { flex-wrap: wrap; gap: 12px; }
.detail-counts .participant-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; color: #475467; font-size: 12px; white-space: normal; }
.conflict-notice { display: flex; align-items: center; gap: 10px; border-color: #fda29b; background: #fff1f0; color: #b42318; }
.audit-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.audit-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.audit-heading h3 { margin: 0; color: #344054; font-size: 16px; }
.audit-heading .muted { font-size: 11px; text-align: right; }
.audit-empty { margin: 13px 0 0; }
.audit-list { position: relative; display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.audit-list::before { content: ""; position: absolute; top: 9px; bottom: 9px; left: 5px; width: 2px; background: #dce3ed; }
.audit-entry { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 11px; padding: 0 0 17px; color: #344054; font-size: 13px; }
.audit-entry:last-child { padding-bottom: 0; }
.audit-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px #9ab3ef; }
.audit-meta { margin-top: 2px; color: var(--muted); font-size: 11px; }
.audit-detail { margin-top: 5px; color: #475467; line-height: 1.45; }
.training-test-page { max-width: 1560px; }
.training-readonly { border-color: #b2ddff; background: #eff8ff; color: #175cd3; }
.training-controls { margin-bottom: 10px; padding: 12px 14px; }
.training-controls .filters { align-items: end; }
.training-controls label { display: grid; gap: 5px; color: #344054; font-size: 12px; font-weight: 750; }
.training-controls .training-merge { display: flex; align-items: center; min-height: 42px; }
.training-controls .training-year { width: 104px; }
.training-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.training-stats .card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.training-stats span { color: var(--muted); font-size: 12px; font-weight: 700; }
.training-stats strong { color: var(--brand); font-size: 22px; }
.training-overview-card { overflow: hidden; }
.training-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.training-section-head h2 { margin: 0 0 4px; font-size: 18px; }
.training-section-head p { margin: 0; color: var(--muted); font-size: 12px; }
.training-table-wrap { overflow: auto; }
.training-matrix { width: 100%; min-width: 1080px; border-collapse: collapse; }
.training-matrix th,.training-matrix td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); font-size: 12px; text-align: center; }
.training-matrix thead th { position: sticky; top: 0; z-index: 1; background: #f6f8fb; color: #475467; font-size: 11px; }
.training-matrix th:first-child { width: 300px; text-align: left; }
.training-matrix tbody th { color: #344054; }
.training-matrix tbody th small { display: block; margin: 3px 0 0 25px; color: var(--muted); font-weight: 500; }
.training-matrix tbody tr:not(.training-detail-row):hover { background: #f8faff; }
.training-row-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.training-chevron { color: var(--brand); font-size: 20px; line-height: .8; transition: transform .15s ease; }
.training-row-toggle[aria-expanded="true"] .training-chevron { transform: rotate(90deg); }
.training-total { background: #f4f7fb; color: var(--brand-dark); font-weight: 850; }
.training-detail-row td { padding: 0 12px 12px 38px; background: #fbfcfe; text-align: left; }
.training-dates { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-left: 3px solid var(--brand); }
.training-dates span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #475467; font-size: 11px; }
.training-matrix tfoot th,.training-matrix tfoot td { background: #eef2f8; color: #344054; font-weight: 850; }
.training-empty { padding: 32px 18px; color: var(--muted); text-align: center; }
.status-page { max-width: 1040px; }
.status-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.status-summary .card { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; }
.status-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.status-summary strong { font-size: 24px; }
.status-summary .status-good strong { color: #067647; }
.status-summary .status-bad strong { color: #b42318; }
.status-list { overflow: hidden; }
.status-list-head { padding: 18px; border-bottom: 1px solid var(--line); }
.status-list-head h2 { margin: 0 0 4px; font-size: 18px; }
.status-list-head p { margin: 0; color: var(--muted); font-size: 12px; }
.status-row { display: grid; grid-template-columns: 14px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.status-row:last-child { border-bottom: 0; }
.status-row .badge { margin-left: 8px; }
.status-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.status-row time { color: var(--muted); font-size: 11px; }
.status-indicator { width: 11px; height: 11px; margin-top: 4px; border-radius: 50%; background: #98a2b3; box-shadow: 0 0 0 3px rgba(152,162,179,.14); }
.status-indicator.ok { background: #12b76a; box-shadow: 0 0 0 3px rgba(18,183,106,.14); }
.status-indicator.error { background: #f04438; box-shadow: 0 0 0 3px rgba(240,68,56,.14); }
.transport-test-page { max-width: 1180px; }
.transport-controls { margin-top: 12px; padding: 14px 18px; }
.transport-controls .field { max-width: 500px; margin: 0; }
.transport-id-row { display: grid; grid-template-columns: minmax(140px,1fr) auto; gap: 8px; }
.transport-event { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 18px; }
.transport-event h2 { margin: 9px 0 0; font-size: 21px; }
.transport-mapping { margin-top: 12px; padding: 20px; }
.transport-mapping h2 { margin: 0 0 5px; font-size: 18px; }
.transport-question-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.transport-question-grid > label { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: #344054; font-size: 12px; font-weight: 750; }
.transport-question-grid small { color: var(--muted); font-weight: 400; }
.transport-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 12px 0; }
.transport-stats .card { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.transport-stats span { color: var(--muted); font-size: 12px; font-weight: 750; }
.transport-stats strong { color: var(--brand-dark); font-size: 24px; }
.transport-table-card { margin-top: 12px; overflow: hidden; }
.transport-table-wrap { overflow-x: auto; }
.transport-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.transport-table th,.transport-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.transport-table thead th,.transport-table tfoot th,.transport-table tfoot td { background: #eef2f8; color: #344054; font-weight: 800; }
.transport-table tbody th { min-width: 180px; }
.transport-table tbody td:nth-child(n+3):nth-child(-n+7) { text-align: center; }
.transport-invalid { background: #fff6f5; color: #912018; }
.state-badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: 10px; font-weight: 800; white-space: nowrap; }
.state-confirmed { background: #dcfae6; color: #067647; }
.state-maybe { background: #fef0c7; color: #b54708; }
.state-rejected { background: #fee4e2; color: #b42318; }
.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; color: #344054; font-size: 13px; font-weight: 750; }
.field .input, .field .select { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-page { max-width: 1040px; }
.settings-page .form-card { max-width: none; margin: 16px 0; }
.settings-page .form-card > .card { margin: 14px 0 !important; padding: 18px !important; box-shadow: none; background: var(--surface-soft); }
.settings-page .form-card > form.card h3 { margin-top: 0; }
.permission-card { padding-bottom: 0; }
.permission-calendars { display: grid; gap: 9px; margin: 18px 0; }
.permission-calendar { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.permission-calendar[open] { border-color: #b6c5df; box-shadow: 0 4px 14px rgba(29,48,83,.06); }
.permission-calendar > summary { display: grid; grid-template-columns: minmax(230px,.8fr) minmax(280px,1.2fr) 24px; gap: 14px; align-items: center; min-height: 64px; padding: 13px 15px; list-style: none; cursor: pointer; }
.permission-calendar > summary::-webkit-details-marker { display: none; }
.permission-calendar > summary:hover { background: var(--surface-soft); }
.permission-calendar-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.source-badge { display: inline-flex; padding: 2px 7px; border-radius: 999px; background: #eef2f7; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.permission-selection { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.accordion-chevron { color: var(--brand); font-size: 21px; font-weight: 800; text-align: center; transition: transform .18s ease; }
.permission-calendar[open] .accordion-chevron { transform: rotate(180deg); }
.permission-calendar-body { padding: 15px; border-top: 1px solid var(--line-soft); background: var(--surface-soft); }
.permission-tools { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.permission-tools label { flex: 1 1 360px; color: #344054; font-size: 12px; font-weight: 750; }
.permission-tools .input { display: block; width: 100%; margin-top: 5px; }
.group-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 310px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; gap: 5px; }
.group-options label { display: flex; align-items: center; min-height: 42px; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; color: #344054; font-size: 13px; cursor: pointer; }
.group-options label:hover { border-color: #d6deea; background: #f8faff; }
.group-options label:has(input:checked) { border-color: #9ab3ef; background: var(--brand-soft); color: var(--brand-dark); }
.group-options label span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.group-options small { color: var(--muted); font-size: 10px; }
.permission-empty { padding: 12px 4px 2px; }
.permission-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 0 -24px; padding: 14px 24px; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-card { position: relative; width: min(480px,100%); overflow: hidden; padding: 32px; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--brand); }
.login-card h1 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.025em; }
.login-card .btn.primary { width: 100%; margin-top: 20px; }
.login-card textarea + .btn { width: 100%; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.brand-mark::before { content: "VKD"; display: grid; width: 38px; height: 28px; place-items: center; border-radius: 8px; background: var(--brand); color: #fff; font-size: 10px; letter-spacing: .06em; }
.section-intro { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.footer { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width:760px) {
  .wrap { width: calc(100% - 8px); padding: 4px 0 18px; }
  .app-header { align-items: center; gap: 7px; padding: 6px 7px 6px 10px; }
  .header-identity { min-width: 0; }
  .eyebrow, .app-header .muted { display: none; }
  .top h1 { overflow: hidden; margin: 0; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .toolbar { flex: 0 0 auto; gap: 3px; }
  .toolbar .btn { width: 32px; min-height: 32px; padding: 0; border-radius: 8px; }
  .toolbar .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toolbar .icon { width: 16px; height: 16px; }
  .calendar-controls { padding: 0; }
  .mobile-controls-toggle { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; list-style: none; color: #344054; font-size: 13px; font-weight: 750; cursor: pointer; }
  .mobile-controls-toggle .controls-chevron { margin-left: auto; font-size: 18px; transition: transform .15s ease; }
  .calendar-controls.is-open .controls-chevron { transform: rotate(180deg); }
  .calendar-controls:not(.is-open) > .controls-body { display: none !important; }
  .calendar-controls > .controls-body { align-items: stretch; flex-direction: column; gap: 8px; padding: 0 8px 8px; border-top: 1px solid var(--line-soft); }
  .main-filters, .pdf-filters { width: 100%; }
  .main-filters { padding-top: 8px; }
  .pdf-filters { padding: 7px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .calendar-filter-options { position: static; grid-template-columns: 1fr; width: 100%; max-height: 300px; margin-top: 7px; box-shadow: none; }
  .calendar-grid { gap: 3px; }
  .weekday { padding: 3px; font-size: 10px; }
  .month-switcher { grid-template-columns: 34px 1fr auto; gap: 4px; padding: 3px 4px; }
  .month-switcher > strong { grid-column: 2; grid-row: 1; font-size: 14px; }
  .month-switcher > .btn:first-child { grid-column: 1; grid-row: 1; width: 34px; }
  .month-switcher > div { grid-column: 3; grid-row: 1; gap: 4px; }
  .month-switcher .month-arrow, .month-switcher .today-button { width: 34px; min-height: 32px; padding: 0; }
  .month-button-label, .today-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btn span + .icon { margin-left: 0; }
  .day { min-height: 62px; padding: 4px; border-radius: 7px; }
  .day-number { margin-bottom: 3px; font-size: 9px; }
  .event-pill { height: 9px; padding: 0; border-left-width: 0; background: var(--color); font-size: 0; }
  .event-pill.has-conflict { height: 14px; padding: 0; background: #fee4e2; }
  .event-pill .conflict-icon { right: 1px; width: 12px; height: 12px; font-size: 8px; }
  .event-pill.has-participants { height: 14px; padding: 0 20px 0 0; }
  .event-pill.has-participants.has-conflict { padding-right: 34px; }
  .event-pill .compact-counts { right: 1px; }
  .event-pill.has-conflict .compact-counts { right: 15px; }
  .event-pill .compact-counts .participant-stat-maybe, .event-pill .compact-counts .participant-stat-rejected { display: none; }
  .event-pill .participant-count { min-width: 12px; height: 12px; padding: 0 2px; font-size: 7px; }
  .event-row { grid-template-columns: 1fr; gap: 4px; }
  .event-detail-heading { flex-direction: column; }
  .event-detail-heading .btn { width: 100%; }
  .event-details { grid-template-columns: 1fr; }
  .event-details .event-detail-wide { grid-column: auto; }
  .audit-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .audit-heading .muted { text-align: left; }
  .training-test-page .app-header { align-items: center; }
  .training-test-page .app-header .btn { flex: 0 0 auto; width: auto; padding-inline: 9px; font-size: 12px; }
  .training-controls .filters { align-items: stretch; flex-direction: column; }
  .training-controls .select,.training-controls .input { width: 100%; }
  .training-controls .training-year { width: 100%; }
  .training-stats { grid-template-columns: 1fr; gap: 6px; }
  .training-section-head { align-items: flex-start; flex-direction: column; }
  .status-page .app-header { align-items: flex-start; flex-direction: column; }
  .status-page .toolbar { width: 100%; }
  .status-page .toolbar .btn { flex: 1 1 auto; width: auto; padding-inline: 7px; font-size: 11px; }
  .status-summary { grid-template-columns: 1fr; gap: 6px; }
  .status-row { grid-template-columns: 12px minmax(0,1fr); }
  .status-row time { grid-column: 2; }
  .transport-test-page .app-header { align-items: center; }
  .transport-test-page .app-header .btn { width: auto; padding-inline: 9px; }
  .transport-event { align-items: flex-start; flex-direction: column; }
  .transport-question-grid,.transport-stats { grid-template-columns: 1fr; }
  .transport-id-row { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .vehicle-options { grid-template-columns: 1fr; }
  .permission-calendar > summary { grid-template-columns: minmax(0,1fr) 24px; gap: 5px 10px; }
  .permission-selection { grid-column: 1; white-space: normal; }
  .accordion-chevron { grid-column: 2; grid-row: 1 / span 2; }
  .permission-tools { align-items: stretch; flex-direction: column; }
  .group-options { grid-template-columns: 1fr; max-height: 340px; }
  .permission-actions { align-items: stretch; flex-direction: column; margin: 0 -16px; padding: 13px 16px; }
  .filters { align-items: flex-start; }
  .filters details { width: 100%; }
  .form-card { margin: 14px 0; padding: 19px 16px; }
  .login-shell { padding: 14px; }
  .login-card { padding: 27px 20px 22px; }
}
