:root {
  color-scheme: dark;
  --bg: #0d100e;
  --surface: #151a16;
  --surface-2: #1b211c;
  --surface-3: #222a23;
  --ink: #f4f6f2;
  --muted: #9da79e;
  --line: #303a31;
  --accent: #f47a20;
  --accent-dark: #3a1d0d;
  --danger: #ff735f;
  --success: #70c65e;
  --success-dark: #19301b;
  --warning: #ffc65c;
  --radius: 14px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #272015 0, var(--bg) 48%); }
.auth-card { width: min(440px, 100%); display: grid; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1, .auth-card p { margin-bottom: 0; }
.auth-logo { width: min(230px, 70%); margin: 0 auto 10px; border-radius: 10px; background: #000; }
.auth-card .button { width: 100%; }
.current-user { color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 16, 14, .96);
}
.eyebrow { margin: 0 0 3px; color: var(--accent); font: 700 10px/1.2 "Arial Narrow", sans-serif; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(19px, 2.4vw, 27px); letter-spacing: -.04em; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 108px; height: 52px; object-fit: contain; border-radius: 7px; background: #000; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.connection-status { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 10px; font-weight: 800; white-space: nowrap; }
.connection-status[data-status="online"] { color: #bce78e; }
.connection-status[data-status="offline"] { color: #ff9c8e; }
.station-picker { display: grid; gap: 6px; min-width: 0; }
.header-station-picker { width: min(260px, 28vw); gap: 4px; }
.header-station-picker select { min-height: 44px; }
.station-picker span, label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.main-menu { position: relative; }
.main-menu > summary { display: flex; align-items: center; justify-content: center; list-style: none; user-select: none; }
.main-menu > summary::-webkit-details-marker { display: none; }
.main-menu[open] > summary { border-color: var(--accent); background: var(--surface-2); }
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 14px;
  width: min(360px, calc(100vw - 28px));
  max-height: calc(100dvh - 84px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.menu-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.menu-actions { display: grid; gap: 8px; }
.menu-actions .button { width: 100%; text-align: left; }
.menu-logout { color: #ff9c8e; border-color: rgba(255, 115, 95, .45); }
select, input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244, 122, 32, .18); }

main { padding: 18px 24px 32px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.summary article { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.summary strong { font-family: "Arial Narrow", sans-serif; font-size: 28px; }

.toolbar { display: flex; align-items: end; gap: 14px; margin-bottom: 16px; }
.search-field { display: grid; gap: 6px; width: 220px; }
.toggle-field { display: flex; align-items: center; gap: 9px; min-height: 44px; }
.toggle-field input { width: 18px; min-height: 18px; accent-color: var(--accent); }
.toolbar .button:last-child { margin-left: auto; }

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 800;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 3px solid rgba(244, 122, 32, .35); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; filter: none; opacity: .35; }
.button-primary { color: #11170b; background: var(--accent); }
.button-quiet { border-color: var(--line); background: transparent; }
.button-danger { color: #28100d; background: var(--danger); }

.board-wrap { overflow-x: auto; padding-bottom: 12px; }
.board { display: grid; grid-template-columns: repeat(9, minmax(290px, 1fr)); gap: 12px; min-width: max-content; }
.stage-column { width: 290px; min-height: 470px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stage-column.is-station { border-color: rgba(244, 122, 32, .7); box-shadow: inset 0 3px 0 var(--accent); }
.stage-header { display: flex; gap: 11px; min-height: 76px; padding: 14px; border-bottom: 1px solid var(--line); }
.stage-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--accent); background: var(--accent-dark); font: 800 14px/1 "Arial Narrow", sans-serif; }
.stage-header h2 { margin-bottom: 4px; font: 800 14px/1.2 "Arial Narrow", sans-serif; letter-spacing: .04em; }
.stage-header p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.stage-cards { display: grid; align-content: start; gap: 10px; padding: 10px; }
.empty-state { margin: 0; padding: 28px 12px; color: #747e75; text-align: center; font-size: 13px; }

.vehicle-card { padding: 12px; border: 1px solid var(--success); border-color: var(--success); border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 3px 0 var(--success), 0 7px 22px rgba(0, 0, 0, .18); }
.vehicle-card.is-overdue { border-color: var(--danger); background: #211513; box-shadow: inset 0 3px 0 var(--danger), 0 7px 22px rgba(0, 0, 0, .18); }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plate { font: 900 23px/1 "Arial Narrow", sans-serif; letter-spacing: .06em; }
.status-cluster { display: flex; align-items: center; gap: 7px; }
.status-pill { padding: 5px 7px; border-radius: 6px; color: var(--success); background: var(--success-dark); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.status-pill.overdue { color: #fff; background: #9d2e20; }
.status-pill.ready { color: #10160d; background: #9dde72; }
.delay-history-marker { position: relative; width: 19px; height: 19px; flex: 0 0 19px; border: 2px solid var(--danger); border-radius: 50%; background: #361714; }
.delay-history-marker::before { content: ""; position: absolute; left: 7px; top: 2px; width: 2px; height: 7px; border-radius: 2px; background: var(--danger); }
.delay-history-marker::after { content: ""; position: absolute; left: 8px; top: 8px; width: 5px; height: 2px; border-radius: 2px; background: var(--danger); transform: rotate(35deg); transform-origin: left center; }
.vehicle-label { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin: 8px 0 10px; font-size: 13px; }
.vehicle-identity { display: grid; min-width: 0; gap: 0; }
.vehicle-model { overflow-wrap: anywhere; }
.vehicle-color { color: var(--muted); font-size: 10px; line-height: 1.1; }
.service-order-label { flex: 0 0 auto; color: var(--muted); font-size: 10px; text-align: right; }
.service-order-label strong { color: var(--ink); font-size: 11px; }
.card-details { display: grid; gap: 4px; margin: 0 0 10px; }
.card-details div { display: flex; justify-content: space-between; gap: 10px; }
.card-details dt { color: var(--muted); font-size: 10px; }
.card-details dd { margin: 0; max-width: 155px; font-size: 10px; text-align: right; }
.active-worker { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin: 0 0 12px; padding: 9px 10px; border-radius: 8px; background: rgba(255, 198, 92, .1); }
.active-worker span { color: var(--muted); font-size: 10px; }
.active-worker strong { color: var(--warning); font-family: monospace; }
.active-worker small { grid-column: 1 / -1; color: var(--muted); }
.card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.card-action, .stay-action { width: 100%; }
.admin-vehicle-action { width: 48px; min-width: 48px; padding-inline: 6px; }
.stay-action { grid-column: 1 / -1; }
.button-overdue { border-color: var(--danger); color: #ffb2a6; background: transparent; }

dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
.dialog-card { display: grid; gap: 16px; padding: 20px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin-bottom: 0; font-size: 25px; }
.dialog-card label { display: grid; gap: 7px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: transparent; font-size: 25px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-error { min-height: 18px; margin: -7px 0 0; color: #ff9c8e; font-size: 12px; }
.form-hint { margin: -7px 0 0; color: var(--muted); font-size: 12px; }
.vehicle-context { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-3); }
.vehicle-context strong { font: 900 22px/1 "Arial Narrow", sans-serif; letter-spacing: .06em; }
.vehicle-context span { color: var(--muted); font-size: 11px; text-align: right; }
.wide-dialog { width: min(900px, calc(100vw - 24px)); }
.history-list { display: grid; max-height: 60vh; overflow: auto; border-top: 1px solid var(--line); }
.history-row { display: grid; grid-template-columns: 120px 90px 1fr auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.history-row time, .history-row span { color: var(--muted); font-size: 12px; }
.history-row code { color: var(--accent); }
.administrative-event-details { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #0e120e; }
.administrative-event-details ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.administrative-event-details li { display: grid; grid-template-columns: minmax(90px, auto) 1fr 1fr; gap: 8px; font-size: 11px; }
.administrative-event-details p { margin: 0; color: var(--muted); font-size: 11px; }
.ready-section { margin-top: 18px; padding: 16px; border: 1px solid #416033; border-radius: var(--radius); background: #121a11; }
.ready-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.ready-heading h2 { margin: 0; }
.ready-heading > p { margin: 0; color: var(--muted); font-size: 12px; }
.ready-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 320px)); gap: 12px; }
.ready-list > .empty-state { grid-column: 1 / -1; }
.vehicle-card.is-ready { cursor: pointer; border-color: #416033; background: #172016; }
.vehicle-card.is-ready:hover { border-color: #79a960; }
.vehicle-card.is-ready:focus-visible { outline: 3px solid rgba(157, 222, 114, .35); outline-offset: 2px; }
.vehicle-card.is-ready .card-action { color: #10160d; background: #9dde72; }
.ready-vehicle-context { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr; gap: 18px; padding: 14px; border: 1px solid #416033; border-radius: 12px; background: #172016; }
.ready-vehicle-context > div { display: grid; gap: 5px; }
.ready-vehicle-context > div strong { font: 900 26px/1 "Arial Narrow", sans-serif; letter-spacing: .06em; }
.ready-vehicle-context > div span { color: var(--muted); font-size: 12px; }
.ready-vehicle-context dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.ready-vehicle-context dl div { display: grid; gap: 4px; }
.ready-vehicle-context dt { color: var(--muted); font-size: 10px; }
.ready-vehicle-context dd { margin: 0; font-size: 12px; }
.ready-vehicle-history { display: grid; max-height: 55vh; overflow: auto; padding-left: 4px; }
.ready-history-row { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; min-height: 72px; }
.ready-history-row::before { content: ""; position: absolute; left: 6px; top: 15px; bottom: -1px; width: 2px; background: var(--line); }
.ready-history-row:last-child::before { display: none; }
.ready-history-marker { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 11px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ready-history-row.event-ready .ready-history-marker { background: #9dde72; box-shadow: 0 0 0 1px #9dde72; }
.ready-history-row > div:last-child { display: grid; gap: 3px; padding: 8px 0 14px; border-bottom: 1px solid var(--line); }
.ready-history-row time, .ready-history-row span, .ready-history-row small { color: var(--muted); font-size: 11px; }
.ready-history-row strong { font-size: 13px; }
.daily-production-entry { margin: 2px 0 18px; }
.daily-production-entry-button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 78px; padding: 14px 18px; border: 1px solid #70451f; border-radius: 14px; color: var(--ink); background: linear-gradient(135deg, #25190f, #171914 64%); text-align: left; box-shadow: inset 0 0 0 1px rgba(244, 122, 32, .08); }
.daily-production-entry-button:hover { border-color: var(--accent); }
.daily-production-entry-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 11px; color: #14100b; background: var(--accent); font-size: 25px; font-weight: 900; }
.daily-production-entry-button > span:nth-child(2) { display: grid; gap: 3px; }
.daily-production-entry-button small { color: var(--accent); font: 800 9px/1.1 "Arial Narrow", sans-serif; letter-spacing: .16em; }
.daily-production-entry-button strong { font: 900 22px/1.05 "Arial Narrow", sans-serif; }
.daily-production-entry-button em { color: var(--muted); font-size: 11px; font-style: normal; }
.daily-production-entry-button > b { color: #ffc69d; font-size: 11px; }
.daily-production-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-width: none; max-height: none; overflow: hidden; border-radius: 14px; }
.daily-production-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; min-height: 0; background: var(--bg); }
.daily-production-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(13, 16, 14, .98); }
.daily-production-title h2 { margin: 0; font-size: clamp(21px, 2.5vw, 31px); text-transform: capitalize; }
.daily-production-actions { display: flex; align-items: center; gap: 8px; }
.daily-production-actions .button { min-height: 44px; }
.daily-production-summary { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(170px, 1.4fr); gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.daily-production-summary article { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.daily-production-summary strong { font: 900 23px/1 "Arial Narrow", sans-serif; }
.daily-production-summary span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.daily-production-summary .daily-summary-sector strong { color: var(--accent); font-size: 15px; line-height: 1.1; }
.daily-production-board { display: flex; gap: 12px; min-height: 0; overflow-x: auto; overflow-y: hidden; padding: 14px 18px 18px; scroll-snap-type: x proximity; }
.daily-production-column { display: grid; grid-template-rows: auto minmax(120px, auto) minmax(120px, 1fr); flex: 0 0 310px; min-width: 310px; max-height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); scroll-snap-align: start; }
.daily-production-column > header { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 9px; min-height: 66px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--surface-3); }
.daily-production-column > header > div { min-width: 0; }
.daily-production-column > header h3 { overflow: hidden; margin: 0 0 3px; font: 900 15px/1.05 "Arial Narrow", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.daily-production-column > header p { margin: 0; color: var(--muted); font-size: 9px; }
.daily-production-column > header > b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #10160d; background: #9dde72; font: 900 20px/1 "Arial Narrow", sans-serif; }
.daily-production-group { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: hidden; }
.daily-production-group + .daily-production-group { border-top: 3px solid var(--line); }
.daily-production-group-title { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.daily-production-group-title strong { font: 900 10px/1 "Arial Narrow", sans-serif; letter-spacing: .08em; }
.daily-production-group-title span { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 7px; font-size: 10px; font-weight: 900; }
.completed-group .daily-production-group-title { color: #bce78e; background: #182217; }
.completed-group .daily-production-group-title span { color: #10160d; background: #9dde72; }
.remaining-group .daily-production-group-title { color: #ffb2a6; background: #251817; }
.remaining-group .daily-production-group-title span { color: #fff; background: #9e3e31; }
.daily-production-cards { display: grid; align-content: start; gap: 8px; min-height: 0; overflow-y: auto; padding: 9px; }
.daily-production-card { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.daily-production-card.is-completed { border-color: #416033; background: #172016; }
.daily-production-card.is-remaining { border-color: #683d35; background: #211514; }
.daily-production-card header, .daily-production-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-production-card header strong { font: 900 19px/1 "Arial Narrow", sans-serif; letter-spacing: .04em; }
.daily-production-card header b { padding: 4px 6px; border-radius: 6px; font-size: 8px; }
.daily-production-card.is-completed header b { color: #10160d; background: #9dde72; }
.daily-production-card.is-remaining header b { color: #ffd1ca; background: #6f2d25; }
.daily-production-card p { margin: 0; color: var(--muted); font-size: 10px; }
.daily-production-card footer { color: var(--muted); font-size: 9px; }
.daily-production-empty { margin: 0; padding: 14px 8px; color: var(--muted); font-size: 10px; text-align: center; }
.calendar-dialog { width: min(940px, calc(100vw - 24px)); }
.calendar-card { gap: 14px; }
.calendar-navigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.calendar-navigation strong { text-align: center; text-transform: capitalize; font-size: 18px; }
.calendar-month { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.calendar-weekdays { margin-bottom: 7px; }
.calendar-weekdays span { padding: 5px; color: var(--muted); font: 800 10px/1 "Arial Narrow", sans-serif; text-align: center; letter-spacing: .08em; }
.calendar-spacer { min-height: 78px; }
.calendar-day { display: grid; align-content: start; gap: 6px; min-height: 78px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); text-align: left; }
.calendar-day:hover { border-color: #5b675d; }
.calendar-day.has-work { border-color: #604324; background: #211a13; }
.calendar-day.is-today { box-shadow: inset 0 0 0 2px rgba(244, 122, 32, .5); }
.calendar-day.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.calendar-day-number { font: 900 17px/1 "Arial Narrow", sans-serif; }
.calendar-day-metrics { display: grid; gap: 3px; }
.calendar-day-metrics span { color: var(--accent); font-size: 11px; font-weight: 900; }
.calendar-day-metrics small { color: var(--muted); font-size: 9px; }
.employee-form { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.employee-form label { display: grid; gap: 7px; }
.employee-stages-field { grid-column: 1 / -1; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.employee-stages-field legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.employee-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.employee-stage-option { display: flex !important; align-items: center; gap: 8px !important; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 11px; }
.employee-stage-option input { width: 17px; min-height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
.employee-active-field { align-self: end; }
.employee-form-error, .employee-form-actions { grid-column: 1 / -1; }
.employee-list { display: grid; max-height: 38vh; overflow: auto; }
.employee-row { display: grid; grid-template-columns: minmax(180px, 1fr) 90px 70px auto; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.employee-row > div { display: grid; gap: 3px; }
.employee-row > div span { color: var(--muted); font-size: 11px; }
.employee-row code { color: var(--accent); font-size: 14px; }
.employee-state { color: #bce78e; font-size: 10px; font-weight: 900; }
.employee-row.is-inactive { opacity: .55; }
.employee-row.is-inactive .employee-state { color: #ff9c8e; }
.vehicle-admin-section { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.vehicle-admin-section h3 { margin: 0; font-size: 16px; }
.vehicle-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vehicle-admin-form .full-row { grid-column: 1 / -1; }
.compact-admin-form { grid-template-columns: 1fr 1.5fr; }
.danger-section { border-color: rgba(255, 115, 95, .45); background: rgba(255, 115, 95, .06); }
.admin-vehicle-action { width: 100%; border-color: rgba(244, 122, 32, .45); color: #ffc69d; }
.removed-vehicles-list { display: grid; max-height: 62vh; overflow: auto; }
.removed-vehicle-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.3fr) auto; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.removed-vehicle-row > div { display: grid; gap: 4px; }
.removed-vehicle-row strong { font: 900 20px/1 "Arial Narrow", sans-serif; letter-spacing: .05em; }
.removed-vehicle-row span, .removed-vehicle-row small { color: var(--muted); font-size: 11px; }
.removed-vehicle-actions { display: flex !important; grid-auto-flow: column; gap: 8px !important; }

@media (max-width: 850px) {
  .topbar { flex-wrap: wrap; gap: 10px 12px; }
  .topbar-actions { width: 100%; justify-content: flex-end; }
  .header-station-picker { width: auto; flex: 1; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .employee-form { grid-template-columns: 1fr 1fr; }
  .employee-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-production-topbar { align-items: stretch; flex-direction: column; }
  .daily-production-actions { flex-wrap: wrap; }
  .daily-production-summary { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .daily-production-column { flex-basis: 285px; min-width: 285px; }
  .removed-vehicle-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar, main { padding-left: 14px; padding-right: 14px; }
  .topbar { gap: 8px; }
  .topbar-actions { flex: 0 0 auto; }
  .brand { min-width: 0; gap: 8px; }
  .brand-logo { width: 82px; height: 44px; }
  .brand h1 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .brand .eyebrow { display: none; }
  .topbar .button { min-height: 44px; padding: 8px 10px; }
  .menu-panel { position: fixed; top: 66px; right: 14px; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary article { display: grid; }
  .toolbar, .search-field { width: 100%; }
  .toggle-field { align-items: flex-start; }
  .history-row { grid-template-columns: 1fr auto; }
  .history-row span { grid-column: 1 / -1; }
  .administrative-event-details li { grid-template-columns: 1fr; }
  .ready-heading { align-items: start; flex-direction: column; }
  .ready-list { grid-template-columns: 1fr; }
  .ready-vehicle-context { grid-template-columns: 1fr; }
  .ready-vehicle-context dl { grid-template-columns: 1fr; }
  .calendar-navigation { grid-template-columns: 1fr 1fr; }
  .calendar-navigation strong { grid-column: 1 / -1; grid-row: 1; }
  .calendar-month { overflow-x: auto; }
  .calendar-weekdays, .calendar-grid { min-width: 700px; }
  .daily-production-entry-button { grid-template-columns: auto 1fr; }
  .daily-production-entry-button > b { display: none; }
  .daily-production-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .daily-production-topbar { padding: 11px 12px; }
  .daily-production-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .daily-production-actions .button { width: 100%; }
  .daily-production-summary { grid-template-columns: 1fr 1fr; padding: 8px 12px; }
  .daily-production-board { padding: 10px 12px 14px; }
  .daily-production-column { flex-basis: min(86vw, 300px); min-width: min(86vw, 300px); }
  .employee-form { grid-template-columns: 1fr; }
  .employee-stages { grid-template-columns: 1fr; }
  .employee-form-error, .employee-form-actions { grid-column: 1; }
  .employee-row { grid-template-columns: 1fr auto; }
  .employee-row .employee-state { grid-row: 2; }
  .vehicle-admin-form, .compact-admin-form { grid-template-columns: 1fr; }
  .vehicle-admin-form .full-row { grid-column: 1; }
  .removed-vehicle-actions { grid-auto-flow: row; }
}
@media (prefers-reduced-motion: no-preference) {
  .vehicle-card { transition: border-color .16s ease, transform .16s ease; }
  .vehicle-card:hover { transform: translateY(-2px); }
}
