:root {
  color-scheme: light;
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-subtle: #f7f9f8;
  --ink: #172226;
  --muted: #667579;
  --line: #dce4e2;
  --line-strong: #c9d4d1;
  --sidebar: #162629;
  --sidebar-muted: #9fb0b0;
  --brand: #c74436;
  --brand-dark: #a83329;
  --teal: #147d72;
  --teal-soft: #e7f5f1;
  --cyan: #247c9a;
  --cyan-soft: #e9f4f7;
  --amber: #c57519;
  --amber-soft: #fff4df;
  --red: #b93830;
  --red-soft: #fcebea;
  --shadow: 0 10px 30px rgba(22, 38, 41, 0.08);
  --sidebar-width: 252px;
  --topbar-height: 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 25px; line-height: 1.2; font-weight: 720; letter-spacing: 0; }
h2 { font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
h3 { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0; }
small { color: var(--muted); }
code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; color: #3f5357; background: #edf2f1; padding: 3px 5px; border-radius: 4px; }

.icon { display: inline-block; vertical-align: middle; }
.icon--back { transform: rotate(180deg); }
.eyebrow { display: block; margin-bottom: 5px; color: var(--brand); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.nowrap { white-space: nowrap; }
.text-warning { color: var(--amber) !important; }
.text-danger { color: var(--red) !important; }
.text-success { color: var(--teal) !important; }
.money-mask { display: inline-block; filter: blur(5px); opacity: .82; user-select: none; pointer-events: none; transform: translateZ(0); }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 43%) 1fr; background: var(--surface); }
.login-brand { position: relative; display: flex; align-items: center; gap: 16px; padding: 54px; color: #fff; background: var(--sidebar); overflow: hidden; }
.login-brand::after { content: ""; position: absolute; right: -85px; bottom: -85px; width: 260px; height: 260px; border: 36px solid rgba(255,255,255,.045); border-radius: 50%; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 6px; color: #fff; background: var(--brand); font-size: 15px; font-weight: 850; }
.brand-mark--large { width: 58px; height: 58px; flex-basis: 58px; font-size: 22px; }
.login-brand-name { font-size: 30px; font-weight: 800; line-height: 1; }
.login-brand-sub { margin-top: 8px; color: #b6c4c4; font-size: 13px; }
.login-stats { position: absolute; left: 54px; right: 54px; bottom: 54px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.14); padding-top: 25px; z-index: 1; }
.login-stats div { display: flex; flex-direction: column; gap: 3px; }
.login-stats strong { font-size: 21px; }
.login-stats span { color: #a9b9b8; font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 40px; background: linear-gradient(135deg, #f9fbfa 0%, #eef3f2 100%); }
.login-form { width: min(390px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.login-heading { margin-bottom: 28px; }
.login-heading h1 { font-size: 28px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.login-divider::before,
.login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-help { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > span, .select-field > span, .date-field > span { color: #526267; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea, .select-field select, .date-field input { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 9px 11px; color: var(--ink); background: #fff; outline: 0; }
.field textarea { resize: vertical; }
.field > small { margin-top: -2px; font-size: 9px; line-height: 1.35; }
.input-with-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.input-with-suffix input { border-radius: 5px 0 0 5px; }
.input-with-suffix > span { display: grid; place-items: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 5px 5px 0; padding: 0 12px; color: var(--muted); background: var(--surface-subtle); font-size: 10px; font-weight: 700; }
.field input:focus, .field select:focus, .field textarea:focus, .select-field select:focus, .date-field input:focus, .search-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,125,114,.1); }
.login-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; color: var(--muted); font-size: 12px; }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; color: #fff; background: var(--sidebar); }
.sidebar-brand { height: var(--topbar-height); display: flex; align-items: center; gap: 11px; padding: 0 17px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-brand-copy strong { font-size: 14px; }
.sidebar-brand-copy span { margin-top: 2px; color: var(--sidebar-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.sidebar-close { display: none !important; margin-left: auto; color: #fff !important; }
.primary-nav { min-height: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; padding: 12px 10px 14px; overflow-y: auto; scrollbar-width: thin; }
.nav-section { display: grid; gap: 5px; }
.nav-section-title { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.nav-section-title span { color: #dfe9e7; font-size: 10px; font-weight: 820; text-transform: uppercase; letter-spacing: .06em; }
.nav-section-title small { display: none; color: #829596; font-size: 8px; line-height: 1.25; }
.nav-section.is-active .nav-section-title span { color: #fff; }
.nav-section.is-active .nav-section-title small { display: block; }
.nav-section-links { display: flex; flex-direction: column; gap: 1px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; border-radius: 5px; color: #b8c5c4; font-size: 11px; font-weight: 650; transition: background .15s, color .15s; }
.nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-link.is-active { color: #fff; background: rgba(255,255,255,.105); }
.nav-link.is-active::before { content: ""; position: absolute; left: -10px; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px; border-top: 1px solid rgba(255,255,255,.08); }
.month-state { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.month-state:hover strong { color: #fff; }
.month-state-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #58c49b; box-shadow: 0 0 0 4px rgba(88,196,155,.12); }
.month-state div { min-width: 0; display: flex; flex-direction: column; }
.month-state strong { font-size: 11px; }
.month-state span { color: var(--sidebar-muted); font-size: 10px; }
.version-label { color: #7f9292; font-size: 10px; }
.sidebar-scrim { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 12px; height: var(--topbar-height); padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.topbar-title { min-width: 140px; display: flex; flex-direction: column; line-height: 1.25; }
.topbar-title > span { font-size: 14px; font-weight: 750; }
.topbar-title small { font-size: 10px; }
.topbar-search { width: min(370px, 36vw); min-width: 220px; display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-subtle); }
.topbar-search input { width: 100%; height: 36px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.topbar-search kbd { padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; color: #7b888b; font-size: 9px; font-family: inherit; }
.period-control { height: 36px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; color: #435357; background: #fff; font-size: 12px; font-weight: 650; }
.sync-control { min-height: 40px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; color: #435357; background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.sync-control-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.05; }
.sync-control-copy strong { font-size: 10px; font-weight: 800; }
.sync-control-copy small { max-width: 230px; color: currentColor; opacity: .72; overflow: hidden; text-overflow: ellipsis; font-size: 8px; font-weight: 750; }
.sync-control:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
.sync-control[data-sync-status="saved"] { color: #176c55; border-color: #a9d8c7; background: #f3fbf7; }
.sync-control[data-sync-status="backup"], .sync-control[data-sync-status="syncing"], .sync-control[data-sync-status="checking"] { color: #81570a; border-color: #ead5a6; background: #fffaf0; }
.sync-control[data-sync-status="error"] { color: #a53b33; border-color: #e8b6b1; background: #fff6f5; }
.sync-control[data-sync-status="local"] { color: #68777a; border-color: #d7dfdd; background: #f7faf9; }
.save-confirmation-banner { min-height: 42px; display: flex; align-items: center; gap: 10px; margin: -4px 0 16px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; background: #fff; box-shadow: 0 8px 20px rgba(22,38,41,.04); }
.save-confirmation-icon { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; }
.save-confirmation-copy { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.save-confirmation-copy strong { font-size: 11px; }
.save-confirmation-copy small { color: currentColor; opacity: .72; font-size: 9px; font-weight: 700; }
.save-confirmation-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.save-confirmation-banner--confirmed { border-color: #a9d8c7; color: #176c55; background: #f3fbf7; }
.save-confirmation-banner--confirmed .save-confirmation-icon { background: var(--teal-soft); }
.save-confirmation-banner--pending { border-color: #ead5a6; color: #81570a; background: #fffaf0; }
.save-confirmation-banner--pending .save-confirmation-icon { background: var(--amber-soft); }
.save-confirmation-banner--warning { border-color: #e8b6b1; color: #a53b33; background: #fff6f5; }
.save-confirmation-banner--warning .save-confirmation-icon { background: var(--red-soft); }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 34px; border: 1px solid var(--line); border-radius: 5px; color: #506064; background: #fff; cursor: pointer; }
.icon-button:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-subtle); }
.icon-button:disabled { opacity: .4; cursor: default; }
.privacy-button.is-active { color: #fff; border-color: var(--brand); background: var(--brand); }
.menu-button { display: none; }
.notification-button { position: relative; }
.notification-dot { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
.profile-button { min-width: 136px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.profile-button:hover { background: var(--surface-subtle); }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 10px; font-weight: 800; }
.profile-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.profile-copy strong { max-width: 80px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.profile-copy small { font-size: 9px; }
.workspace { grid-column: 2; grid-row: 2; min-width: 0; padding: 24px; }
.mobile-nav { display: none; }

/* Buttons and headings */
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 5px; padding: 0 13px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.button--primary { color: #fff; border-color: var(--brand); background: var(--brand); }
.button--primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.button--info { color: #fff; border-color: #147dba; background: #1782c8; }
.button--info:hover { border-color: #0f6796; background: #166c99; }
.button--secondary { color: #415156; border-color: var(--line-strong); background: #fff; }
.button--secondary:hover { border-color: #aebdb9; background: var(--surface-subtle); }
.button--wide { width: 100%; min-height: 42px; }
.button--icon { width: 36px; padding: 0; }
.button:disabled { opacity: .5; cursor: default; }
.text-button { display: inline-flex; align-items: center; gap: 3px; border: 0; padding: 4px; color: var(--teal); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.page-heading--compact { align-items: center; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.driver-quick-create { margin: -4px 0 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 7px 18px rgba(22,38,41,.045); overflow: hidden; }
.driver-quick-create__head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #f7faf9; }
.driver-quick-create__head h2 { margin-top: 2px; font-size: 15px; }
.driver-quick-create__head p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.driver-quick-create__grid { display: grid; grid-template-columns: 1.25fr .8fr .7fr .9fr .8fr .8fr auto minmax(180px, 1fr); align-items: end; gap: 10px; padding: 13px 16px 4px; }
.driver-quick-create__toggle { margin-bottom: 16px; white-space: nowrap; }
.driver-quick-create__note textarea { min-height: 38px; resize: vertical; }
.driver-quick-create__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 14px; }
.driver-quick-create__actions small { color: var(--muted); font-size: 10px; }

/* Metrics */
.metric-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.metric-strip--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-strip--seven { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.metric-strip--eight { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.metric { position: relative; min-width: 0; padding: 15px 16px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: transparent; }
.metric--success::before { background: var(--teal); }
.metric--warning::before { background: var(--amber); }
.metric--danger::before { background: var(--red); }
.metric--money::before { background: var(--cyan); }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .045em; }
.metric-value { margin-top: 5px; font-size: 23px; line-height: 1.05; font-weight: 780; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-meta { margin-top: 6px; color: #718084; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-line { display: flex; align-items: center; gap: 0; margin: -7px 0 16px; color: var(--muted); font-size: 11px; }
.summary-line span { padding: 0 14px; border-right: 1px solid var(--line-strong); }
.summary-line span:first-child { padding-left: 0; }
.summary-line span:last-child { border-right: 0; }
.summary-line strong { color: var(--ink); }

/* Panels and dashboard */
.workspace-launcher { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: -4px 0 18px; }
.workspace-card { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 86px; border: 1px solid var(--line); border-radius: 7px; padding: 12px; background: var(--surface); box-shadow: 0 7px 18px rgba(22,38,41,.045); transition: border-color .15s, transform .15s, box-shadow .15s; }
.workspace-card:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.workspace-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #405257; background: #edf2f1; }
.workspace-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.workspace-card-copy strong { display: -webkit-box; min-height: 28px; overflow: hidden; font-size: 12px; line-height: 1.18; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.workspace-card-copy small { display: -webkit-box; min-height: 24px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.28; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.workspace-card-value { grid-column: 1 / -1; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; padding: 3px 8px; color: #425458; background: #f0f4f3; font-size: 10px; font-weight: 800; }
.workspace-card--success .workspace-card-icon, .workspace-card--success .workspace-card-value { color: #176c55; background: var(--teal-soft); }
.workspace-card--warning .workspace-card-icon, .workspace-card--warning .workspace-card-value { color: #8b5c12; background: var(--amber-soft); }
.workspace-card--danger .workspace-card-icon, .workspace-card--danger .workspace-card-value { color: #9b352f; background: var(--red-soft); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr); gap: 14px; }
.panel, .data-section { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel--wide { min-height: 305px; }
.panel-header, .section-title { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-header p, .section-title p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.panel-header-actions { display: flex; align-items: center; gap: 10px; }
.legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.legend-bar { width: 9px; height: 9px; border-radius: 2px; background: var(--teal); }
.legend-dot { width: 8px; height: 8px; margin-left: 4px; border: 2px solid var(--brand); border-radius: 50%; }
.daily-chart { height: 238px; display: flex; align-items: flex-end; gap: clamp(6px, 1vw, 14px); padding: 28px 22px 22px; border-bottom: 1px solid transparent; background-image: linear-gradient(to bottom, transparent calc(25% - 1px), #edf2f1 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), #edf2f1 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), #edf2f1 75%, transparent calc(75% + 1px)); }
.chart-day { position: relative; height: 100%; min-width: 14px; flex: 1 1 0; display: flex; align-items: flex-end; justify-content: center; }
.chart-day > span:last-child { position: absolute; bottom: -18px; color: #7d898b; font-size: 9px; white-space: nowrap; }
.chart-bar { width: min(23px, 74%); min-height: 7px; border-radius: 3px 3px 0 0; background: var(--teal); opacity: .88; transition: opacity .15s; }
.chart-day:hover .chart-bar { opacity: 1; }
.quality-marker { position: absolute; z-index: 2; left: 50%; width: 8px; height: 8px; border: 2px solid var(--brand); border-radius: 50%; background: #fff; transform: translate(-50%, 50%); }
.quality-marker.is-low { border-color: var(--amber); background: var(--amber-soft); }
.count-badge { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--red-soft); font-size: 11px; font-weight: 800; }
.quality-list { padding: 6px 16px 13px; }
.quality-row { padding: 10px 0; border-bottom: 1px solid #edf1f0; }
.quality-row:last-child { border-bottom: 0; }
.quality-row-head, .quality-row-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quality-row-head { font-size: 12px; }
.quality-row-head span { font-weight: 750; }
.quality-row-meta { margin-top: 5px; color: var(--muted); font-size: 9px; }
.progress { position: relative; height: 5px; margin-top: 8px; border-radius: 5px; background: #e7eeec; overflow: visible; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.progress > span.is-low { background: var(--amber); }
.progress > i { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--red); }
.issue-list { padding: 3px 8px 8px; }
.issue-row { width: 100%; min-height: 52px; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #edf1f0; padding: 6px 8px; text-align: left; background: transparent; cursor: pointer; }
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: var(--surface-subtle); }
.issue-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.issue-row strong { font-size: 11px; }
.issue-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.issue-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; color: var(--amber); background: var(--amber-soft); }
.issue-icon--info { color: var(--cyan); background: var(--cyan-soft); }
.issue-icon--danger { color: var(--red); background: var(--red-soft); }
.issue-value { color: var(--muted); font-size: 11px; font-weight: 750; }
.fleet-summary { min-height: 163px; display: grid; grid-template-columns: 125px minmax(0,1fr); align-items: center; gap: 18px; padding: 17px; }
.fleet-ring { width: 106px; height: 106px; display: grid; place-content: center; justify-items: center; border: 10px solid #dfece9; border-top-color: var(--teal); border-right-color: var(--cyan); border-radius: 50%; }
.fleet-ring span { font-size: 25px; font-weight: 800; line-height: 1; }
.fleet-ring small { margin-top: 4px; font-size: 9px; }
.fleet-stats { display: grid; gap: 8px; }
.fleet-stats div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid #edf1f0; }
.fleet-stats span { color: var(--muted); font-size: 10px; }
.fleet-stats strong { font-size: 15px; }
.mini-ranking { padding: 3px 10px 8px; }
.mini-rank-row { display: grid; grid-template-columns: 25px 28px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 43px; border-bottom: 1px solid #edf1f0; }
.mini-rank-row:last-child { border-bottom: 0; }
.rank-number { color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; }
.mini-rank-name { min-width: 0; display: flex; flex-direction: column; }
.mini-rank-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.mini-rank-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.score-value { color: var(--teal); font-size: 12px; font-weight: 800; }

/* Tables and filters */
.data-section { overflow: hidden; }
.filterbar { min-height: 60px; display: flex; align-items: end; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.filterbar--compact { min-height: 56px; padding: 9px 12px; }
.filter-row { min-width: 0; display: flex; align-items: end; gap: 10px; flex: 1 1 auto; }
.search-field { height: 38px; min-width: 260px; flex: 1 1 360px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 10px; color: var(--muted); background: #fff; }
.search-field input { width: 100%; min-width: 80px; height: 34px; border: 0; outline: 0; background: transparent; font-size: 12px; }
.select-field, .date-field { display: flex; flex-direction: column; gap: 3px; }
.select-field select, .date-field input { min-width: 135px; height: 38px; min-height: 38px; padding: 6px 9px; font-size: 11px; }
.table-wrap { width: 100%; overflow: auto; }
.table-wrap--fixed { max-height: 630px; }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 11px; }
.data-table th { position: sticky; top: 0; z-index: 2; height: 38px; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); color: #607075; background: #f5f8f7; text-align: left; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.data-table td { min-height: 48px; padding: 8px 10px; border-bottom: 1px solid #e9eeed; vertical-align: middle; }
.data-table tbody tr:hover { background: #f8faf9; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td > small, .data-table td > span + small, .data-table td > strong + small { display: block; margin-top: 2px; font-size: 9px; }
.data-table td .status + .status { margin-left: 4px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tour-table { min-width: 2040px; }
.billing-table { min-width: 1320px; }
.day-notes-table { min-width: 920px; }
.accident-table { min-width: 1280px; }
.driver-table { min-width: 900px; }
.personnel-table { min-width: 1390px; }
.vacation-table { min-width: 1120px; }
.route-master-table { min-width: 1080px; }
.request-table { min-width: 1120px; }
.request-table--cases { min-width: 1580px; }
.target-table { min-width: 620px; }
.table-note { max-width: 230px; display: block; overflow: hidden; color: #6d7a7d; text-overflow: ellipsis; white-space: nowrap; }
.table-note--day { color: #38545a; font-weight: 650; }
.is-muted-row { opacity: .62; }
.is-muted-row:hover { opacity: 1; }
.person-cell { min-width: 155px; display: flex; align-items: center; gap: 8px; }
.link-cell { border: 0; padding: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.link-cell:hover strong { color: var(--teal); }
.person-cell > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.person-cell strong { max-width: 185px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.driver-avatar { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 50%; color: #1e6561; background: #dff0ed; font-size: 9px; font-weight: 800; }
.driver-avatar--small { width: 26px; height: 26px; flex-basis: 26px; font-size: 8px; }
.driver-avatar--large { width: 48px; height: 48px; flex-basis: 48px; font-size: 14px; }
.plate { display: inline-flex; align-items: center; min-height: 22px; border: 1px solid #b7c3c1; border-left: 4px solid #315d9b; border-radius: 3px; padding: 2px 6px; color: #263438; background: #fff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 750; white-space: nowrap; }
.plate--large { min-height: 27px; padding: 3px 8px; font-size: 11px; }
.scan-time { display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scan-time i { width: 13px; height: 1px; background: var(--line-strong); }
.quality-value { font-weight: 800; white-space: nowrap; }
.quality-value--success { color: var(--teal); }
.quality-value--warning { color: var(--amber); }
.quality-value--neutral { color: var(--muted); }
.error-pair { display: inline-grid; grid-template-columns: auto auto auto auto; align-items: center; gap: 2px; }
.error-pair b { min-width: 16px; height: 18px; display: grid; place-items: center; border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-size: 9px; }
.error-pair small { margin: 0 3px 0 0 !important; color: var(--muted); font-size: 8px !important; }
.status { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; border-radius: 12px; padding: 2px 7px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--success { color: #167466; background: var(--teal-soft); }
.status--warning { color: #a65d0f; background: var(--amber-soft); }
.status--danger { color: #a1342e; background: var(--red-soft); }
.status--info { color: #236d89; background: var(--cyan-soft); }
.status--neutral { color: #68777a; background: #edf2f1; }
.table-action { width: 29px; height: 29px; flex-basis: 29px; }
.table-action.action-delete { color: var(--red); }
.table-action.action-delete:hover { color: #fff; background: var(--red); border-color: var(--red); }
.button--danger { color: #fff; background: var(--red); border-color: var(--red); }
.button--danger:hover { color: #fff; background: #a92e28; border-color: #a92e28; }
.pagination { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pagination > div { display: flex; align-items: center; gap: 9px; }
.pagination .icon-button { width: 30px; height: 30px; flex-basis: 30px; }
.empty-state { padding: 30px; color: var(--muted); text-align: center; }
.empty-state--large { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; }
.empty-state--large > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); }
.empty-state--large strong { color: var(--ink); }
.empty-state--large small { font-size: 10px; }
.missing-value { color: var(--amber); font-size: 10px; font-weight: 700; }
.section-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.segmented { display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #eaf0ee; }
.segmented button { min-height: 30px; border: 0; border-radius: 4px; padding: 0 12px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 750; cursor: pointer; }
.segmented button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(20,35,38,.1); }
.toolbar-meta, .source-file { color: var(--muted); font-size: 10px; }
.target-overview { margin-bottom: 14px; }
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
.target-card { min-height: 74px; padding: 14px 16px; border-right: 1px solid var(--line); }
.target-card:last-child { border-right: 0; }
.target-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.target-card strong { display: block; margin-top: 6px; font-size: 22px; line-height: 1; }
.target-card--success strong { color: var(--teal); }
.target-card--warning strong { color: var(--amber); }
.table-wrap--target { max-height: 235px; }

/* Data quality */
.quality-index-band { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin-bottom: 14px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 7px; background: var(--surface); overflow: hidden; }
.quality-index-band--warning { border-left-color: var(--amber); }
.quality-index-band--danger { border-left-color: var(--red); }
.quality-index-score { min-height: 177px; display: flex; flex-direction: column; justify-content: center; padding: 22px; border-right: 1px solid var(--line); }
.quality-index-score > span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.quality-index-score > strong { margin-top: 8px; font-size: 38px; line-height: 1; }
.quality-index-score > strong small { margin-left: 3px; font-size: 16px; }
.quality-index-score > em { margin-top: 8px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 750; }
.quality-index-band--success .quality-index-score > strong { color: var(--teal); }
.quality-index-band--warning .quality-index-score > strong { color: var(--amber); }
.quality-index-band--danger .quality-index-score > strong { color: var(--red); }
.quality-dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quality-dimension { min-width: 0; min-height: 88px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quality-dimension:nth-child(3n) { border-right: 0; }
.quality-dimension:nth-last-child(-n+3) { border-bottom: 0; }
.quality-dimension > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.quality-dimension strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quality-dimension span { color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.quality-dimension small { display: block; margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.quality-progress { height: 5px; margin-top: 9px; border-radius: 4px; background: #e8eeec; overflow: hidden; }
.quality-progress i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.quality-progress i.quality-progress--warning { background: var(--amber); }
.quality-progress i.quality-progress--danger { background: var(--red); }
.quality-daily-section { margin-bottom: 14px; }
.table-wrap--quality-daily { max-height: 390px; }
.table-wrap--quality-issues { max-height: 720px; }
.quality-daily-table { min-width: 760px; }
.quality-issues-table { min-width: 1180px; }
.quality-issues-table--structured { min-width: 1880px; }
.quality-issues-table--structured td { vertical-align: top; }
.quality-issues-table--structured td:nth-child(2) { min-width: 190px; }
.quality-issues-table--structured td:nth-child(6) { min-width: 150px; }
.quality-issues-table--structured td:nth-child(10) { min-width: 300px; }
.quality-hint { display: block; max-width: 360px; color: #526267; line-height: 1.45; white-space: normal; }
.coverage-value { display: inline-block; min-width: 48px; color: var(--teal); font-weight: 800; text-align: right; }
.coverage-value--warning { color: var(--amber); }
.coverage-value--danger { color: var(--red); }
.table-footnote { min-height: 36px; display: flex; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-subtle); font-size: 9px; }

/* Postal tour planning */
.planning-control-band { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px; background: var(--surface); }
.planning-control-copy { min-width: 180px; display: flex; flex-direction: column; gap: 3px; }
.planning-control-copy strong { font-size: 12px; }
.planning-control-copy span { color: var(--muted); font-size: 9px; }
.planning-controls { min-width: 0; display: flex; align-items: end; justify-content: flex-end; gap: 10px; flex: 1; }
.range-field { width: 190px; display: flex; flex-direction: column; gap: 8px; }
.range-field > span, .planning-minimum > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.range-field > span strong { color: var(--ink); }
.range-field input { width: 100%; height: 16px; accent-color: var(--teal); cursor: pointer; }
.planning-minimum { width: 175px; display: flex; flex-direction: column; gap: 3px; }
.planning-minimum input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 6px 9px; background: #fff; }
.planning-controls .search-field { min-width: 170px; max-width: 240px; flex: 1 1 190px; }
.planning-basis-line { min-height: 36px; display: flex; align-items: center; gap: 0; margin-bottom: 14px; overflow-x: auto; color: var(--muted); font-size: 9px; white-space: nowrap; }
.planning-basis-line > span { padding: 0 12px; border-right: 1px solid var(--line-strong); }
.planning-basis-line > span:first-child { padding-left: 0; }
.planning-basis-line > span:last-child { border-right: 0; }
.planning-basis-line strong { color: var(--ink); }
.planning-routes-section { margin-bottom: 14px; }
.table-wrap--planning-routes { max-height: 610px; }
.table-wrap--planning-suggestions { max-height: 610px; }
.planning-routes-table { min-width: 1120px; }
.planning-suggestions-table { min-width: 1460px; }
.planning-load { min-width: 155px; display: grid; grid-template-columns: minmax(110px, 1fr) 38px; align-items: center; gap: 7px; }
.planning-load > span { position: relative; height: 7px; border-radius: 5px; background: #e7eeec; overflow: hidden; }
.planning-load i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.planning-load i.planning-load--danger { background: var(--red); }
.planning-load i.planning-load--info { background: var(--cyan); }
.planning-load > span b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #26383b; transform: translateX(-1px); }
.planning-load small { color: var(--muted); font-size: 8px; text-align: right; }
.planning-reason { max-width: 250px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Drivers */
.split-layout { display: grid; gap: 14px; align-items: start; }
.split-layout--drivers { grid-template-columns: minmax(380px, .8fr) minmax(560px, 1.2fr); }
.ranking-table { padding: 4px 10px 10px; }
.ranking-table--all { max-height: 680px; overflow: auto; }
.ranking-row { width: 100%; min-height: 56px; display: grid; grid-template-columns: 25px 30px minmax(120px,1fr) 72px 82px 72px 36px; align-items: center; gap: 7px; border: 0; border-bottom: 1px solid #edf1f0; padding: 4px 3px; text-align: left; background: transparent; cursor: pointer; }
.ranking-row:hover { background: var(--surface-subtle); }
.ranking-row.is-static { cursor: default; }
.ranking-row.is-static:hover { background: transparent; }
.rank-number.is-top { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); }
.rank-driver { min-width: 0; display: flex; flex-direction: column; }
.rank-driver strong, .rank-driver small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-driver strong { font-size: 10px; }
.rank-driver small { font-size: 8px; }
.rank-quality { color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 9px; font-weight: 700; text-align: right; }
.rank-target { font-size: 8px; font-weight: 800; white-space: nowrap; }
.rank-target.is-up { color: var(--success); }
.rank-target.is-down { color: var(--danger); }
.rank-target.is-stable { color: var(--muted); }
.rank-trend { min-width: 31px; padding: 1px 4px; border-radius: 3px; color: var(--muted); background: #edf1f0; font-size: 7px; font-weight: 850; text-align: center; }
.rank-trend.is-up { color: #087966; background: #dff2ed; }
.rank-trend.is-down { color: #a0412e; background: #f8e7e2; }
.rank-trend.is-stable { color: #526164; background: #edf1f0; }
.score-meter { height: 4px; border-radius: 4px; background: #e6edeb; overflow: hidden; }
.score-meter i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.ranking-subhead { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9f8; }
.ranking-subhead strong { font-size: 10px; }
.ranking-subhead span { color: var(--muted); font-size: 8px; }
.ranking-table--provisional .ranking-row { opacity: .76; }
.driver-master-section { min-width: 0; }
.driver-workspace { min-width: 0; }
.driver-toolbar { flex-wrap: wrap; align-items: end; }
.filter-row--right { justify-content: flex-end; }
.search-field--compact { min-width: 220px; flex: 0 1 310px; }
.split-layout--inside { padding: 14px; }
.section-toolbar--sub { min-height: 52px; border-top: 1px solid var(--line); }
.section-toolbar--sub > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.section-toolbar--sub strong { font-size: 12px; }
.section-toolbar--sub small { color: var(--muted); font-size: 10px; }
.vacation-calendar-panel { border-bottom: 1px solid var(--line); background: #fbfcfc; }
.calendar-panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.calendar-panel-head > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.calendar-panel-head strong { font-size: 12px; }
.calendar-panel-head small { color: var(--muted); font-size: 10px; }
.calendar-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; color: var(--muted); font-size: 9px; font-weight: 750; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend-vacation { background: #dbeeea; border: 1px solid #84beb2; }
.legend-sick { background: #dbeafe; border: 1px solid #4f86d9; }
.legend-covered { box-shadow: inset 0 -3px 0 var(--teal); }
.legend-open { box-shadow: inset 0 -3px 0 var(--amber); }
.year-calendar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.month-card { min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px; background: #fff; }
.month-card h3 { margin-bottom: 8px; font-size: 12px; text-transform: capitalize; }
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.month-weekdays { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-align: center; }
.year-day { position: relative; min-height: 28px; display: flex; align-items: flex-start; justify-content: flex-start; border: 1px solid #e6eeec; border-radius: 5px; padding: 4px; color: #5e6d70; background: #f8faf9; font-size: 9px; font-weight: 750; }
.year-day--empty { border-color: transparent; background: transparent; }
.year-day.is-weekend { color: #9aa5a7; background: #f1f4f3; }
.year-day.has-vacation { border-color: #9acbc1; color: #185d55; background: #e6f5f1; }
.year-day.has-sick { border-color: #95c4d5; color: #1d637e; background: #e8f4f9; }
.year-day.is-covered { box-shadow: inset 0 -3px 0 var(--teal); }
.year-day.is-open { box-shadow: inset 0 -3px 0 var(--amber); }
.year-day b { position: absolute; right: 3px; bottom: 3px; min-width: 14px; height: 14px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #244144; font-size: 8px; line-height: 1; }
.year-day.is-open b { background: var(--amber); }
.vacation-page-heading { margin-bottom: 14px; }
.vacation-subnav { width: fit-content; margin-bottom: 14px; background: #dfe8e5; }
.vacation-subnav button { position: relative; min-height: 36px; padding-inline: 18px; font-size: 11px; }
.vacation-subnav button b { min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 7px; border-radius: 9px; color: #fff; background: var(--amber); font-size: 9px; }
.vacation-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.vacation-summary > div { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 56px; padding: 13px 16px; border-right: 1px solid var(--line); }
.vacation-summary > div:last-child { border-right: 0; }
.vacation-summary span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.vacation-summary strong { font-size: 19px; }
.vacation-summary .is-warning { box-shadow: inset 0 3px 0 var(--amber); background: #fffbf4; }
.vacation-calendar-panel--large { border: 0; background: transparent; }
.vacation-calendar-panel--large .calendar-panel-head { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.vacation-calendar-panel--large .calendar-panel-head strong { font-size: 14px; }
.vacation-calendar-panel--large .calendar-panel-head small { font-size: 11px; }
.year-calendar--large { display: block; padding: 0; }
.month-card--large { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; padding: 0; background: #fff; overflow: hidden; box-shadow: 0 3px 12px rgba(22, 38, 41, .035); }
.month-card--large h2 { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 18px; text-transform: capitalize; }
.month-weekdays--large { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); background: #f5f8f7; font-size: 10px; }
.month-grid--large { gap: 0; border-left: 1px solid #e5ecea; background: #fff; }
.calendar-day { min-width: 0; min-height: 138px; padding: 8px; border-right: 1px solid #e5ecea; border-bottom: 1px solid #e5ecea; background: #fff; }
.calendar-day--empty { background: #f6f8f7; }
.calendar-day.is-weekend { background: #f8faf9; }
.calendar-day.has-entries { background: #fcfdfd; }
.calendar-day-number { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; color: #536467; }
.calendar-day-number strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar-day-number span { color: #8a9799; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.calendar-day-entries { display: grid; gap: 5px; }
.vacation-entry { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 3px; border: 1px solid; border-radius: 5px; padding: 6px 7px; text-align: left; cursor: pointer; }
.vacation-entry:hover { filter: brightness(.975); box-shadow: 0 2px 7px rgba(22, 38, 41, .08); }
.vacation-entry--vacation { border-color: #a8d3c9; color: #174f49; background: #eaf7f3; }
.vacation-entry--sick { border-color: #a8cfdd; color: #1a5970; background: #edf7fa; }
.vacation-entry.is-open { border-color: #dfbd82; box-shadow: inset 3px 0 0 var(--amber); background: #fff8eb; color: #714715; }
.vacation-entry--sick.is-open { border-color: #7ca8e8; box-shadow: inset 3px 0 0 #2f6fd6; background: #eaf2ff; color: #174b91; }
.vacation-entry-person { min-width: 0; display: flex; align-items: flex-start; gap: 5px; }
.vacation-entry-person i { width: 16px; height: 16px; display: grid; place-items: center; flex: 0 0 16px; border-radius: 3px; color: #fff; background: var(--teal); font-size: 8px; font-style: normal; font-weight: 850; }
.vacation-entry--sick .vacation-entry-person i { background: var(--cyan); }
.vacation-entry.is-open .vacation-entry-person i { background: var(--amber); }
.vacation-entry--sick.is-open .vacation-entry-person i { background: #2f6fd6; }
.vacation-entry-person strong { min-width: 0; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
.vacation-entry-replacement { padding-left: 21px; font-size: 9px; line-height: 1.25; overflow-wrap: anywhere; }
.vacation-entry-replacement b { font-weight: 800; }
.vacation-request-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.vacation-request-summary > div { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-right: 1px solid var(--line); }
.vacation-request-summary > div:last-child { border-right: 0; }
.vacation-request-summary span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.vacation-request-summary strong { font-size: 20px; }
.vacation-request-summary .is-open { box-shadow: inset 0 3px 0 var(--amber); background: #fffbf4; }
.vacation-request-summary .is-approved { box-shadow: inset 0 3px 0 var(--teal); }
.vacation-request-table { min-width: 980px; }
.vacation-request-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.vacation-request-actions .action-approve { color: var(--teal); border-color: #b8d8d1; background: var(--teal-soft); }
.vacation-request-actions .action-reject { color: var(--red); border-color: #e7c1be; background: var(--red-soft); }
.tour-entry-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.tour-entry-actions .action-approve { color: var(--teal); border-color: #b8d8d1; background: var(--teal-soft); }

/* Import */
.import-layout { display: grid; gap: 14px; }
.import-status-panel { min-height: 74px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; border: 1px solid #ead2a9; border-radius: 7px; padding: 14px 16px; background: #fffaf0; }
.import-status-panel strong { display: block; color: #5d421c; font-size: 13px; }
.import-status-panel p { margin-top: 4px; color: #7a5d2a; font-size: 11px; line-height: 1.5; }
.import-audit-panel { border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.import-audit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.import-audit-head h2 { margin: 2px 0 3px; font-size: 17px; }
.import-audit-head p { color: var(--muted); font-size: 10px; }
.import-audit-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.import-audit-metrics .metric { border: 0; border-right: 1px solid var(--line); border-radius: 0; }
.import-audit-metrics .metric:last-child { border-right: 0; }
.import-audit-body { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1fr) minmax(240px, .9fr); gap: 14px; padding: 14px 17px; }
.import-audit-checks, .import-audit-files { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.import-audit-check { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.import-audit-check small, .import-audit-files span { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.import-audit-files strong { color: var(--ink); font-weight: 750; }
.import-audit-warnings { margin: 0; padding-left: 16px; color: #8c5a15; font-size: 10px; line-height: 1.55; }
.import-audit-ok { color: var(--teal); font-size: 10px; font-weight: 750; }
.import-warning { display: block; margin-top: 4px; color: #95631d; font-size: 10px; }
.import-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.import-history-table tr.is-muted { opacity: .68; }
.import-history-table tr.is-muted:hover { opacity: 1; }
.import-history-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 0; }
.import-history-file + .import-history-file { border-top: 1px solid #eef3f1; }
.import-history-file.is-inactive strong { color: var(--muted); text-decoration: line-through; }
.import-history-file span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.import-history-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recycle-section .empty-state { margin: 0; }
.recycle-table { min-width: 980px; }
.change-history-table { min-width: 1120px; }
.change-field-list { display: flex; flex-direction: column; gap: 4px; }
.change-field-list span { display: flex; flex-direction: column; gap: 1px; }
.change-field-list small, .change-field-list em { color: var(--muted); font-size: 9px; font-style: normal; }
.change-field-list strong { font-size: 10px; }
.upload-zone { min-height: 100px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px dashed #aebdb9; border-radius: 7px; padding: 14px; background: #fbfcfc; cursor: pointer; }
.upload-zone:hover { border-color: var(--teal); background: #f5faf8; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-zone--photos, .upload-zone--documents { margin-top: 8px; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; color: var(--teal); background: var(--teal-soft); }
.upload-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.upload-copy strong { font-size: 12px; }
.upload-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.upload-action { display: flex; align-items: center; gap: 5px; color: var(--teal); font-size: 10px; font-weight: 750; white-space: nowrap; }
.driver-admin-panel { display: grid; gap: 14px; padding: 14px; }
.driver-import-rules { margin: 0; }
.driver-list-upload { min-height: 88px; }
.driver-import-preview { border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.driver-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.driver-import-head h2 { margin: 2px 0 3px; font-size: 16px; }
.driver-import-head p { color: var(--muted); font-size: 10px; }
.driver-import-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.driver-import-summary > div { min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 10px 14px; border-right: 1px solid var(--line); }
.driver-import-summary > div:last-child { border-right: 0; }
.driver-import-summary span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.driver-import-summary strong { font-size: 20px; }
.driver-import-summary small { color: var(--muted); font-size: 9px; }
.driver-import-warnings { margin: 0; padding: 11px 18px 11px 32px; border-bottom: 1px solid #f0dec1; color: #825412; background: #fff9ee; font-size: 10px; line-height: 1.5; }
.driver-import-ok { display: flex; align-items: center; gap: 7px; padding: 11px 17px; border-bottom: 1px solid var(--line); color: var(--teal); font-size: 10px; font-weight: 750; }
.driver-import-table { min-width: 980px; }
.driver-import-table td:first-child { min-width: 128px; }
.driver-import-table small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.driver-import-actions { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 17px; border-top: 1px solid var(--line); background: #fbfcfc; }
.driver-import-actions span { margin-right: auto; color: var(--muted); font-size: 10px; }
.file-cell { min-width: 180px; display: flex; align-items: center; gap: 8px; }
.file-cell > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.file-cell strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 5px; color: var(--cyan); background: var(--cyan-soft); }

/* Billing */
.billing-status { min-height: 55px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; border: 1px solid #eed5aa; border-radius: 6px; padding: 9px 13px; background: var(--amber-soft); }
.billing-status--closed { border-color: #bfe0d9; background: var(--teal-soft); }
.billing-status-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 50%; color: var(--amber); background: #fff; }
.billing-status--closed .billing-status-icon { color: var(--teal); }
.billing-status > div { min-width: 0; display: flex; flex-direction: column; }
.billing-status strong { font-size: 11px; }
.billing-status span { color: #6e6554; font-size: 10px; }
.billing-status .text-button { margin-left: auto; color: #955b18; }
.select-field--toolbar { margin-left: auto; }
.quality-rule-band { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fffaf1; color: #625b4d; font-size: 10px; }
.quality-rule-band i { width: 1px; height: 25px; background: #e2d5bd; }
.quality-rule-number { color: var(--amber); font-size: 18px; font-weight: 800; }
.rules-layout { min-width: 0; }

/* Tax office */
.tax-office-overview { margin-bottom: 16px; overflow: hidden; }
.tax-office-overview { display: flex; flex-direction: column; }
.tax-office-overview > .section-title { order: 1; }
.tax-office-overview-wrap--compensation { order: 2; }
.tax-office-overview > .table-wrap:not(.tax-office-overview-wrap--compensation) { display: none; }
.tax-office-overview-table { min-width: 2180px; }
.tax-office-overview-table--compensation { min-width: 3350px; }
.tax-office-overview-table tbody tr { cursor: pointer; }
.tax-office-overview-table tbody tr:nth-child(odd) { background: #d8eef7; }
.tax-office-overview-table tbody tr.is-selected { box-shadow: inset 4px 0 0 var(--teal); background: #bfe3f1; }
.tax-office-driver-form { overflow: hidden; }
.tax-office-print-sheet { padding: 16px; background: #fff; }
.tax-office-title { min-height: 42px; display: flex; align-items: center; padding: 8px 12px; color: #fff; background: #16324f; font-size: 18px; font-weight: 800; }
.tax-office-identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; margin-bottom: 14px; background: #eaf0f6; }
.tax-office-identity span { min-height: 34px; display: grid; grid-template-columns: 40% minmax(0, 1fr); align-items: center; padding: 6px 10px; }
.tax-office-identity b, .tax-office-identity strong { font-size: 11px; }
.tax-office-tour-wrap { max-width: 980px; max-height: 560px; border: 1px solid #d9e2ec; }
.tax-office-tour-table { min-width: 780px; }
.tax-office-tour-table th { color: #fff; background: #2a6f62; }
.tax-office-tour-table tbody tr:nth-child(odd) { background: #c6e6f3; }
.tax-office-summary { width: min(560px, 100%); margin-top: 24px; }
.tax-office-summary h3 { min-height: 34px; display: flex; align-items: center; margin: 0; padding: 7px 10px; color: #fff; background: #16324f; font-size: 12px; }
.tax-office-summary > label, .tax-office-summary > div { min-height: 37px; display: grid; grid-template-columns: minmax(190px, 46%) minmax(0, 1fr); align-items: stretch; border: 1px solid #d9e2ec; border-top: 0; }
.tax-office-summary > label > span, .tax-office-summary > div > span { display: flex; align-items: center; padding: 7px 10px; color: #1f2937; background: #eaf0f6; font-size: 10px; font-weight: 800; }
.tax-office-summary input, .tax-office-summary textarea, .tax-office-summary > div > strong { width: 100%; min-height: 35px; border: 0; border-left: 1px solid #d9e2ec; border-radius: 0; padding: 8px 10px; outline: 0; background: #fff; text-align: right; font: inherit; font-size: 11px; }
.tax-office-summary textarea { min-height: 58px; resize: vertical; text-align: left; }
.tax-office-summary .tax-office-input-highlight input { background: #fff3bf; }
.tax-office-summary .tax-office-total strong { font-size: 13px; font-weight: 850; }
.tax-office-summary .tax-office-note { grid-template-columns: minmax(190px, 46%) minmax(360px, 1fr); width: min(920px, calc(100vw - 80px)); }
.tax-office-actions { min-height: 62px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; border-top: 1px solid var(--line); padding: 10px 16px; }
.tax-office-actions > span { color: var(--muted); font-size: 9px; }
.form-subsection { padding-top: 10px; border-top: 1px solid var(--line); }
.form-subsection h3 { margin: 0 0 4px; font-size: 12px; }
.form-subsection p { margin: 0; color: var(--muted); font-size: 10px; }

/* Drawer and modal */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(9, 20, 22, .36); backdrop-filter: blur(2px); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(450px, 100vw); display: flex; flex-direction: column; background: #fff; box-shadow: -15px 0 40px rgba(10,25,27,.18); animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(25px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { font-size: 20px; }
.drawer-header p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.drawer-body { flex: 1 1 auto; overflow: auto; padding: 17px 20px 30px; }
.detail-status-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.detail-section { padding: 17px 0; border-top: 1px solid var(--line); }
.detail-section:first-of-type { border-top: 0; }
.detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-section h3 { margin-bottom: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.detail-grid > div { min-height: 63px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px; background: var(--surface-subtle); }
.detail-grid span { color: var(--muted); font-size: 9px; }
.detail-grid strong { margin-top: 4px; font-size: 16px; }
.scan-timeline { display: grid; grid-template-columns: auto minmax(30px,1fr) auto; align-items: center; gap: 10px; }
.scan-timeline > span { display: grid; grid-template-columns: 9px auto; column-gap: 6px; align-items: center; }
.scan-timeline i { grid-row: span 2; width: 9px; height: 9px; border: 2px solid var(--teal); border-radius: 50%; }
.scan-timeline small { font-size: 8px; }
.scan-timeline strong { font-size: 14px; }
.scan-timeline > b { height: 2px; background: #cfe0dc; }
.detail-note { margin-top: 10px; border-radius: 4px; padding: 7px 9px; color: var(--muted); background: #eef3f2; font-size: 10px; }
.detail-note--warning { color: #8e591a; background: var(--amber-soft); }
.checkpoint-summary-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
.checkpoint-summary-row > div { min-width: 0; min-height: 58px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: var(--surface-subtle); }
.checkpoint-summary-row span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.checkpoint-summary-row strong { margin-top: 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkpoint-summary-row small { margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkpoint-history-tiles { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.checkpoint-history-tile { min-width: 68px; padding: 6px 8px; border-radius: 6px; }
.checkpoint-history-tile b { font-size: 9px; }
.checkpoint-history-tile strong { font-size: 13px; }
.checkpoint-history-tile small { font-size: 8px; }
.checkpoint-history-wrap { max-height: 292px; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; }
.checkpoint-history-table { min-width: 460px; }
.checkpoint-history-table th, .checkpoint-history-table td { padding: 6px 7px; font-size: 9px; }
.checkpoint-link { padding: 0; white-space: nowrap; }
.worktime-table-wrap { max-height: 320px; margin-top: 10px; border: 1px solid var(--line); border-radius: 6px; }
.worktime-table { min-width: 0; }
.worktime-table th, .worktime-table td { padding: 6px 7px; font-size: 9px; }
.money-list { margin: 0; }
.money-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #edf1f0; }
.money-list dt { color: var(--muted); }
.money-list dd { margin: 0; font-weight: 700; }
.money-list .money-total { margin-top: 4px; border-bottom: 0; font-size: 14px; }
.money-list .money-total dt, .money-list .money-total dd { color: var(--ink); font-weight: 800; }
.vehicle-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photo-tile { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 7px; color: inherit; background: var(--surface-subtle); }
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: #edf1f0; }
.photo-tile span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.photo-placeholder { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: 5px; color: var(--muted); background: #edf1f0; }
.photo-placeholder small { display: block; margin-top: 4px; font-size: 9px; font-weight: 700; }
.photo-placeholder--compact { height: 100%; aspect-ratio: auto; }
.photo-placeholder--compact small { display: none; }
.accident-photo-preview { display: flex; align-items: center; gap: 4px; min-width: 120px; }
.accident-photo-preview button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; cursor: zoom-in; }
.accident-photo-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.accident-photo-preview .photo-placeholder { width: 100%; height: 100%; }
.accident-photo-preview span, .accident-photo-preview small { min-width: 24px; color: var(--muted); font-size: 10px; font-weight: 700; }
.photo-grid--actions { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-tile--button { padding: 0; overflow: hidden; }
.photo-tile--button > button { display: flex; flex-direction: column; gap: 5px; width: 100%; padding: 7px; border: 0; color: inherit; background: transparent; text-align: left; cursor: zoom-in; }
.photo-actions { display: flex; justify-content: flex-end; gap: 5px; padding: 0 7px 7px; }
.accident-photo-viewer .modal-header { align-items: center; }
.accident-photo-stage { position: relative; }
.gallery-nav { position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #fff; background: rgba(0,0,0,.48); transform: translateY(-50%); cursor: pointer; }
.gallery-nav--prev { left: 18px; transform: translateY(-50%) rotate(180deg); }
.gallery-nav--next { right: 18px; }
.document-list { display: grid; gap: 7px; }
.document-list--form { margin-top: 10px; }
.document-row { min-height: 42px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; color: inherit; background: var(--surface-subtle); }
.document-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.document-row strong, .document-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-row strong { font-size: 10px; }
.document-row small { font-size: 9px; }
.driver-title { display: flex; align-items: center; gap: 12px; }
.compact-list button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #edf1f0; padding: 7px 3px; text-align: left; background: transparent; cursor: pointer; }
.compact-list button > span { display: flex; align-items: center; gap: 4px; }
.compact-list button > span:first-child { flex-direction: column; align-items: flex-start; }
.compact-list small { font-size: 9px; }
.check-list { display: grid; gap: 7px; }
.check-row { display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 5px; padding: 10px; }
.check-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; }
.check-icon--success { color: var(--teal); background: var(--teal-soft); }
.check-icon--warning { color: var(--amber); background: var(--amber-soft); }
.check-row > span:nth-child(2) { display: flex; flex-direction: column; }
.check-row strong { font-size: 10px; }
.check-row small { margin-top: 2px; font-size: 8px; }
.check-row em { margin-top: 7px; color: #657478; font-size: 9px; font-style: normal; }
.check-value { font-size: 10px; font-weight: 800; }
.profile-company { display: flex; align-items: center; gap: 10px; }
.profile-company > span:last-child { display: flex; flex-direction: column; }
.modal { position: fixed; left: 50%; top: 50%; z-index: 80; width: min(590px, calc(100vw - 28px)); max-height: calc(100vh - 30px); overflow: auto; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(10,25,27,.24); transform: translate(-50%, -50%); }
.modal-form { display: flex; flex-direction: column; }
.modal-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 19px; }
.modal-body { padding: 18px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.period-list { display: grid; gap: 7px; padding: 14px; background: #f5f8f7; }
.period-list > button { min-height: 62px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.period-list > button:hover, .period-list > button.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(31,112,94,.08); }
.period-list > button > span:first-child { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; background: var(--brand-soft); color: var(--brand); }
.period-list > button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.period-list strong { font-size: 12px; text-transform: capitalize; }
.period-list small { color: var(--muted); font-size: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 12px; }
.field--wide { grid-column: 1 / -1; }
.toggle-field { min-height: 40px; display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field > span { position: relative; width: 37px; height: 21px; border-radius: 12px; background: #cad5d2; cursor: pointer; }
.toggle-field > span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle-field input:checked + span { background: var(--teal); }
.toggle-field input:checked + span::after { transform: translateX(16px); }
.toggle-field b { font-size: 11px; }
.photo-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.photo-strip span { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.photo-strip img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; }
.photo-strip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirm-modal { padding: 28px; text-align: center; }
.confirm-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 50%; color: var(--brand); background: var(--red-soft); }
.confirm-modal h2 { font-size: 19px; }
.confirm-modal p { max-width: 400px; margin: 8px auto 21px; color: var(--muted); font-size: 11px; }
.confirm-actions { display: flex; justify-content: center; gap: 8px; }
.confirm-summary { display: grid; gap: 4px; margin: 12px auto; padding: 11px 12px; max-width: 440px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); }
.confirm-summary strong { font-size: 12px; }
.confirm-summary small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.conflict-modal .confirm-icon { color: #a35b00; background: var(--amber-soft); }
.conflict-modal .confirm-summary { border-color: #f0d39e; background: #fff8eb; }

/* Tagesstart / Plan-Stopps */
.daily-start-upload { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(440px, 1.2fr); align-items: stretch; gap: 14px; margin-bottom: 18px; }
.daily-start-dropzone { min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed #9eb9b3; border-radius: 7px; padding: 20px; color: var(--teal); background: #f8fbfa; text-align: center; cursor: pointer; }
.daily-start-dropzone:hover { border-color: var(--teal); background: #f1f8f6; }
.daily-start-dropzone strong { color: var(--ink); font-size: 14px; }
.daily-start-dropzone small { width: 100%; max-width: 520px; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.daily-start-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.daily-start-process { min-height: 132px; display: grid; grid-template-columns: repeat(7, auto); align-items: center; justify-content: center; gap: 9px; border-block: 1px solid var(--line); padding: 18px; background: var(--surface); }
.daily-start-process span { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.daily-start-process b { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: 10px; }
.daily-start-process i { color: #a4b0ad; }
.daily-start-review { margin-bottom: 18px; }
.daily-start-source { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.daily-start-source > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.daily-start-source > div > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.daily-start-source strong, .daily-start-source small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-start-source strong { font-size: 11px; }
.daily-start-source small { color: var(--muted); font-size: 9px; }
.daily-start-file-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: #e7f3f0; }
.daily-start-edit-table { min-width: 1120px; }
.daily-start-results-table { min-width: 1080px; }
.table-input { width: 100%; min-width: 130px; height: 34px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; background: #fff; font: inherit; }
.table-input:focus { border-color: var(--teal); outline: 2px solid rgba(24, 126, 112, .12); }
.table-input--code { min-width: 85px; text-transform: uppercase; font-weight: 800; }
.table-input--number { min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.table-input--note { min-width: 220px; }
.daily-start-review-actions { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.daily-start-results { margin-bottom: 18px; }
.planning-dashboard-table { min-width: 820px; }

/* Formular-Center */
.form-center-filters { min-height: 64px; display: flex; align-items: end; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.form-version-filter { width: 120px; margin: 0; }
.form-version-filter input { height: 38px; }
.form-template-table { min-width: 1120px; }
.driver-document-table { min-width: 1050px; }
.activity-table { min-width: 1280px; }
.activity-log-note { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; color: var(--ink); margin-bottom: 10px; }
.activity-log-note svg { color: var(--teal); flex: 0 0 auto; }
.activity-log-note span { display: flex; flex-direction: column; gap: 2px; }
.activity-log-note small { color: var(--muted); font-size: 9px; }
.activity-change-list, .activity-detail-grid { display: flex; flex-direction: column; gap: 5px; }
.activity-change-list span, .activity-detail-grid span { display: flex; flex-direction: column; gap: 1px; }
.activity-change-list strong, .activity-detail-grid strong { font-size: 10px; }
.activity-change-list small, .activity-change-list em, .activity-detail-grid small, .activity-detail-grid em { color: var(--muted); font-size: 9px; font-style: normal; }
.activity-change-list b { color: var(--ink); font-weight: 750; }
.table-actions { display: flex; align-items: center; gap: 2px; }
.table-actions a { text-decoration: none; }
.scanner-toolbar { gap: 10px; flex-wrap: wrap; }
.scanner-toolbar .search-field { min-width: min(360px, 100%); flex: 1 1 320px; }
.scanner-table td:first-child small { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.scanner-table .table-actions { min-width: 150px; }
.scanner-metrics .metric strong { font-variant-numeric: tabular-nums; }
.form-warning { display: flex; align-items: center; gap: 9px; margin: 0 18px 18px; border: 1px solid #f0d39e; border-radius: 6px; padding: 11px 12px; color: #8a510f; background: var(--amber-soft); font-size: 12px; }
.driver-document-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.driver-document-toolbar > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.driver-document-toolbar strong { font-size: 12px; }
.driver-document-toolbar span { color: var(--muted); font-size: 10px; }
.driver-document-toolbar .heading-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.table-actions .action-autofill { color: var(--teal); border-color: #b8d8d1; background: var(--teal-soft); }
.attachment-button { border: 0; padding: 0; background: transparent; cursor: pointer; font: inherit; }
.temporary-scan-history { border-bottom: 1px solid var(--line); background: #fbfcfc; }
.temporary-scan-history .section-title { padding: 13px 14px; }
.temporary-scan-history h3 { margin: 0; font-size: 12px; }
.temporary-scan-history p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.temporary-scan-history table { min-width: 760px; }
.direct-form-fill { padding: 16px; background: #f5f8f7; }
.direct-form-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 14px; align-items: start; }
.direct-form-card { min-width: 0; border: 1px solid var(--line); background: #fff; }
.direct-form-card .section-title { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.direct-form-card .auto-fill-note { margin: 12px; }
.direct-fill-template-list { max-height: 490px; margin: 0; padding: 12px; }
.form-packet-history { padding: 16px; border-top: 1px solid var(--line); background: #fff; }
.form-packet-history .section-title { padding: 0 0 12px; }
.form-packet-table { min-width: 980px; }
.modal:has(.form-packet-viewer) { width: min(1120px, 96vw); max-width: none; }
.form-packet-viewer { width: 100%; background: #fff; }
.form-packet-meta { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.form-packet-meta > span:not(.pill) { min-width: 0; display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.form-packet-meta strong { color: var(--muted); font-size: 8px; }
.form-packet-meta small { overflow: hidden; color: var(--text); font-size: 10px; font-weight: 750; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.form-packet-preview { height: min(72vh, 820px); display: grid; place-items: stretch; padding: 12px; background: #dfe5e2; }
.form-packet-preview-frame { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.auto-fill-note { display: flex; align-items: center; gap: 10px; border: 1px solid #b8d8d1; border-radius: 6px; padding: 12px; color: var(--teal); background: var(--teal-soft); }
.auto-fill-note > span { display: flex; flex-direction: column; gap: 3px; }
.auto-fill-note strong { font-size: 10px; }
.auto-fill-note small { color: var(--muted); font-size: 9px; }
.form-download-strip { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 13px; padding: 12px 14px; border: 1px solid #b8d8d1; border-radius: 6px; color: var(--teal); background: var(--teal-soft); }
.form-download-strip > span { min-width: 0; display: flex; align-items: center; gap: 10px; }
.form-download-strip > span > svg { flex: 0 0 auto; }
.form-download-strip strong { display: block; color: var(--ink); font-size: 11px; }
.form-download-strip small { display: block; color: var(--muted); font-size: 9px; line-height: 1.4; }
.form-download-links-modal { width: min(720px, calc(100vw - 28px)); max-width: 720px; align-items: stretch; text-align: left; }
.form-download-list { max-height: 62vh; overflow: auto; display: grid; gap: 8px; padding: 4px 0; }
.form-download-list a { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); text-decoration: none; }
.form-download-list a:hover { border-color: #b8d8d1; color: var(--teal); background: var(--teal-soft); }
.form-download-list a svg { flex: 0 0 auto; }
.form-download-list strong { display: block; font-size: 11px; }
.form-download-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.form-template-kind { width: fit-content; margin-top: 4px; padding: 2px 5px; border: 1px solid #b8d8d1; border-radius: 3px; color: var(--teal); background: var(--teal-soft); font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.template-field-tags { display: flex; flex-wrap: wrap; gap: 4px; max-width: 270px; margin-top: 6px; }
.template-field-tags span { max-width: 135px; overflow: hidden; padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-subtle); color: var(--muted); font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.direct-form-card--fields { grid-column: 1 / -1; }
.form-custom-fields-modal > .form-grid { margin-top: 8px; padding: 10px; border: 1px solid var(--line); background: var(--surface-subtle); }
.form-custom-fields-modal > small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.employee-paper-create, .employee-paper-review { padding: 16px; background: #f5f8f7; }
.employee-paper-intro { min-height: 66px; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-left: 3px solid var(--teal); background: #fff; }
.employee-paper-intro-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; color: var(--teal); background: var(--teal-soft); }
.employee-paper-intro > span:last-child { min-width: 0; }
.employee-paper-intro strong, .employee-paper-intro small { display: block; }
.employee-paper-intro small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.employee-paper-form-grid { padding: 14px; border: 1px solid var(--line); background: #fff; }
.employee-paper-template-section { margin-top: 14px; border: 1px solid var(--line); background: #fff; }
.employee-paper-template-section .section-title { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.employee-paper-template-list { padding: 12px; }
.employee-paper-output-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.employee-paper-output-options label { cursor: pointer; }
.employee-paper-output-options input { position: absolute; opacity: 0; pointer-events: none; }
.employee-paper-output-options span { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; font-size: 9px; }
.employee-paper-output-options input:checked + span { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.employee-paper-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.employee-paper-history { padding: 16px; border-top: 1px solid var(--line); background: #fff; }
.employee-paper-history .section-title { padding: 0 0 12px; }
.employee-paper-batches { display: grid; gap: 9px; }
.employee-paper-batch { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.employee-paper-batch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.employee-paper-batch-head > span:first-child { min-width: 0; }
.employee-paper-batch-head strong, .employee-paper-batch-head small { display: block; }
.employee-paper-batch-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.employee-paper-batch > p { margin: 9px 0 0; color: var(--muted); font-size: 9px; }
.employee-paper-downloads { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.employee-paper-file { min-width: 0; max-width: 320px; height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: #fff; cursor: pointer; }
.employee-paper-file:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.employee-paper-file span { overflow: hidden; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.employee-paper-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); background: #fff; }
.employee-paper-review-head h2 { margin: 3px 0; font-size: 17px; }
.employee-paper-review-head p { margin: 0; color: var(--muted); font-size: 9px; }
.employee-paper-review-table { min-width: 960px; }
.employee-paper-review-table td > small { display: block; max-width: 300px; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; white-space: normal; }
.employee-paper-name-input { min-width: 180px; }
.employee-paper-blocker, .employee-paper-ready { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px; border-left: 3px solid var(--amber); background: var(--amber-soft); }
.employee-paper-ready { border-left-color: var(--teal); background: var(--teal-soft); }
.employee-paper-blocker > span, .employee-paper-ready > span { min-width: 0; }
.employee-paper-blocker strong, .employee-paper-blocker small, .employee-paper-ready strong, .employee-paper-ready small { display: block; }
.employee-paper-blocker small, .employee-paper-ready small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.employee-paper-readonly { margin: 16px; }
.modal:has(.employee-paper-position-modal) { width: min(980px, 96vw); max-width: none; }
.employee-paper-position-modal { width: 100%; }
.employee-paper-position-tools { display: grid; grid-template-columns: minmax(260px, 1fr) 100px 120px auto; align-items: end; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.employee-paper-position-tools .field { margin: 0; }
.employee-paper-page-count { min-height: 36px; display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 9px; font-weight: 800; }
.employee-paper-preview-stage { height: min(68vh, 720px); display: grid; place-items: start center; padding: 16px; background: #dfe5e2; overflow: auto; }
.employee-paper-preview-stage canvas { max-width: 100%; height: auto; display: block; background: #fff; box-shadow: 0 5px 22px rgba(18, 40, 34, .18); cursor: crosshair; }
.template-checklist { max-height: 330px; display: grid; gap: 7px; margin-top: 6px; overflow: auto; }
.template-checklist label { min-height: 49px; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; background: var(--surface-subtle); cursor: pointer; }
.template-checklist label span { display: flex; flex-direction: column; gap: 2px; }
.template-checklist label small { color: var(--muted); font-size: 9px; }

/* Tourenbuch-Filterauswertung */
.tour-filter-summary { margin-bottom: 16px; }
.filter-summary-identity { display: grid; grid-template-columns: 1fr 1fr 2fr; border-bottom: 1px solid var(--line); }
.filter-summary-identity span { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-right: 1px solid var(--line); overflow-wrap: anywhere; font-size: 11px; }
.filter-summary-identity span:last-child { border-right: 0; }
.filter-summary-identity b { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.filter-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.filter-summary-grid div { min-height: 68px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-summary-grid div:nth-child(5n) { border-right: 0; }
.filter-summary-grid div:nth-last-child(-n+5) { border-bottom: 0; }
.filter-summary-grid span { color: var(--muted); font-size: 9px; }
.filter-summary-grid strong { font-size: 15px; overflow-wrap: anywhere; }

/* Fahrer-Monatsgespraeche */
.review-controls { min-height: 72px; display: flex; align-items: end; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.review-data-source { display: flex; align-items: center; gap: 6px; margin: 0 0 10px auto; color: var(--teal); font-size: 10px; font-weight: 700; }
.driver-review-form { background: #eef2f0; }
.review-print-sheet { margin: 0 auto; padding: 30px 34px; background: #fff; }
.review-print-header { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.review-print-header div { display: flex; flex-direction: column; gap: 2px; }
.review-print-header span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.review-print-header h2 { font-size: 20px; }
.review-print-header p { color: var(--muted); font-size: 10px; }
.review-identity { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; border-block: 1px solid var(--line); }
.review-identity span { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-right: 1px solid var(--line); font-size: 11px; overflow-wrap: anywhere; }
.review-identity span:last-child { border-right: 0; }
.review-identity b { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.review-block { margin-top: 22px; }
.review-block h3 { margin-bottom: 9px; font-size: 12px; text-transform: uppercase; }
.review-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.review-kpi-grid div { min-height: 63px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 9px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-kpi-grid span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.review-kpi-grid strong { font-size: 14px; }
.review-error-table { min-width: 620px; }
.review-total-row { background: var(--surface-subtle); }
.review-note { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.review-notes .form-grid { gap: 10px 12px; }
.review-signatures { display: grid; grid-template-columns: 1fr 1fr .45fr; gap: 28px; margin-top: 55px; }
.review-signatures div { height: 44px; border-bottom: 1px solid #53605c; }
.review-signatures span { display: block; margin-top: 48px; color: var(--muted); font-size: 9px; }
.review-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px; border-top: 1px solid var(--line); background: var(--surface-subtle); }
.review-history { border-top: 1px solid var(--line); background: #fff; }

/* Tages-Cockpit */
.cockpit-date-band { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; border-block: 1px solid var(--line); padding: 10px 14px; background: var(--surface); }
.cockpit-date-band > div { display: flex; flex-direction: column; gap: 3px; }
.cockpit-date-band strong { font-size: 12px; }
.cockpit-date-band span { color: var(--muted); font-size: 10px; }
.cockpit-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.cockpit-checks > div { min-height: 70px; display: grid; grid-template-columns: 31px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 9px; padding: 10px 13px; border-right: 1px solid var(--line); }
.cockpit-checks > div:last-child { border-right: 0; }
.cockpit-checks > div > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.cockpit-checks .is-complete > span { color: var(--teal); background: #e5f3ef; }
.cockpit-checks .is-open > span { color: var(--amber); background: var(--amber-soft); }
.cockpit-checks strong { font-size: 11px; }
.cockpit-checks small { color: var(--muted); font-size: 9px; }
.cockpit-task-list { display: grid; }
.cockpit-task { min-height: 78px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.cockpit-task:last-child { border-bottom: 0; }
.cockpit-task-priority { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); background: var(--surface-subtle); }
.cockpit-task--danger .cockpit-task-priority { color: var(--red); background: var(--red-soft); }
.cockpit-task--warning .cockpit-task-priority { color: var(--amber); background: var(--amber-soft); }
.cockpit-task--info .cockpit-task-priority { color: var(--cyan); background: var(--cyan-soft); }
.cockpit-task > div:nth-child(2) { min-width: 0; }
.cockpit-task-title { display: flex; align-items: center; gap: 7px; }
.cockpit-task-title strong { font-size: 12px; }
.cockpit-task p { margin: 4px 0; color: #526266; font-size: 10px; }
.cockpit-task small { color: var(--muted); font-size: 9px; }
.cockpit-task-actions { display: flex; align-items: center; gap: 4px; }
.cockpit-task.is-done { opacity: .62; }
.cockpit-task.is-done .cockpit-task-title strong { text-decoration: line-through; }
.cockpit-all-clear { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--teal); text-align: center; }
.cockpit-all-clear strong { color: var(--ink); font-size: 14px; }
.cockpit-all-clear small { color: var(--muted); font-size: 10px; }
.cockpit-dashboard-list { padding: 4px 10px 9px; }
.cockpit-dashboard-list > button { width: 100%; min-height: 48px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #edf1f0; padding: 5px 4px; background: transparent; text-align: left; cursor: pointer; }
.cockpit-dashboard-list > button:last-child { border-bottom: 0; }
.cockpit-dashboard-list > button:hover { background: var(--surface-subtle); }
.cockpit-dashboard-list > button > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.cockpit-dashboard-list strong, .cockpit-dashboard-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-dashboard-list strong { font-size: 10px; }
.cockpit-dashboard-list small { color: var(--muted); font-size: 8px; }
.cockpit-all-clear--dashboard { min-height: 220px; }

/* Toast */
#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 250px; display: flex; align-items: center; gap: 8px; border: 1px solid #b9dcd4; border-radius: 6px; padding: 10px 12px; color: #155f56; background: #f4fbf9; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast--warning { border-color: #ead2a9; color: #8d5615; background: #fffaf0; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast span { font-size: 11px; font-weight: 700; }

@media (max-width: 1220px) {
  :root { --sidebar-width: 232px; }
  .workspace { padding: 20px; }
  .workspace-launcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-strip--seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-strip--eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .metric-strip--four { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .metric-strip--four .metric:nth-child(3) { border-right: 1px solid var(--line); }
  .metric-strip--four .metric:nth-child(-n+3) { border-bottom: 0; }
  .topbar-search { width: min(300px, 31vw); }
  .split-layout--drivers { grid-template-columns: 1fr; }
  .driver-ranking-panel { order: 2; }
  .quality-index-band { grid-template-columns: 190px minmax(0, 1fr); }
  .quality-dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-dimension:nth-child(3n) { border-right: 1px solid var(--line); }
  .quality-dimension:nth-child(2n) { border-right: 0; }
  .quality-dimension:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .quality-dimension:nth-last-child(-n+2) { border-bottom: 0; }
  .planning-control-band { align-items: flex-start; flex-direction: column; }
  .planning-controls { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .year-calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .daily-start-upload { grid-template-columns: 1fr; }
  .daily-start-process { min-height: auto; }
  .filter-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-summary-grid div:nth-child(5n) { border-right: 1px solid var(--line); }
  .filter-summary-grid div:nth-child(3n) { border-right: 0; }
  .filter-summary-grid div:nth-last-child(-n+5) { border-bottom: 1px solid var(--line); }
  .filter-summary-grid div:nth-last-child(-n+3) { border-bottom: 0; }
  .calendar-day { min-height: 128px; padding: 6px; }
  .vacation-entry { padding: 5px 6px; }
}

@media (max-width: 960px) {
  :root { --sidebar-width: 226px; }
  .app-shell { display: block; padding-top: var(--topbar-height); }
  .sidebar { transform: translateX(-100%); transition: transform .18s ease-out; }
  .sidebar-is-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-grid !important; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; border: 0; background: rgba(9,20,22,.35); }
  .sidebar-is-open .sidebar-scrim { display: block; }
  .topbar { position: fixed; inset: 0 0 auto 0; grid-column: auto; }
  .menu-button { display: inline-grid; }
  .workspace { padding: 18px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .import-status-panel { grid-template-columns: 1fr; align-items: start; }
  .import-audit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-audit-metrics .metric:nth-child(2) { border-right: 0; }
  .import-audit-metrics .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .import-audit-body { grid-template-columns: 1fr; }
  .import-source-grid { grid-template-columns: 1fr; }
  .driver-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .driver-import-summary > div { border-bottom: 1px solid var(--line); }
  .driver-import-summary > div:nth-child(2n) { border-right: 0; }
  .driver-import-summary > div:last-child { border-bottom: 0; }
  .topbar-search { margin-left: auto; }
  .year-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vacation-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vacation-summary > div:nth-child(2) { border-right: 0; }
  .vacation-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .vacation-request-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vacation-request-summary > div:nth-child(2) { border-right: 0; }
  .vacation-request-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .month-card--large { overflow-x: auto; }
  .month-card--large h2, .month-weekdays--large, .month-grid--large { min-width: 980px; }
}

@media (max-width: 720px) {
  :root { --topbar-height: 58px; }
  h1 { font-size: 22px; }
  .app-shell { padding-bottom: 64px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar-title { min-width: 0; flex: 1; }
  .topbar-title small, .profile-copy, .profile-button > .icon, .period-control span, .sync-control span, .topbar-search, .notification-button { display: none; }
  .period-control { width: 34px; padding: 0; justify-content: center; }
  .sync-control { width: 34px; padding: 0; justify-content: center; }
  .profile-button { min-width: 34px; width: 34px; padding: 0; }
  .workspace { padding: 14px 12px 20px; }
  .mobile-nav { position: fixed; inset: auto 0 0 0; z-index: 32; height: 64px; display: flex; align-items: stretch; overflow-x: auto; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
  .mobile-nav-link { position: relative; min-width: 72px; flex: 1 0 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #718084; font-size: 8px; font-weight: 700; }
  .mobile-nav-link.is-active { color: var(--brand); }
  .mobile-nav-link.is-active::before { content: ""; position: absolute; top: 0; width: 34px; height: 2px; background: var(--brand); }
  .workspace-launcher { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: -2px; }
  .workspace-card { min-height: 92px; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px; }
  .workspace-card-icon { width: 30px; height: 30px; }
  .workspace-card-copy strong { white-space: normal; font-size: 11px; line-height: 1.2; }
  .page-heading, .page-heading--compact { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .page-heading > div:first-child { min-width: 0; flex: 1 1 auto; }
  .page-heading .heading-actions { margin-left: auto; }
  .page-heading p { font-size: 10px; }
  .heading-actions { flex: 0 0 auto; }
  .heading-actions .button { width: 36px; padding: 0; }
  .heading-actions .button span { display: none; }
  .driver-quick-create__head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .driver-quick-create__grid { grid-template-columns: 1fr; padding: 12px 12px 0; }
  .driver-quick-create__actions { align-items: stretch; flex-direction: column; padding: 0 12px 12px; }
  .driver-quick-create__actions .button { width: 100%; }
  .metric-strip, .metric-strip--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip--seven { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric, .metric-strip--four .metric { min-height: 84px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px; }
  .metric:nth-child(2n), .metric-strip--four .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n+2), .metric-strip--four .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .metric-value { font-size: 20px; }
  .checkpoint-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkpoint-history-table { min-width: 430px; }
  .summary-line { overflow-x: auto; }
  .summary-line span { white-space: nowrap; }
  .daily-chart { height: 210px; gap: 5px; padding-inline: 14px; overflow-x: auto; }
  .chart-day { min-width: 20px; }
  .panel-header, .section-title { padding-inline: 13px; }
  .filterbar { align-items: stretch; flex-wrap: wrap; }
  .filter-row { flex-wrap: wrap; }
  .search-field { min-width: 100%; flex-basis: 100%; }
  .select-field, .date-field { flex: 1; }
  .select-field select, .date-field input { min-width: 0; }
  .filterbar .button { align-self: end; width: 38px; padding: 0; }
  .filterbar .button span { display: none; }
  .daily-start-process { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .daily-start-process i { display: none; }
  .daily-start-process span { white-space: normal; }
  .daily-start-source { align-items: stretch; flex-direction: column; }
  .daily-start-review-actions { align-items: stretch; flex-direction: column; }
  .daily-start-review-actions .button { width: 100%; }
  .form-center-filters, .review-controls { align-items: stretch; flex-wrap: wrap; }
  .form-center-filters .search-field { min-width: 100%; }
  .form-version-filter { width: auto; flex: 1; }
  .form-center > .section-toolbar { overflow: hidden; }
  .form-center > .section-toolbar .segmented { width: 100%; max-width: 100%; overflow-x: auto; }
  .form-center > .section-toolbar .segmented button { flex: 0 0 auto; }
  .form-download-strip { align-items: stretch; flex-direction: column; }
  .form-download-strip .button { width: 100%; justify-content: center; }
  .driver-document-toolbar { align-items: stretch; flex-direction: column; }
  .direct-form-layout { grid-template-columns: 1fr; }
  .direct-form-fill, .form-packet-history { padding: 12px; }
  .form-packet-meta { align-items: stretch; flex-direction: column; }
  .form-packet-preview { height: 64vh; padding: 8px; }
  .employee-paper-create, .employee-paper-review, .employee-paper-history { padding: 12px; }
  .employee-paper-review-head { align-items: stretch; flex-direction: column; }
  .employee-paper-review-head .button { width: 100%; }
  .employee-paper-review .table-wrap { overflow: visible; border: 0; }
  .employee-paper-review-table { min-width: 0; display: block; }
  .employee-paper-review-table thead { display: none; }
  .employee-paper-review-table tbody { display: grid; gap: 10px; }
  .employee-paper-review-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .employee-paper-review-table td { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; }
  .employee-paper-review-table td::before { color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
  .employee-paper-review-table td:nth-child(1)::before { content: "Dokument"; }
  .employee-paper-review-table td:nth-child(2)::before { content: "Name für Kopie"; }
  .employee-paper-review-table td:nth-child(3)::before { content: "Status"; }
  .employee-paper-review-table td:nth-child(4)::before { content: "Kontrolle"; }
  .employee-paper-review-table td:nth-child(5) { grid-column: 1 / -1; }
  .employee-paper-review-table td:nth-child(5)::before { content: "Aktionen"; }
  .employee-paper-review-table .employee-paper-name-input { min-width: 0; width: 100%; }
  .employee-paper-position-tools { grid-template-columns: 1fr 1fr; }
  .employee-paper-position-tools .field:first-child { grid-column: 1 / -1; }
  .employee-paper-preview-stage { height: 58vh; padding: 8px; }
  .employee-paper-downloads .button, .employee-paper-file { max-width: 100%; width: 100%; }
  .employee-paper-actions .button { width: 100%; }
  .filter-summary-identity { grid-template-columns: 1fr; }
  .filter-summary-identity span { border-right: 0; border-bottom: 1px solid var(--line); }
  .filter-summary-identity span:last-child { border-bottom: 0; }
  .filter-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-summary-grid div:nth-child(3n) { border-right: 1px solid var(--line); }
  .filter-summary-grid div:nth-child(2n) { border-right: 0; }
  .filter-summary-grid div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .filter-summary-grid div:last-child { border-bottom: 0; }
  .review-controls .select-field { min-width: calc(50% - 6px); }
  .review-data-source { width: 100%; margin: 0; }
  .review-print-sheet { padding: 20px 14px; }
  .review-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-identity span:nth-child(2) { border-right: 0; }
  .review-identity span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .review-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-signatures { grid-template-columns: 1fr; gap: 40px; }
  .review-actions { align-items: stretch; flex-direction: column; }
  .cockpit-date-band { align-items: stretch; flex-direction: column; }
  .cockpit-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-checks > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .cockpit-checks > div:nth-child(2n) { border-right: 0; }
  .cockpit-checks > div:nth-last-child(-n+2) { border-bottom: 0; }
  .cockpit-task { grid-template-columns: 34px minmax(0, 1fr); }
  .cockpit-task-actions { grid-column: 2; justify-content: flex-start; }
  .quality-index-band { grid-template-columns: 1fr; }
  .quality-index-score { min-height: 118px; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .quality-index-score > strong { font-size: 32px; }
  .quality-dimensions { grid-template-columns: 1fr 1fr; }
  .quality-dimension { min-height: 84px; padding: 11px; }
  .quality-issues-section .section-toolbar .button { width: 38px; padding: 0; }
  .quality-issues-section .section-toolbar .button span { display: none; }
  .planning-control-band { padding: 12px; }
  .planning-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .planning-controls .select-field, .planning-controls .range-field, .planning-controls .planning-minimum { width: 100%; }
  .planning-controls .search-field { min-width: 100%; max-width: none; grid-column: 1 / -1; }
  .planning-controls > .icon-button { grid-column: 2; justify-self: end; }
  .planning-basis-line > span { padding-inline: 9px; }
  .split-layout--drivers { display: flex; flex-direction: column; }
  .driver-master-section, .driver-ranking-panel { width: 100%; }
  .ranking-row { grid-template-columns: 22px 28px minmax(115px,1fr) 52px 58px 33px; }
  .ranking-row .rank-quality + .rank-quality { display: none; }
  .score-meter { display: none; }
  .rank-quality { font-size: 8px; }
  .upload-zone { grid-template-columns: 42px minmax(0,1fr); }
  .upload-action { grid-column: 2; }
  .driver-admin-panel { padding: 10px; }
  .driver-import-head { align-items: stretch; flex-direction: column; padding: 13px; }
  .driver-import-head .heading-actions { justify-content: flex-end; }
  .driver-import-summary { grid-template-columns: 1fr; }
  .driver-import-summary > div { border-right: 0; }
  .driver-import-actions { align-items: stretch; flex-direction: column; }
  .driver-import-actions span { margin-right: 0; }
  .driver-import-actions .button { width: 100%; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .select-field--toolbar { width: 100%; margin-left: 0; }
  .calendar-panel-head { align-items: flex-start; flex-direction: column; }
  .calendar-legend { justify-content: flex-start; }
  .year-calendar { grid-template-columns: 1fr; }
  .vacation-summary > div { min-height: 50px; padding: 10px 12px; }
  .vacation-summary span { font-size: 8px; }
  .vacation-summary strong { font-size: 17px; }
  .vacation-request-summary > div { min-height: 50px; padding: 10px 12px; }
  .vacation-request-summary span { font-size: 8px; }
  .vacation-request-summary strong { font-size: 17px; }
  .vacation-calendar-panel--large .calendar-panel-head { padding: 12px; }
  .quality-rule-band { align-items: flex-start; flex-wrap: wrap; }
  .quality-rule-band i { display: none; }
  .billing-status .text-button { display: none; }
  .drawer { width: 100vw; }
  .modal { width: calc(100vw - 18px); }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 190px; align-items: flex-start; padding: 28px 24px; }
  .login-stats { left: 24px; right: 24px; bottom: 24px; padding-top: 15px; }
  .login-stats strong { font-size: 17px; }
  .login-panel { padding: 18px; }
  .login-form { padding: 25px 20px; box-shadow: none; }
  .save-confirmation-banner { align-items: flex-start; flex-wrap: wrap; }
  .save-confirmation-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; padding-left: 36px; }
  #toast-root { left: 12px; right: 12px; bottom: 76px; }
  .toast { min-width: 0; width: 100%; }
}

.assistant-security { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.assistant-security p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.assistant-shell { min-height: 560px; height: calc(100vh - 235px); display: grid; grid-template-rows: minmax(0, 1fr) auto; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; overflow: hidden; }
.assistant-thread { overflow-y: auto; padding: 22px; background: #f7f9f8; }
.assistant-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.assistant-empty .icon { color: var(--brand); }
.assistant-empty h2 { margin: 12px 0 5px; color: var(--text); font-size: 18px; }
.assistant-empty p { margin: 0; font-size: 12px; }
.assistant-prompts { max-width: 720px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.assistant-prompts button { min-height: 52px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--text); font: inherit; font-size: 11px; cursor: pointer; }
.assistant-prompts button:hover { border-color: var(--brand); color: var(--brand); }
.assistant-message { max-width: 780px; margin: 0 auto 14px; }
.assistant-message > span { display: block; margin: 0 0 5px 8px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.assistant-message p { width: fit-content; max-width: 88%; margin: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font-size: 12px; line-height: 1.6; }
.assistant-message--user { display: flex; flex-direction: column; align-items: flex-end; }
.assistant-message--user p { border-color: var(--brand); background: var(--brand); color: #fff; }
.assistant-action-preview { max-width: 780px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px auto; padding: 16px; border: 1px solid #d7a82f; border-left: 4px solid #d7a82f; border-radius: 6px; background: #fffaf0; }
.assistant-action-preview h3 { margin: 3px 0 4px; font-size: 15px; }
.assistant-action-preview p { margin: 0 0 3px; color: var(--text); font-size: 12px; }
.assistant-action-preview small { color: var(--muted); font-size: 10px; }
.assistant-action-buttons { display: flex; flex: 0 0 auto; gap: 8px; }
.assistant-compose { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: end; gap: 9px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.assistant-compose textarea { width: 100%; min-height: 44px; max-height: 140px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); font: inherit; font-size: 12px; line-height: 1.45; }
.assistant-compose textarea:focus { border-color: var(--brand); outline: 2px solid rgba(31, 112, 94, .12); }
.assistant-send { width: 42px; height: 42px; background: var(--brand); color: #fff; }
.assistant-send:hover { background: var(--brand-dark); }
.postal-filterbar .filter-row { flex-wrap: wrap; }
.postal-filterbar .date-field, .postal-filterbar .select-field { flex: 1 1 128px; }
.postal-minimum { flex: 0 1 126px; margin: 0; }
.postal-minimum input { min-width: 0; height: 36px; }
.postal-code-filter { flex: 0 1 110px; margin: 0; }
.postal-code-filter input { min-width: 0; height: 36px; }
.postal-analysis .status-pill { white-space: nowrap; }
.postal-table code, .postal-dashboard-table code { color: var(--brand); font-size: 11px; font-weight: 800; }
.postal-table--monthly { min-width: 1100px; }
.table-wrap--dashboard { max-height: 365px; }
.postal-dashboard-table { min-width: 620px; }
.postal-dashboard-table th, .postal-dashboard-table td { padding-block: 9px; }

/* E-Mail-Anfragen */
.request-status-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.request-status-board button { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; }
.request-status-board button:last-child { border-right: 0; }
.request-status-board button:hover, .request-status-board button.is-active { color: var(--ink); background: var(--teal-soft); }
.request-status-board span { font-size: 10px; font-weight: 750; }
.request-status-board strong { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; }
.email-request-modal { width: min(940px, 94vw); }
.modal:has(.email-request-modal), .modal:has(.email-import-modal) { width: min(940px, 94vw); max-width: none; }
.email-request-body { display: grid; gap: 14px; background: #f4f7f6; }
.email-request-section { border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.email-request-section > h3, .email-request-section > .detail-section-head { min-height: 42px; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 11px; }
.email-request-section > .form-grid { padding: 14px; }
.email-attachment-list { display: grid; gap: 7px; }
.email-attachment-list a { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 5px; color: inherit; text-decoration: none; }
.email-attachment-list a:hover { border-color: var(--teal); background: var(--teal-soft); }
.email-attachment-list a > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); }
.email-attachment-list a > span:nth-child(2) { min-width: 0; }
.email-attachment-list strong, .email-attachment-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-attachment-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.email-task-list { display: grid; }
.email-task-row { min-height: 54px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.email-task-row:last-child { border-bottom: 0; }
.email-task-row.is-done { opacity: .6; }
.email-task-row > span { min-width: 0; }
.email-task-row strong, .email-task-row small { display: block; }
.email-task-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.import-info-band { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 12px 14px; border-left: 3px solid var(--teal); background: var(--teal-soft); }
.import-info-band > span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; color: var(--teal); background: #fff; }
.import-info-band strong, .import-info-band small { display: block; }
.import-info-band small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.email-connection-panel { margin-bottom: 14px; }
.email-connection-panel .import-info-band { margin-bottom: 7px; }
.email-connection-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.future-import-note { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line-strong); color: var(--muted); background: #fafbfb; font-size: 10px; line-height: 1.5; }
.email-dashboard-status { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.email-dashboard-status button { min-height: 66px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 10px 14px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.email-dashboard-status button:last-child { border-right: 0; }
.email-dashboard-status button:hover { background: #f7f9f8; }
.email-dashboard-status span { color: var(--muted); font-size: 9px; font-weight: 750; }
.email-dashboard-status strong { color: var(--ink); font-size: 19px; }
.email-dashboard-list { display: grid; }
.email-dashboard-list > button { min-height: 52px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 16px; align-items: center; gap: 9px; padding: 8px 13px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.email-dashboard-list > button:last-child { border-bottom: 0; }
.email-dashboard-list > button:hover { background: #f8faf9; }
.email-dashboard-list > button > span:nth-child(2) { min-width: 0; }
.email-dashboard-list strong, .email-dashboard-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-dashboard-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.email-dashboard-list em { color: var(--muted); font-size: 9px; font-style: normal; white-space: nowrap; }

/* Shipment proofs */
.shipment-proof-section { overflow: visible; }
.shipment-search-band { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #f7f9f8; }
.shipment-search-field { min-width: min(520px, 72vw); background: #fff; }
.shipment-search-band > span { color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.shipment-proof-list { display: grid; gap: 12px; padding: 14px; background: var(--bg); }
.shipment-proof-item { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.shipment-proof-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.shipment-proof-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.shipment-proof-head span, .shipment-proof-meta b { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.shipment-proof-head strong { overflow-wrap: anywhere; font-size: 15px; }
.shipment-proof-head small { color: var(--muted); font-size: 9px; }
.shipment-proof-meta { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) 90px; border-bottom: 1px solid var(--line); }
.shipment-proof-meta > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-right: 1px solid var(--line); font-size: 10px; overflow-wrap: anywhere; }
.shipment-proof-meta > span:last-child { border-right: 0; }
.shipment-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; padding: 12px; }
.shipment-photo-grid button { min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; cursor: zoom-in; }
.shipment-photo-grid img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; }
.shipment-photo-grid .photo-placeholder { border-radius: 0; }
.shipment-photo-grid span { display: block; padding: 7px 8px; overflow: hidden; color: var(--muted); font-size: 9px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.shipment-empty { min-height: 220px; }
.shipment-form-workspace { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(480px, 1.2fr); gap: 18px; padding: 18px; background: #eef2f0; }
.shipment-form-controls { align-self: start; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.shipment-form-controls .section-title { padding: 0 0 14px; }
.shipment-form-controls > .button { margin-top: 14px; }
.shipment-print-sheet { min-height: 720px; padding: 44px 48px; border: 1px solid #cbd3d0; background: #fff; box-shadow: 0 8px 24px rgba(24, 47, 40, .08); color: #17231f; }
.shipment-print-sheet header { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 2px solid var(--brand); }
.shipment-print-brand { width: 54px; height: 54px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 21px; font-weight: 900; }
.shipment-print-sheet h2 { margin: 0; font-size: 21px; }
.shipment-print-sheet header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.shipment-print-sheet dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 34px 0; }
.shipment-print-sheet dl > div { min-height: 72px; padding: 12px 0; border-bottom: 1px solid #cfd5d3; }
.shipment-print-sheet dl > .is-wide { grid-column: 1 / -1; }
.shipment-print-sheet dt { color: #66736f; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.shipment-print-sheet dd { min-height: 24px; margin: 8px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-line; }
.shipment-print-sheet section { min-height: 150px; }
.shipment-print-sheet section h3 { margin: 0 0 10px; font-size: 10px; text-transform: uppercase; }
.shipment-print-sheet section p { min-height: 100px; margin: 0; padding: 12px; border: 1px solid #cfd5d3; font-size: 12px; white-space: pre-line; }
.shipment-print-sheet footer { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 54px; }
.shipment-print-sheet footer div { height: 42px; border-bottom: 1px solid #53605c; }
.shipment-print-sheet footer span { display: block; margin-top: 46px; color: #66736f; font-size: 9px; }
.shipment-photo-viewer { width: min(1100px, 94vw); max-height: 92vh; border-radius: 7px; background: #111; overflow: hidden; }
.modal:has(.shipment-photo-viewer) { width: min(1100px, 94vw); max-width: none; background: #111; }
.shipment-photo-viewer .modal-header { border-color: #303734; background: #17201d; color: #fff; }
.shipment-photo-stage { position: relative; height: calc(92vh - 78px); display: grid; place-items: center; padding: 16px; }
.shipment-photo-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.shipment-photo-stage .photo-placeholder { width: min(420px, 80vw); color: #dce5e3; background: #202a27; }
.absence-type-switch { width: fit-content; margin: 0 0 12px; }

/* Postal area planning */
.planning-view-tabs { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -4px 0 14px; }
.planning-view-tabs .segmented button { display: inline-flex; align-items: center; gap: 7px; }
.postal-area-planner { min-height: 680px; display: grid; grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.postal-area-sidebar { min-height: 680px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.postal-area-sidebar-head { padding: 14px; border-bottom: 1px solid var(--line); background: #f4f7f6; }
.postal-area-sidebar-head small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.segmented--wide { width: 100%; }
.segmented--wide button { flex: 1; justify-content: center; }
.postal-area-search { margin: 12px 12px 8px; background: #fff; }
.postal-area-assignment { display: grid; gap: 10px; padding: 12px; border-block: 1px solid var(--line); background: #f8faf9; }
.postal-area-assignment > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.postal-area-assignment strong { font-size: 11px; }
.postal-area-assignment small { color: var(--muted); font-size: 9px; }
.postal-area-assignment-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.postal-area-assignment-row input { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 800; text-transform: uppercase; }
.postal-area-assignment-row .button { min-height: 36px; }
.postal-area-selection-actions { display: flex; justify-content: space-between; gap: 8px; }
.postal-area-selection-actions .text-button { padding: 0; font-size: 9px; }
.postal-area-list { min-height: 0; display: flex; flex: 1; flex-direction: column; overflow-y: auto; }
.postal-area-row { width: 100%; min-height: 52px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-bottom: 1px solid #e8ecea; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.postal-area-row:hover { background: #f4f8f6; }
.postal-area-row.is-selected { background: #e9f4ef; box-shadow: inset 3px 0 0 var(--brand); }
.postal-area-check { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #bfc9c5; border-radius: 4px; color: #fff; }
.postal-area-row.is-selected .postal-area-check { border-color: var(--brand); background: var(--brand); }
.postal-area-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.postal-area-row strong { font-size: 11px; }
.postal-area-row small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.postal-area-tour { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; }
.postal-area-tour i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 2px; }
.postal-area-map-shell { min-width: 0; position: relative; display: flex; flex-direction: column; background: #dce5e1; }
.postal-map-toolbar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.postal-map-toolbar > div { display: flex; flex-direction: column; gap: 2px; }
.postal-map-toolbar strong { font-size: 11px; }
.postal-map-toolbar span { color: var(--muted); font-size: 9px; }
.postal-map-controls { display: flex; align-items: flex-end; gap: 12px; }
.postal-map-controls .date-field { min-width: 132px; }
.postal-map-controls .date-field input { min-height: 32px; padding-block: 5px; }
.range-field--map { width: 180px; }
.range-field--map span { white-space: nowrap; }
.postal-area-map { min-height: 626px; flex: 1; background: #d8e1dd; }
.postal-area-map .leaflet-control-container { font-family: inherit; }
.postal-area-map .leaflet-tooltip { padding: 7px 9px; border: 0; border-radius: 5px; box-shadow: 0 3px 14px rgba(23,35,31,.22); font-size: 10px; line-height: 1.45; }
.postal-map-legend { width: 220px; max-height: calc(100% - 92px); position: absolute; z-index: 500; top: 70px; right: 14px; display: flex; flex-direction: column; border: 1px solid rgba(64,82,76,.25); border-radius: 6px; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(22,38,41,.16); overflow: hidden; backdrop-filter: blur(7px); }
.postal-map-legend > strong { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 9px; text-transform: uppercase; }
.postal-map-legend > div { overflow-y: auto; }
.postal-map-legend button { width: 100%; min-height: 38px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 9px; border: 0; border-bottom: 1px solid #e8ecea; background: transparent; text-align: left; cursor: pointer; }
.postal-map-legend button:hover { background: #f3f7f5; }
.postal-map-legend button i { width: 10px; height: 24px; border-radius: 2px; }
.postal-map-legend button span { min-width: 0; }
.postal-map-legend button b, .postal-map-legend button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postal-map-legend button b { font-size: 9px; }
.postal-map-legend button small, .postal-map-legend button em { color: var(--muted); font-size: 7px; font-style: normal; }
.postal-map-fallback { position: absolute; inset: 54px 0 0; z-index: 2; display: grid; place-items: center; padding: 30px; background: #edf2f0; color: var(--muted); font-size: 11px; text-align: center; }
.postal-map-fallback[hidden] { display: none; }
.postal-map-fallback-inner { width: min(1040px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 12px; }
.postal-map-fallback-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; color: var(--ink); text-align: left; }
.postal-map-fallback-head strong { font-size: 13px; }
.postal-map-fallback-head span { color: var(--muted); font-size: 10px; }
.postal-map-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; overflow: auto; padding: 2px 2px 8px; }
.postal-area-tile { min-height: 86px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-content: start; gap: 2px 8px; padding: 10px; border: 1px solid rgba(23,35,38,.16); border-left: 8px solid var(--tour-color, #9aa4ad); border-radius: 7px; background: rgba(255,255,255,.94); color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 4px 12px rgba(22,38,41,.08); }
.postal-area-tile:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(22,38,41,.13); }
.postal-area-tile.is-selected { border-color: var(--brand); background: #e9f4ef; box-shadow: inset 0 0 0 2px rgba(22,122,95,.25), 0 7px 18px rgba(22,38,41,.13); }
.postal-area-tile .postal-area-check { grid-row: 1 / 4; margin-top: 2px; }
.postal-area-tile strong { overflow: hidden; font-size: 20px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.postal-area-tile small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.postal-area-tile em { color: var(--tour-color, #65716d); font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: 0; }
.postal-tour-legend { overflow: hidden; }
.postal-tour-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.postal-tour-color-row { min-height: 58px; display: grid; grid-template-columns: 34px minmax(90px, .45fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.postal-tour-color-row:nth-child(2n) { border-right: 0; }
.postal-tour-color-row > button { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.postal-tour-color-row > button strong, .postal-tour-color-row > button small { display: block; }
.postal-tour-color-row > button strong { font-size: 11px; }
.postal-tour-color-row > button small, .postal-tour-color-row > span { color: var(--muted); font-size: 8px; }
.postal-tour-color-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.color-field { width: 28px; height: 28px; position: relative; display: block; cursor: pointer; }
.color-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.color-field span { width: 28px; height: 28px; display: block; border: 2px solid #fff; border-radius: 5px; box-shadow: 0 0 0 1px #aeb9b5; }
.planning-admin-filters { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f8; }
.planning-admin-filters .search-field { max-width: 520px; }
.planning-admin-filters .date-field { min-width: 150px; }
.planning-admin-filters .select-field { min-width: 165px; }
.planning-admin-section { overflow: hidden; }
.planning-postcode-table { min-width: 1380px; }
.planning-tour-table { min-width: 1080px; }
.planning-history-table { min-width: 1240px; }
.planning-tour-cell { display: grid; grid-template-columns: 12px auto; align-items: center; gap: 2px 7px; }
.planning-tour-cell i { width: 11px; height: 28px; grid-row: 1 / 3; border-radius: 3px; }
.planning-tour-cell strong, .planning-tour-cell small { min-width: 0; }
.planning-color-swatch { width: 18px; height: 18px; display: inline-block; border: 2px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px #aeb9b5; vertical-align: middle; }
.planning-color-with-code { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.planning-color-with-code i { width: 24px; height: 24px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.planning-move-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f5f8f7; color: var(--muted); font-size: 10px; }
.planning-move-summary strong { color: var(--ink); }
.planning-dashboard-status { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.planning-dashboard-status > span { min-height: 78px; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 16px; border-right: 1px solid var(--line); }
.planning-dashboard-status > span:last-child { border-right: 0; }
.planning-dashboard-status small { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.planning-dashboard-status strong { font-size: 20px; }
.planning-dashboard-status em { color: var(--muted); font-size: 8px; font-style: normal; }
.planning-dashboard-history { display: grid; }
.planning-dashboard-history > button { min-height: 48px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.planning-dashboard-history > button:hover { background: var(--surface-subtle); }
.planning-dashboard-history > button:last-child { border-bottom: 0; }
.planning-dashboard-history > button span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.planning-dashboard-history strong { font-size: 10px; }
.planning-dashboard-history small, .planning-dashboard-history em { color: var(--muted); font-size: 8px; font-style: normal; }
.planning-map-checks { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 12px; margin: -4px 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.planning-map-checks.is-ok { border-color: rgba(26,127,92,.22); background: #f3fbf7; }
.planning-map-checks.has-issues { border-color: rgba(196,122,21,.25); background: #fffaf1; }
.planning-map-checks > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.planning-map-checks strong { font-size: 12px; }
.planning-map-checks span, .planning-map-checks p { color: var(--muted); font-size: 9px; }
.planning-map-checks p { grid-column: 1 / -1; margin: 0; }
.planning-map-check-grid { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.assignment-layout { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); gap: 14px; align-items: start; }
.assignment-editor { display: grid; gap: 14px; }
.assignment-meta-form, .assignment-entry-form { padding: 14px; }
.assignment-meta-form .section-title, .assignment-entry-form .section-title { margin: 0 0 12px; padding: 0; border: 0; }
.assignment-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.assignment-entry-grid .field--wide { grid-column: 1 / -1; }
.assignment-table { min-width: 980px; }
.assignment-table-section { min-width: 0; }
.assignment-table .inline-select, .assignment-table .inline-input { width: 100%; min-width: 120px; height: 34px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 9px; background: #fff; font: inherit; font-weight: 750; color: var(--ink); }
.assignment-table .inline-input { font-weight: 650; }
.assignment-table .inline-input.is-missing { border-color: #d9734f; background: #fff6ef; color: #9a3412; }
.assignment-table .inline-input.is-saved { border-color: #15917f; box-shadow: 0 0 0 2px rgba(21, 145, 127, .12); }
.assignment-table tr.row-warning td { background: #fffaf0; }
.assignment-table tr.row-danger td { background: #fff5f4; }
.assignment-table td:last-child .status-pill { margin: 1px 3px 1px 0; }
.assignment-print-sheet { display: none; padding: 18mm; background: #fff; color: #111; }
.assignment-print-sheet header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #182623; }
.assignment-print-sheet header strong { display: block; font-size: 20px; }
.assignment-print-sheet header span, .assignment-print-sheet header small { display: block; color: #53605c; font-size: 10px; text-transform: uppercase; }
.assignment-print-sheet header b { display: block; margin-top: 4px; font-size: 14px; }
.assignment-print-sheet table { width: 100%; border-collapse: collapse; font-size: 11px; }
.assignment-print-sheet th { padding: 8px; border: 1px solid #cfd7d4; background: #edf2f0; text-align: left; text-transform: uppercase; }
.assignment-print-sheet td { padding: 9px 8px; border: 1px solid #d8dfdc; }
.assignment-print-sheet footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 18px; color: #53605c; font-size: 10px; }
.assignment-email-log { margin-top: 14px; }

@media (max-width: 980px) {
  .postal-area-planner { grid-template-columns: 300px minmax(0, 1fr); }
  .postal-tour-color-grid { grid-template-columns: 1fr; }
  .postal-tour-color-row { border-right: 0; }
  .assignment-layout, .planning-map-checks { grid-template-columns: 1fr; }
  .planning-map-check-grid { justify-content: flex-start; }
  .planning-admin-filters { align-items: stretch; flex-wrap: wrap; }
  .planning-admin-filters > * { flex: 1 1 200px; }
}

@media (max-width: 760px) {
  .planning-view-tabs { align-items: stretch; flex-direction: column; }
  .planning-view-tabs .toolbar-meta { text-align: left; }
  .postal-area-planner { min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .postal-area-sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .postal-area-list { max-height: 330px; }
  .postal-area-map-shell { min-height: 58vh; }
  .postal-area-map { min-height: 54vh; }
  .postal-map-toolbar { align-items: flex-start; flex-direction: column; }
  .postal-map-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .postal-map-controls .date-field { width: 100%; }
  .range-field--map { width: 100%; }
  .postal-map-fallback { inset: 88px 0 0; }
  .assignment-entry-grid { grid-template-columns: 1fr; }
  .postal-map-legend { width: calc(100% - 28px); max-height: 150px; top: auto; bottom: 14px; }
  .planning-admin-filters { flex-direction: column; }
  .planning-admin-filters > * { width: 100%; max-width: none !important; }
  .planning-dashboard-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-dashboard-status > span { border-bottom: 1px solid var(--line); }
  .planning-dashboard-history > button { grid-template-columns: 20px minmax(0, 1fr) 16px; }
  .planning-dashboard-history > button em { display: none; }
  .tax-office-print-sheet { padding: 10px; }
  .tax-office-identity { grid-template-columns: 1fr; }
  .tax-office-title { font-size: 14px; }
  .tax-office-summary .tax-office-note { width: 100%; grid-template-columns: 1fr; }
  .tax-office-summary .tax-office-note textarea { border-left: 0; border-top: 1px solid #d9e2ec; }
}

 .planning-detail-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.planning-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planning-detail-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.planning-detail-stats b {
  color: var(--text);
  font-size: 16px;
}

.route-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 14px;
}

.route-analysis-card {
  min-width: 0;
}

.route-tile-map {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.route-tile {
  display: grid;
  min-width: 86px;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
}

.route-tile b {
  font-size: 11px;
  color: var(--muted);
}

.route-tile strong {
  font-size: 15px;
}

.route-tile small {
  font-size: 10px;
  color: var(--muted);
}

.route-tile--wc { border-left-color: #2f6fbb; }
.route-tile--ok { border-left-color: #2f8f5f; }
.route-tile--pu { border-left-color: #d59b18; }
.route-tile--hn { border-left-color: #d44a3a; }

.insight-list {
  display: grid;
  gap: 8px;
}

.insight-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.leave-dashboard-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leave-filterbar {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.leave-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: 14px;
  margin: 14px 0;
}

.leave-policy-panel,
.leave-warning-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.leave-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leave-auto-field {
  min-height: 66px;
  justify-content: center;
  border: 1px dashed var(--line);
  background: var(--surface-muted);
}

.leave-auto-field strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  margin-top: 4px;
}

.leave-warning-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.leave-warning-list > button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(120px, .8fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  text-align: left;
}

.leave-warning-list em,
.leave-warning-list small {
  color: var(--muted);
  font-style: normal;
}

.leave-dashboard-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.leave-dashboard-table .text-danger {
  font-weight: 800;
}

.error-tab-row { margin-bottom: 14px; }
.error-filter-grid { grid-template-columns: minmax(260px, 1.5fr) repeat(5, minmax(130px, 1fr)); margin-bottom: 14px; }
.error-case-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.comment-preview { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.case-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.case-summary-grid span { display: grid; gap: 4px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.case-summary-grid small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.case-summary-grid strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.case-summary-grid em { overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
  .planning-detail-toolbar,
  .route-analysis-grid {
    grid-template-columns: 1fr;
  }
  .leave-dashboard-kpis,
  .leave-filterbar,
  .leave-dashboard-grid,
  .leave-policy-grid {
    grid-template-columns: 1fr;
  }
  .error-filter-grid,
  .case-summary-grid {
    grid-template-columns: 1fr;
  }
  .leave-warning-list > button {
    grid-template-columns: 1fr;
  }
}

@media print {
  :root { --bg: #fff; --surface: #fff; }
  body { background: #fff !important; }
  .sidebar, .topbar, .mobile-nav, .sidebar-scrim, .overlay, .drawer, .modal, #toast-root, .heading-actions, .filterbar .button, .pagination { display: none !important; }
  .app-shell { display: block !important; min-height: 0 !important; }
  .workspace { padding: 0 !important; }
  .page-heading, .summary-line, .data-section, .metric-strip { break-inside: avoid; }
  .page-heading { margin-bottom: 10px; }
  .summary-line { margin: 0 0 10px; }
  .data-section, .panel, .metric-strip { border-color: #bbb !important; box-shadow: none !important; }
  .target-overview { margin-bottom: 10px; }
  .table-wrap, .table-wrap--target { max-height: none !important; overflow: visible !important; }
  .data-table { min-width: 0 !important; font-size: 8px; }
  .data-table th, .data-table td { padding: 5px 6px; }
  .filterbar { display: none !important; }
  .table-action { display: none !important; }
  body.printing-shipment-form .app-shell > :not(.workspace), body.printing-shipment-form .workspace > :not(.shipment-proof-section), body.printing-shipment-form .shipment-proof-section > :not(.shipment-form-workspace), body.printing-shipment-form .shipment-form-workspace > :not(.shipment-print-sheet) { display: none !important; }
  body.printing-shipment-form .shipment-proof-section, body.printing-shipment-form .shipment-form-workspace { display: block !important; padding: 0 !important; border: 0 !important; background: #fff !important; }
  body.printing-shipment-form .shipment-print-sheet { width: 100%; min-height: 0; padding: 16mm; border: 0; box-shadow: none; }
  body.printing-driver-review .app-shell > :not(.workspace), body.printing-driver-review .workspace > :not(.driver-workspace), body.printing-driver-review .driver-workspace > :not(.driver-review-form), body.printing-driver-review .driver-review-form > :not(.review-print-sheet) { display: none !important; }
  body.printing-driver-review .driver-workspace, body.printing-driver-review .driver-review-form { display: block !important; border: 0 !important; background: #fff !important; }
  body.printing-driver-review .review-print-sheet { width: 100%; padding: 10mm 12mm; }
  body.printing-driver-review .review-block { break-inside: avoid; }
  body.printing-driver-review textarea, body.printing-driver-review select { border: 0 !important; padding: 0 !important; appearance: none; resize: none; }
  body.printing-tax-office .app-shell > :not(.workspace), body.printing-tax-office .workspace > :not(.tax-office-driver-form), body.printing-tax-office .tax-office-driver-form > :not(.tax-office-print-sheet) { display: none !important; }
  body.printing-tax-office .workspace, body.printing-tax-office .tax-office-driver-form { display: block !important; padding: 0 !important; border: 0 !important; background: #fff !important; }
  body.printing-tax-office .tax-office-print-sheet { width: 100%; padding: 0 !important; }
  body.printing-tax-office .tax-office-tour-wrap { max-width: none; max-height: none; overflow: visible; border: 0; }
  body.printing-tax-office .tax-office-tour-table { width: 100%; min-width: 0 !important; }
  body.printing-tax-office .tax-office-summary { break-inside: avoid; }
  body.printing-tax-office input, body.printing-tax-office textarea { border: 0 !important; padding: 5px 8px !important; resize: none; }
  body.printing-assignment-list .app-shell > :not(.workspace), body.printing-assignment-list .workspace > :not(.assignment-layout), body.printing-assignment-list .assignment-layout > :not(.assignment-table-section), body.printing-assignment-list .assignment-table-section > :not(.assignment-print-sheet) { display: none !important; }
  body.printing-assignment-list .workspace, body.printing-assignment-list .assignment-layout, body.printing-assignment-list .assignment-table-section { display: block !important; padding: 0 !important; border: 0 !important; background: #fff !important; }
  body.printing-assignment-list .assignment-print-sheet { display: block !important; width: 100%; min-height: 0; padding: 12mm !important; }
  body.printing-scanners .app-shell > :not(.workspace), body.printing-scanners .workspace > :not(.scanner-section) { display: none !important; }
  body.printing-scanners .workspace, body.printing-scanners .scanner-section { display: block !important; padding: 0 !important; border: 0 !important; background: #fff !important; }
  body.printing-scanners .scanner-toolbar, body.printing-scanners .table-actions { display: none !important; }
  body.printing-scanners .scanner-table { min-width: 0 !important; width: 100%; }
  body.printing-leave-dashboard .app-shell > :not(.workspace), body.printing-leave-dashboard .workspace > :not(.vacation-page-heading):not(.vacation-subnav):not(.leave-dashboard-section):not(.leave-month-section) { display: none !important; }
  body.printing-leave-dashboard .workspace, body.printing-leave-dashboard .leave-dashboard-section, body.printing-leave-dashboard .leave-month-section { display: block !important; padding: 0 !important; border: 0 !important; background: #fff !important; }
  body.printing-leave-dashboard .vacation-subnav, body.printing-leave-dashboard .heading-actions, body.printing-leave-dashboard .leave-filterbar, body.printing-leave-dashboard .leave-policy-panel { display: none !important; }
  body.printing-leave-dashboard .leave-dashboard-grid { display: block !important; }
  body.printing-leave-dashboard .leave-warning-panel { margin-bottom: 12px; border-color: #bbb !important; }
body.printing-leave-dashboard .leave-dashboard-table { min-width: 0 !important; width: 100%; }
}

.tour-km-overview .table-wrap { max-height: 340px; overflow: auto; }

.tour-km-table { min-width: 720px; }

.km-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.km-chip {
  align-items: center;
  background: #eef6f4;
  border: 1px solid #d8e8e4;
  border-radius: 7px;
  color: #183c39;
  display: inline-flex;
  gap: 7px;
  min-height: 30px;
  padding: 5px 8px;
  white-space: nowrap;
}

.km-chip small {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 430px) {
  .period-control, .sync-control { display: none; }
  .page-heading { margin-bottom: 15px; }
  .page-heading h1 { font-size: 20px; }
  .metric-strip { margin-bottom: 13px; }
  .metric { padding: 10px; }
  .metric-label { font-size: 9px; }
  .metric-value { font-size: 18px; }
  .metric-meta { font-size: 9px; }
  .dashboard-grid { gap: 11px; }
  .fleet-summary { grid-template-columns: 100px 1fr; gap: 11px; padding: 13px; }
  .fleet-ring { width: 88px; height: 88px; border-width: 8px; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1 0 auto; padding-inline: 9px; }
}

@media (max-width: 720px) {
  .request-status-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-status-board button { border-bottom: 1px solid var(--line); }
  .email-dashboard-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-dashboard-status button { border-bottom: 1px solid var(--line); }
  .email-dashboard-list > button { grid-template-columns: 30px minmax(0, 1fr) 16px; }
  .email-dashboard-list em { display: none; }
  .shipment-search-band { align-items: stretch; flex-direction: column; }
  .shipment-search-field { min-width: 100%; }
  .shipment-proof-head { align-items: flex-start; flex-direction: column; }
  .shipment-proof-meta { grid-template-columns: 1fr; }
  .shipment-proof-meta > span { border-right: 0; border-bottom: 1px solid var(--line); }
  .shipment-proof-meta > span:last-child { border-bottom: 0; }
  .shipment-form-workspace { grid-template-columns: 1fr; padding: 10px; }
  .shipment-print-sheet { min-height: 580px; padding: 24px 20px; }
  .shipment-print-sheet dl { grid-template-columns: 1fr; margin-block: 22px; }
  .shipment-print-sheet dl > .is-wide { grid-column: auto; }
  .shipment-print-sheet footer { grid-template-columns: 1fr; gap: 26px; }
  .assistant-security { align-items: flex-start; flex-direction: column; gap: 7px; }
  .assistant-shell { min-height: 520px; height: calc(100vh - 255px); }
  .assistant-thread { padding: 14px 10px; }
  .assistant-prompts { grid-template-columns: 1fr; width: 100%; }
  .assistant-message p { max-width: 94%; }
  .assistant-action-preview { align-items: stretch; flex-direction: column; }
  .assistant-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
}

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

/* Performance Center */
.performance-center { overflow: hidden; }
.performance-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); background: #f8fbfa; }
.segmented--wrap { flex-wrap: wrap; max-width: min(780px, 100%); }
.segmented--wrap button { min-height: 32px; }
.performance-ranking-table td { vertical-align: middle; }
.performance-row--success { box-shadow: inset 3px 0 0 var(--teal); }
.performance-row--info { box-shadow: inset 3px 0 0 var(--cyan); }
.performance-row--warning { box-shadow: inset 3px 0 0 var(--amber); }
.performance-row--danger { box-shadow: inset 3px 0 0 var(--red); }
.inline-number { display: inline-grid; grid-template-columns: minmax(74px, 96px) auto; align-items: center; justify-content: end; gap: 6px; }
.inline-number input { width: 100%; min-height: 34px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 6px 8px; text-align: right; }
.performance-settings-form { padding: 14px; }
.performance-settings-grid { margin-top: 14px; }
.settings-note { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.settings-note--locked { color: #6b777a; }
.score-component-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.score-component-grid > div { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: var(--surface-subtle); }
.score-component-grid span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.score-component-grid strong { display: block; margin-top: 4px; font-size: 20px; }
.score-component-grid small { display: block; margin-top: 2px; }

@media (max-width: 1100px) {
  .performance-toolbar { flex-direction: column; }
  .performance-toolbar .filter-row { width: 100%; justify-content: flex-start; }
  .score-component-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .score-component-grid { grid-template-columns: 1fr; }
  .performance-toolbar .filter-row { display: grid; grid-template-columns: 1fr; }
}
