/* Shared presentation for every page. Breakpoints follow usable CSS width,
   including browser zoom; the viewport is never scaled down to fit a table. */
:root {
  --ink: #233142;
  --muted: #657488;
  --bg: #f5f7fa;
  --line: #e1e6ed;
  --teal: #3f6385;
  --teal-soft: #edf3f9;
  --orange: #97601a;
  --red: #b14444;
  --nav: #202b38;
  --shadow: 0 4px 18px #182b4110;
  --sidebar-width: 208px;
  --page-gutter: clamp(16px, 1.8vw, 32px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 12px;
  font-optical-sizing: auto;
  line-height: 1.5;
  color-scheme: light;
}
body { background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }
input, select, textarea { max-width: 100%; }
input[type=checkbox] { accent-color: var(--teal); }
[hidden] { display: none !important; }
h1 { font-size: 23px; font-weight: 650; line-height: 1.3; letter-spacing: -.5px; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-size: 13px; font-weight: 600; }
small, .small { font-size: 11px; }
.icon { width: 16px; height: 16px; stroke-width: 1.6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #678fb7; outline-offset: 3px; }
.btn { min-height: 34px; padding: 7px 12px; border-radius: 5px; font-size: 11px; font-weight: 550; gap: 7px; }
.btn:hover { background: #f2f5f9; }
.btn.primary { background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: #304e6c; border-color: #304e6c; }
.btn.small { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.btn.subtle { background: transparent; }
.btn.danger { color: var(--red); }
.icon-btn { width: 32px; height: 32px; border-radius: 5px; }
.icon-btn:hover { background: #edf2f7; }
.tag { border-radius: 4px; padding: 3px 6px; font-size: 10px; font-weight: 500; background: #edf0f4; color: #586a7d; }
.tag.valid { background: #e9f3ed; color: #31724c; }
.tag.teal { background: #edf3f9; color: var(--teal); }
.tag.expired { background: #fceced; color: #a6373c; }
.tag.missing, .tag.no_expiry { background: #fff3df; color: #8d5b15; }
.tag.unchecked { background: #eff2f6; color: #647084; }
.tag.dot:before { width: 5px; height: 5px; }
.stack { gap: 16px; }
.field { gap: 6px; font-size: 11px; font-weight: 550; min-width: 0; }
.field input, .field select, .field textarea { min-height: 36px; border-radius: 5px; padding: 8px 10px; border-color: #cfd7e2; font-size: 12px; }
.field input::placeholder { color: #8692a1; }
.password button { top: 2px; right: 2px; }
.hint { font-size: 11px; line-height: 1.6; }
.notice, .form-error { border-radius: 6px; font-size: 11px; padding: 10px 12px; }
.notice { background: #eef3f8; border-color: #dbe5ef; color: #4e657d; }
.notice.warm { background: #fff9ed; border-color: #eee1c5; color: #806027; }
.row, .page-heading > *, .panel-head > *, .notification > div { min-width: 0; }
/* Display the approved PNG unchanged, cropping only its transparent canvas margins. */
.brand { display: block; position: relative; width: 100%; max-width: 380px; aspect-ratio: 1949 / 520; padding: 0; overflow: hidden; flex-shrink: 0; }
.brand img.brand-logo { position: absolute; width: 111.441765%; max-width: none; height: auto; left: -6.516162%; top: -19.038462%; display: block; }
.mobile-brand { display: none; }
.brand-sub { display: none; }

/* Application frame: a fixed, scrollable menu; flexible content, no fixed canvas. */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { width: var(--sidebar-width); background: var(--nav); padding: 22px 12px 12px; color: #c7d2e0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #526174 var(--nav); }
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { width: 100%; padding: 0; }
.navigation-close { display: none; }
.organization-switcher { margin: 25px 5px 0; }
.organization-switcher > label { font-size: 9px; color: #a2b1c2; letter-spacing: .8px; margin-bottom: 7px; }
.organization-switcher select { border-color: #465669; border-radius: 5px; background: #263545; color: #edf3fa; font-size: 11px; padding: 8px; min-height: 34px; }
.organization-switcher option { background: white; color: var(--ink); }
.org-add { color: #b3c7db; font-size: 10px; margin-top: 7px; min-height: 28px; }
.nav-caption, .organization-switcher + .nav-caption { font-size: 9px; color: #9aabbd; letter-spacing: .65px; margin: 22px 8px 9px; }
.nav-list { gap: 3px; }
.nav-item { position: relative; min-height: 38px; padding: 9px 10px; gap: 10px; border-radius: 4px; color: #c2cedc; font-size: 11px; font-weight: 450; }
.nav-item:hover { background: #2b3a4b; color: white; }
.nav-item.active { color: #f7faff; background: #344c63; font-weight: 550; }
.nav-item.active:before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: #89afcf; }
.nav-list.secondary { margin-top: auto; padding-top: 18px; border-color: #ffffff14; }
.side-bottom { margin-top: 10px; padding-top: 0; border-top: 1px solid #ffffff14; }
.profile-button { padding: 13px 5px 4px; color: #e1e8f1; }
.profile-copy strong { max-width: 132px; font-size: 10px; }
.profile-copy span { color: #a8b7c8; font-size: 9px; }
.avatar { background: #3c5d7b; color: #eff5fb; border-radius: 50%; width: 30px; height: 30px; }
.workspace { min-width: 0; grid-column: 2; width: auto; }
.topbar { height: 49px; padding: 0 var(--page-gutter); gap: 12px; }
.breadcrumb { gap: 10px; color: var(--muted); font-size: 10px; min-width: 0; }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.top-actions { gap: 13px; font-size: 10px; flex-shrink: 0; }
.connection { color: #63788b; font-size: 10px; }
.connection:before { background: #679478; }
.top-date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.topbar .avatar { width: 28px; height: 28px; }
.content { width: 100%; max-width: none; padding: 23px var(--page-gutter) 32px; }
.page-heading { margin-bottom: 20px; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-heading p { font-size: 11px; margin-top: 5px; line-height: 1.6; }
.heading-actions { gap: 8px; flex-wrap: wrap; }
.draft-banner { border-radius: 5px; background: #eef3f8; border-color: #dce5ef; color: #50677d; font-size: 10px; padding: 8px 11px; margin-bottom: 18px; }
.scope-caption { color: var(--muted); font-size: 11px; margin: -7px 0 13px; flex-wrap: wrap; }
.organization-notice { margin-bottom: 16px; }

/* Compact summary band: the same metrics at every width, wrapping as needed. */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.stat { position: relative; border: 0; border-radius: 0; box-shadow: none; padding: 14px 16px 13px; background: white; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:hover { background: #f7f9fc; }
.stat.active { background: #f2f6fa; box-shadow: inset 0 -2px var(--teal); }
.stat-label { font-size: 10px; color: #607085; line-height: 1.4; min-height: 15px; gap: 6px; }
.stat-label .icon { width: 14px; height: 14px; color: #7d8ea1; }
.stat-value, .stat.attention .stat-value, .stat.expired .stat-value, .stat.valid .stat-value { font-size: 25px; font-weight: 600; line-height: 1; letter-spacing: -.55px; margin: 10px 0 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat.attention .stat-label .icon { color: #a76b1c; }
.stat.expired .stat-label .icon { color: #b3444c; }
.stat-caption { font-size: 9px; color: #69788a; line-height: 1.4; display: block; }
.processing-card { padding: 11px 14px; border-color: var(--line); border-radius: 6px; margin-bottom: 17px; display: grid; grid-template-columns: minmax(190px, .75fr) minmax(120px, 1fr); gap: 8px 22px; align-items: center; }
.processing-card h3 { font-size: 11px; }
.processing-card p { font-size: 10px; color: var(--muted); margin-top: 3px; }
.processing-percent { font-size: 17px; font-weight: 600; color: var(--teal); letter-spacing: -.2px; }
.processing-card progress, .upload-status progress { height: 5px; background: #e8edf3; accent-color: var(--teal); margin: 6px 0; }
.processing-card progress::-webkit-progress-bar, .upload-status progress::-webkit-progress-bar { background: #e8edf3; }
.processing-card progress::-webkit-progress-value, .upload-status progress::-webkit-progress-value { background: var(--teal); }
.processing-card progress::-moz-progress-bar, .upload-status progress::-moz-progress-bar { background: var(--teal); }
.processing-facts, .processing-card > .hint { grid-column: 1 / -1; }
.processing-facts { font-size: 10px; gap: 5px 17px; color: var(--muted); }
.processing-facts b { color: var(--ink); }
.processing-error, .danger { color: var(--red); }
.upload-status { color: var(--muted); }

/* Data table stays a table: horizontal scroll is confined to its own region. */
.panel { border-radius: 6px; box-shadow: none; min-width: 0; }
.panel-head { padding: 14px 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 13px; }
.panel-head p { font-size: 10px; color: var(--muted); }
.panel-body { padding: 19px; }
.toolbar { padding: 12px 16px 0; gap: 12px; display: block; }
.toolbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-controls .search { flex: 1 1 240px; max-width: 360px; min-width: 0; }
.search input { background: white; border-color: #d5dde7; border-radius: 5px; font-size: 11px; padding: 8px 10px 8px 32px; height: 34px; }
.search > .icon { top: 9px; left: 10px; color: #7c8b9e; }
.toolbar-options { display: flex; gap: 7px; margin-left: auto; }
.toolbar-options .btn { white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 9px; }
.filter { font-size: 10px; color: #617084; border: 0; border-radius: 0; border-bottom: 2px solid transparent; padding: 10px 0 9px; background: transparent; }
.filter.active { background: transparent; color: #315d84; border-color: var(--teal); font-weight: 600; }
.filter:hover { background: transparent; color: var(--ink); }
.table-wrap { max-width: 100%; overflow: auto; overscroll-behavior-x: contain; scrollbar-width: auto; scrollbar-color: #aebcca #f0f3f7; }
.fleet-table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.fleet-table th { text-transform: none; letter-spacing: 0; font-size: 10px; font-weight: 500; color: #52667d; padding: 11px 12px; background: #f3f6f9; border-right: 1px solid #e9edf2; line-height: 1.4; }
.fleet-table td { font-size: 11px; color: #34475b; padding: 8px 12px; border-color: #e8edf3; line-height: 1.45; height: 48px; }
.fleet-table .source-status { white-space: nowrap; max-width: none; font-size: 9px; line-height: 1.35; padding: 2px 5px; }
.fleet-table tbody tr:nth-child(even) { background: #fafbfd; }
.fleet-table tbody tr:hover { background: #edf3fa; }
.fleet-table th:first-child, .fleet-table td:first-child { min-width: 133px; background: #fff; box-shadow: 1px 0 0 var(--line); }
.fleet-table th:first-child { background: #f3f6f9; }
.fleet-table tbody tr:nth-child(even) td:first-child { background: #fafbfd; }
.fleet-table tbody tr:hover td:first-child { background: #edf3fa; }
.plate-button { color: var(--ink); gap: 3px; max-width: 180px; }
.plate { color: #25374c; font-size: 11px; font-weight: 650; letter-spacing: .1px; }
.vehicle-org { color: #6e7e92; font-size: 9px; max-width: 150px; }
.vehicle-name { color: #748195; }
.vehicle-brand { min-width: 70px; max-width: 120px; line-height: 1.4; }
.equipment { color: #3a4f65; font-size: 11px; gap: 3px; }
.equipment small { font-size: 9px; color: #738296; }
.equipment-cell { gap: 4px; min-width: 112px; max-width: 160px; }
.equipment-cell small, .serial-number { font-size: 10px; }
.source-status { max-width: 160px; }
.date-cell { color: #34475b; }
.date-cell small { color: #976521; font-size: 9px; margin-top: 3px; }
.date-cell.danger { color: #a3353e; font-weight: 550; }
.table-foot { padding: 10px 14px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }
.pagination { margin-left: auto; gap: 5px; }
.page-number { color: var(--teal); background: #eaf1f8; border-radius: 4px; font-size: 10px; }
.table-scroll-hint { margin-right: auto; font-size: 10px; color: var(--muted); }
.below-table { margin-top: 12px; color: var(--muted); font-size: 10px; flex-wrap: wrap; gap: 4px 18px; }
.fleet-tools { flex-wrap: wrap; }
.fleet-tools .btn { font-size: 10px; }
.column-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 18px; margin-top: 20px; }
.column-options .check-label { font-size: 11px; align-items: flex-start; }
.column-presets { flex-wrap: wrap; }
.empty { padding: 48px 20px; }
.empty h3 { color: var(--ink); }
.empty > .icon { color: #7a91a8; }
.empty p { font-size: 11px; }
.section-intro { font-size: 11px; margin-bottom: 20px; }

/* All secondary pages, entry forms and dialogs share the same scale and palette. */
.organizations-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.organization-card { padding: 18px; }
.organization-card h2 { font-size: 15px; margin-top: 12px; }
.organization-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.view-switch { display: inline-flex; align-items: stretch; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: #eaf0f6; }
.view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 4px; background: transparent; min-height: 27px; padding: 4px 9px; font-size: 11px; color: #5a6e84; }
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed=true] { background: #fff; border-color: #d6e0eb; color: #315675; font-weight: 550; }
.view-switch .icon { width: 14px; height: 14px; }
.organizations-table-wrap { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; scrollbar-color: #aebcca #f0f3f7; }
.organizations-table { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; text-align: left; font-size: 11px; }
.organizations-table th { background: #f3f6f9; color: #52667d; font-size: 10px; font-weight: 500; padding: 11px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.organizations-table td { padding: 12px; border-bottom: 1px solid #e8edf3; vertical-align: middle; }
.organizations-table tr:last-child td { border-bottom: 0; }
.organizations-table tbody tr:nth-child(even) { background: #fafbfd; }
.organizations-table tbody tr:hover { background: #edf3fa; }
.organizations-table th:first-child, .organizations-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 200px; background: white; box-shadow: 1px 0 0 var(--line); }
.organizations-table th:first-child { background: #f3f6f9; }
.organizations-table tbody tr:nth-child(even) td:first-child { background: #fafbfd; }
.organizations-table tbody tr:hover td:first-child { background: #edf3fa; }
.organization-name-button { display: block; width: 100%; max-width: 270px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 11px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.organization-name-button:hover { color: var(--teal); text-decoration: underline; }
.organization-kind { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.registry-number, .organizations-table .number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.organizations-table .number { text-align: right; }
.organization-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: 278px; }
.organization-row-actions .btn { font-size: 10px; padding: 5px 8px; }
.organization-scroll-hint { color: var(--muted); font-size: 10px; }
.delete-organization-name { overflow-wrap: anywhere; font-size: 13px; }
.deletion-counts { margin: 0; }
.deletion-counts .fact { padding: 8px 0; }
.deletion-counts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.org-card-actions { gap: 8px; }
.organization-lookup-result { background: #f3f7fb; border-radius: 5px; }
.fact { padding: 11px 0; font-size: 11px; gap: 16px; }
.fact dt { min-width: 0; }
.fact dd { min-width: 0; }
.settings-grid { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.split { gap: 16px; }
.billing-summary { background: #edf2f8; border-color: #dce5ee; border-radius: 6px; padding: 20px; margin-bottom: 22px; }
.billing-summary p { color: var(--muted); font-size: 11px; }
.billing-symbol { background: #e0e9f2; color: #537597; border-radius: 6px; width: 44px; height: 44px; }
.billing-summary h2 { font-size: 15px; }
.plans { gap: 16px; }
.plan { padding: 20px; border-radius: 6px; }
.plan h3 { font-size: 16px; }
.plan-price { font-size: 24px; color: var(--ink); }
.plan ul { color: #53667a; gap: 11px; }
.plan .price-note { color: var(--muted); }
.period-toggle { background: #e9eef4; border-radius: 5px; }
.period-toggle button { color: #63758a; border-radius: 3px; }
.period-toggle button.active { color: var(--ink); }
.billing-foot { gap: 16px; }
.info-card { border-radius: 6px; padding: 18px; }
.info-card > .icon { color: #6b87a2; }
.info-card p { color: var(--muted); }
.employee-card { padding: 18px; }
.employee-heading h2 { font-size: 14px; }
.employee-heading p { font-size: 11px; }
.staff-summary { margin: 16px 0; }
.mandate-row { gap: 16px; padding: 13px 0; }
.mandate-number { font-size: 11px; }
.notification { padding: 17px; gap: 12px; }
.notification > .icon { color: #7791a9; }
.notification p { font-size: 11px; }
.notification time { color: var(--muted); }
.upload-zone { background: #f5f8fb; border-color: #aebed0; border-radius: 6px; }
.upload-zone > .icon { color: #6484a2; }
dialog { border-radius: 8px; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 20px 70px #17283b30; }
dialog::backdrop { background: #16233266; backdrop-filter: none; }
.modal-heading { position: sticky; top: 0; background: #fff; z-index: 3; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-heading h2 { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.modal-body { padding: 18px 22px 22px; }
.modal-actions { flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.column-presets { margin-top: 16px; }
.detail-grid { gap: 17px 20px; }
.detail-grid > div { min-width: 0; }
.detail-grid label { font-size: 10px; color: var(--muted); }
.detail-grid strong { font-size: 11px; }
.equipment-section { padding: 16px 0; }
.equipment-section h3 { font-size: 13px; }
.equipment-section:first-child { border-top: 0; }
#toast { background: #273c52; border-radius: 6px; font-size: 12px; }
.auth-page { background: #f9fafc; grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr); }
.auth-story { background: var(--nav); color: #edf3fa; padding: 40px 10%; }
.auth-story:after { display: none; }
.auth-story .brand { max-width: 380px; }
.story-copy h1 { font-size: clamp(30px, 3vw, 43px); letter-spacing: -.9px; font-weight: 550; }
.story-copy h1 span { color: #9bb8d5; }
.story-copy > p { color: #b5c4d4; font-size: 12px; line-height: 1.8; }
.eyebrow { color: #9fb5cc; letter-spacing: 1px; font-size: 9px; }
.story-mini { background: #293b4e; border-color: #41566c; border-radius: 6px; box-shadow: none; }
.story-mini .caption, .story-mini .mini-footer, .story-bottom { color: #becddc; }
.story-mini .tag { background: #375946; color: #d7eddf; }
.story-mini .mini-footer .icon { color: #adc1d6; }
.auth-body { max-width: 370px; padding: 40px 0; }
.auth-body h1 { font-size: 25px; }
.auth-body .subtitle { font-size: 12px; margin-top: 9px; }
.auth-tabs { gap: 24px; margin-bottom: 24px; }
.auth-tabs a { font-size: 12px; }
.auth-body .divider, .auth-foot { color: var(--muted); }
.auth-foot { font-size: 10px; }

/* Calendar: horizontal months remain legible; side panels reflow below the grid. */
.calendar-layout { grid-template-columns: minmax(0, 1fr) clamp(260px, 21vw, 320px); gap: 16px; }
.calendar-month-head { padding: 17px 18px 13px; }
.calendar-month-title { font-size: 18px; font-weight: 600; }
.calendar-controls { padding: 0 18px 15px; gap: 10px; }
.calendar-month-picker input { border-radius: 4px; min-height: 32px; }
.calendar-filter { border-radius: 4px; }
.calendar-filter.active { background: #edf3f9; border-color: #cbdbe9; color: var(--teal); }
.calendar-layout .verification, .calendar-filter.verification { --event-color: #466b91; --event-bg: #edf3fa; }
.calendar-layout .crypto, .calendar-filter.crypto { --event-color: #9b6927; --event-bg: #fcf4e7; }
.calendar-layout .mcd, .calendar-filter.mcd { --event-color: #716593; --event-bg: #f1eff7; }
.calendar-weekdays { background: #f3f6fa; }
.calendar-weekdays span { color: #66778b; }
.calendar-weekdays .weekend { color: #94713c; }
.calendar-day { min-height: 116px; }
.calendar-day:hover { background: #f3f7fb; }
.calendar-day.outside { background: #f8fafc; color: #8796a7; }
.calendar-day.selected { background: #edf4fb; box-shadow: inset 0 0 0 2px #547eaa; }
.calendar-day:focus-visible { outline-color: #466e97; }
.calendar-day-count { color: #73849a; }
.calendar-chip { padding: 4px; }
.calendar-chip small { font-size: 9px; }
.calendar-footnote { background: #f9fafc; color: var(--muted); }
.calendar-count { background: #edf2f8; color: #536f8a; border-radius: 4px; }
.calendar-aside { gap: 16px; }
.calendar-side-head { padding: 16px; }
.calendar-side-head h2 { font-size: 13px; }
.calendar-side-head .calendar-selected-label { color: #456581; }
.calendar-event { border-color: var(--line); padding-top: 12px; padding-bottom: 12px; }
.calendar-event-heading time, .calendar-event-org, .calendar-event-source,
.calendar-list-note { color: var(--muted); }
.calendar-event-link { font-size: 11px; }
.calendar-event-source { font-size: 10px; }
.calendar-agenda { padding: 4px 15px; }
.calendar-deadline { font-size: 9px; color: #526d88; }

@media (min-width: 2000px) {
  :root { --sidebar-width: 224px; --page-gutter: 36px; }
  .fleet-table th, .fleet-table td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 1279px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat { padding: 13px 12px; }
  .stat-label { min-height: 28px; align-items: flex-start; }
  .stat-caption { min-height: 25px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .connection { display: none; }
  .plans { gap: 12px; }
  .plan { padding: 16px; }
  .billing-period { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 959px) {
  body:has(.shell.menu-open) { overflow: hidden; }
  .shell { display: block; }
  .workspace { width: 100%; }
  .sidebar { width: min(268px, calc(100vw - 48px)); transform: translateX(-100%); transition: transform .18s ease; padding-top: 20px; }
  .shell.menu-open .sidebar { transform: none; }
  .shell.menu-open .menu-scrim { display: block; position: fixed; inset: 0; background: #13213366; z-index: 19; border: 0; }
  .mobile-menu { display: inline-flex; flex-shrink: 0; }
  .navigation-close { display: inline-flex; position: absolute; right: 10px; top: 18px; color: #c7d2e0; }
  .sidebar .brand { width: calc(100% - 38px); padding: 0; }
  .navigation-close:hover { background: #344c63; }
  .topbar { padding: 0 16px; height: 52px; }
  .topbar .breadcrumb { margin-right: auto; }
  .content { padding: 20px var(--page-gutter) 28px; }
  .page-heading h1 { font-size: 23px; }
  .top-actions .tag { display: none; }
  .auth-story { padding: 28px 9%; }
  .story-copy h1 { font-size: 31px; }
  .auth-right { padding: 25px 9%; }
}
@media (max-width: 699px) {
  :root { --page-gutter: 14px; }
  .top-date, .breadcrumb > span { display: none; }
  .topbar { gap: 7px; padding: 0 10px; }
  .top-actions { gap: 5px; }
  .breadcrumb { font-size: 11px; }
  .page-heading { margin-bottom: 16px; gap: 12px; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1 1 auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child { grid-column: 1 / -1; }
  .stat-label { min-height: 0; font-size: 10px; }
  .stat-value { font-size: 23px !important; margin: 8px 0 5px; }
  .stat-caption { min-height: 0; font-size: 9px; }
  .stat:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 15px; }
  .stat:last-child .stat-value { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .stat:last-child .stat-label .icon { display: none; }
  .processing-card { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 6px; }
  .processing-card progress { margin: 3px 0 6px; }
  .processing-facts { gap: 5px 12px; }
  .panel-head { padding: 12px; gap: 10px; }
  .toolbar { padding: 11px 12px 0; }
  .toolbar-controls .search { max-width: none; flex-basis: 100%; }
  .toolbar-options { margin-left: 0; width: 100%; }
  .toolbar-options .btn { flex: 1; }
  .filters { gap: 0 14px; }
  .filter { padding-top: 9px; padding-bottom: 9px; }
  .fleet-table th, .fleet-table td { padding: 10px; }
  .fleet-table th:first-child, .fleet-table td:first-child { min-width: 118px; }
  .vehicle-org { max-width: 100px; }
  .table-foot { padding: 10px 12px; gap: 8px; }
  .table-foot > span { max-width: none; }
  .table-scroll-hint { flex-basis: 100%; }
  .below-table { font-size: 10px; }
  .organizations-grid, .plans, .billing-foot, .split, .calendar-aside { grid-template-columns: minmax(0, 1fr); }
  .organization-heading-actions { width: 100%; }
  .organization-heading-actions > .btn { flex: 1 1 190px; }
  .view-switch { flex: 1 1 190px; }
  .view-switch button { flex: 1; min-height: 32px; }
  .organizations-table th:first-child, .organizations-table td:first-child { min-width: 166px; }
  .organization-name-button { max-width: 190px; }
  .organization-card, .employee-card, .panel-body { padding: 16px; }
  .employee-heading { flex-wrap: wrap; }
  .employee-heading > .row { flex-wrap: wrap; }
  .mandate-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 10px; }
  .mandate-row > .row { grid-column: 1 / -1; }
  .billing-summary { flex-wrap: wrap; padding: 16px; gap: 14px; }
  .billing-symbol { display: none; }
  .billing-summary .row { align-items: flex-start; }
  .billing-period { flex-wrap: wrap; }
  .plan { padding: 20px; }
  .notification { flex-wrap: wrap; padding: 16px; }
  .notification > div { flex: 1 1 180px; }
  .notification time { margin-left: 28px; }
  .calendar-month-head { padding: 15px 12px; flex-wrap: wrap; }
  .calendar-controls { padding: 0 12px 13px; }
  .calendar-mobile-hint { display: block; }
  .calendar-day { min-height: 112px; }
  .calendar-month-title { font-size: 17px; }
  .auth-page { display: block; }
  .auth-story { display: none; }
  .auth-right { min-height: 100dvh; padding: 24px; }
  .auth-top { justify-content: space-between; flex-wrap: wrap; gap: 12px; background: var(--nav); margin: -24px -24px 0; padding: 22px 24px; }
  .mobile-brand { display: block; width: min(100%, 300px); }
  .auth-body { padding: 38px 0; }
  .auth-body h1 { font-size: 24px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  /* 16px inputs prevent Safari from zooming the whole mobile page on focus. */
  .btn, .btn.small { min-height: 38px; }
  .icon-btn { min-width: 36px; height: 36px; }
  .password .icon-btn { height: 34px; }
  .nav-item { min-height: 42px; }
  .draft-banner { align-items: flex-start; gap: 10px; }
  .draft-banner a { white-space: normal; flex-shrink: 0; max-width: 80px; }
  dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .modal-heading { padding: 14px 16px; }
  .modal-body { padding: 16px; }
  .modal-heading h2 { font-size: 16px; }
  .detail-grid { gap: 16px; }
  .modal-actions .btn { flex: 1 1 auto; }
  .form-dates { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 379px) {
  :root { --page-gutter: 10px; }
  .auth-right { padding: 20px 16px; }
  .auth-top { margin: -20px -16px 0; padding: 20px 16px; }
  .detail-grid, .column-options { grid-template-columns: minmax(0, 1fr); }
  .calendar-navigation { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { transition: none !important; scroll-behavior: auto !important; }
}
