:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #4b5563;
  --line: #e3e6ea;
  --primary: #3f4c5a;
  --primary-dark: #24303c;
  --mint: #c5d0dc;
  --soft: #eef0f3;
  --ok: #157a3c;
  --ok-soft: #e5f6eb;
  --problem: #b42318;
  --problem-soft: #fde8e6;
  --travel: #1d4f91;
  --travel-soft: #e4eef9;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --success: var(--ok);
  --success-soft: var(--ok-soft);
  --danger: var(--problem);
  --danger-soft: var(--problem-soft);
  --journey: var(--travel);
  --journey-soft: var(--travel-soft);
  --shadow: 0 14px 40px rgba(31, 41, 51, .10);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", Inter, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--travel); outline-offset: 2px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 80; padding: 8px 12px; background: var(--primary-dark); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.photo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shell { position: relative; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(244,246,248,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: white; font-size: 20px; box-shadow: 0 8px 20px rgba(53,95,136,.18); }
.brand strong { display: block; line-height: 1.1; font-size: 16px; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.role-switch { margin-left: auto; display: flex; padding: 4px; background: var(--soft); border-radius: 10px; }
.role-switch button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 650; }
.role-switch button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(23,51,44,.08); }
.profile { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); color: var(--primary); font-weight: 750; }
.mobile-role { display: none; }
.layout { display: grid; grid-template-columns: 230px minmax(0,1fr); max-width: 1500px; margin: auto; min-width: 0; }
.sidebar { min-height: calc(100vh - 68px); padding: 28px 18px; border-right: 1px solid var(--line); }
.nav { display: grid; gap: 6px; }
.nav button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 13px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 650; text-align: left; }
.nav button:hover { background: var(--soft); color: var(--text); }
.nav button.active { background: var(--primary-dark); color: white; box-shadow: 0 8px 20px rgba(36,59,83,.16); }
.nav-glyph { width: 18px; text-align: center; }
.nav-count { min-width: 21px; height: 21px; display: grid; place-items: center; margin-left: auto; border-radius: 50%; background: var(--danger-soft); color: var(--danger); font-size: 11px; }
.nav button.active .nav-count { background: rgba(255,255,255,.18); color: white; }
.license { margin-top: 28px; padding: 15px; border-radius: 14px; background: var(--soft); }
.license strong { display: block; font-size: 14px; }
.license small { display: block; margin-top: 5px; color: var(--muted); }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--primary); font-weight: 750; }
.license .text-button { margin-top: 10px; font-size: 13px; }
.content { min-width: 0; padding: 38px clamp(24px,4vw,58px) 90px; overflow-x: clip; }
.content-inner { max-width: 1120px; margin: auto; min-width: 0; }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-weight: 750; font-size: 14px; }
h1 { margin: 0; font-size: clamp(31px,4vw,46px); line-height: 1.08; letter-spacing: -.035em; }
h2, h3, p { margin-top: 0; }
.subhead { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.heading-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 22px; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; background: var(--primary); color: white; font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(.96); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost { background: transparent; color: inherit; }
.grid-main { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(290px,.8fr); gap: 20px; margin-top: 30px; }
.card { min-width: 0; max-width: 100%; overflow: hidden; background: var(--surface); border: 1px solid rgba(37,49,61,.09); border-radius: var(--radius); box-shadow: 0 7px 24px rgba(31,48,67,.06); }
.trip-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,220px); gap: 28px; padding: 30px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-left: 5px solid var(--line); box-shadow: var(--shadow); }
.trip-card.phase-today { border-left-color: var(--primary); }
.trip-card.phase-active { border-left-color: var(--travel); background: linear-gradient(180deg, var(--travel-soft) 0%, var(--surface) 42%); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; background: var(--soft); color: var(--text); font-size: 12px; font-weight: 750; }
.trip-card h2 { margin: 18px 0 15px; font-size: 25px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.trip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; color: var(--muted); font-size: 14px; }
.trip-meta span:last-child { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.trip-card .btn.primary-inverse { background: var(--primary); color: white; }
.vehicle-tile { min-height: 170px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }
.vehicle-icon { font-size: 32px; color: var(--primary); }
.vehicle-tile strong { display: block; font-size: 18px; }
.vehicle-tile small { display: block; color: var(--muted); }
.plate { margin-top: 10px; letter-spacing: .13em; font-family: ui-monospace, monospace; }
.status-card { padding: 24px; }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.check { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 800; }
.muted { color: var(--muted); }
.status-list { margin-top: 23px; }
.status-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.status-row:last-child { border: 0; }
.status-row b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--success); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; }
.section-title h2 { margin: 0; font-size: 20px; }
.notice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 13px; }
.notice { display: flex; gap: 14px; padding: 19px; }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--primary); font-size: 18px; }
.notice h3 { margin: 0 0 4px; font-size: 15px; }
.notice p { margin: 0; color: var(--muted); font-size: 14px; }
.notice small { display: block; margin-top: 10px; color: var(--muted); }
.bottom-nav { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
dialog { width: min(650px, calc(100% - 28px)); max-width: calc(100% - 28px); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; color: var(--text); overflow: auto; box-shadow: 0 28px 90px rgba(31,41,51,.28); }
dialog::backdrop { background: rgba(10,28,23,.34); backdrop-filter: blur(3px); }
.modal-head, .modal-body, .modal-foot { padding: 22px; min-width: 0; }
.modal-body { overflow-x: auto; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-head p { margin: 5px 0 0; color: var(--muted); }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: var(--bg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: 13px; }
input, select, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--text); }
textarea { min-height: 88px; resize: vertical; }
.choice { grid-column: 1 / -1; display: flex; align-items: center; gap: 13px; padding: 14px; border: 2px solid var(--primary); border-radius: 13px; background: var(--soft); }
.success { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 650; }
.success button { float: right; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; }
.badge.live { background: var(--travel); color: white; }
.badge.neutral { background: var(--soft); color: var(--primary); }
.empty-hero { min-height: 285px; padding: 30px; display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; }
.empty-hero h2 { margin: 12px 0 4px; }
.empty-hero p { color: var(--muted); }
.check.large { width: 52px; height: 52px; font-size: 23px; }
.notice.alert { background: var(--danger-soft); border-color: rgba(180,61,66,.15); }
.notice.alert .notice-icon { background: white; color: var(--danger); }
.segmented { width: fit-content; display: flex; gap: 4px; margin: 28px 0 16px; padding: 4px; border-radius: 11px; background: var(--soft); }
.segmented button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; }
.segmented button.active { background: white; color: var(--text); box-shadow: 0 2px 8px rgba(23,51,44,.07); }
.segmented button span { color: var(--primary); }
.booking-list { display: grid; gap: 11px; }
.booking-row { display: flex; align-items: center; gap: 18px; padding: 18px; }
.date-block { flex: 0 0 54px; height: 57px; display: grid; place-items: center; align-content: center; border-radius: 13px; background: var(--soft); line-height: 1.1; }
.date-block strong { font-size: 20px; }
.date-block small { margin-top: 3px; color: var(--primary); font-weight: 800; font-size: 10px; }
.booking-info { flex: 1; min-width: 0; }
.booking-info h3 { margin: 0; font-size: 16px; }
.booking-info p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.row-title { display: flex; align-items: center; gap: 9px; }
.tag { display: inline-flex; align-items: center; min-height: 23px; padding: 0 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.success-tag { background: var(--success-soft); color: var(--success); }
.neutral-tag { background: var(--soft); color: var(--muted); }
.danger-tag { background: var(--danger-soft); color: var(--danger); }
.plate-inline { letter-spacing: .08em; }
.subdued { opacity: .78; }
.subsection { margin: 31px 0 13px; font-size: 20px; }
.car-detail { display: grid; grid-template-columns: minmax(250px,.75fr) 1.4fr; margin-top: 28px; overflow: hidden; }
.car-visual { min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; background: var(--primary-dark); color: white; }
.car-visual > span { font-size: 44px; color: var(--mint); }
.car-visual small { color: var(--mint); font-weight: 800; letter-spacing: .08em; }
.car-visual strong { display: block; margin-top: 5px; font-size: 24px; }
.car-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 18px; }
.car-facts div { padding: 18px; border-bottom: 1px solid var(--line); }
.car-facts div:nth-last-child(-n+2) { border-bottom: 0; }
.car-facts small, .detail-list span { display: block; color: var(--muted); }
.car-facts strong { display: block; margin-top: 5px; }
.action-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-top: 18px; }
.action-card { min-height: 145px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--text); text-align: left; box-shadow: 0 5px 18px rgba(25,76,64,.04); }
.action-card > span { margin-bottom: auto; color: var(--primary); font-size: 25px; }
.action-card strong { font-size: 16px; }
.action-card small { margin-top: 3px; color: var(--muted); }
.action-card.primary-action { background: var(--primary); color: white; border-color: var(--primary); }
.action-card.primary-action span, .action-card.primary-action small { color: white; }
.ready-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 28px; }
.ready-card h2 { margin: 15px 0 8px; }
.ready-card p { margin: 0; color: var(--muted); }
.ready-actions { display: flex; gap: 8px; }
.empty-state { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 28px; padding: 30px; text-align: center; }
.empty-state h2 { margin: 15px 0 5px; }
.empty-state p { color: var(--muted); }
.alert-banner { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 650; }
.alert-banner.warning { background: var(--warn-soft); color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 13px; margin-top: 28px; }
.stat { padding: 19px; }
.stat .dot { display: block; width: 10px; height: 10px; margin-bottom: 17px; border-radius: 50%; background: var(--muted); }
.dot.green { background: var(--ok); } .dot.blue { background: var(--travel); } .dot.orange { background: var(--warn); } .dot.gray { background: #83909c; } .dot.red { background: var(--problem); }
.stat span, .stat small { display: block; color: var(--muted); }
.stat strong { display: block; margin: 2px 0; font-size: 32px; }
.manager-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); gap: 16px; margin-top: 16px; }
.panel { padding: 22px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-bottom: 13px; }
.panel-head h2 { margin: 0; font-size: 19px; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.attention-row { display: flex; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.attention-row > div { flex: 1; }
.attention-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.today-list > div { display: grid; grid-template-columns: 43px 12px 1fr; gap: 8px; min-height: 68px; }
.today-list b { font-size: 12px; color: var(--muted); }
.today-list p { margin: 0; }
.today-list small { display: block; margin-top: 2px; color: var(--muted); }
.timeline-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--journey); box-shadow: 0 0 0 5px var(--journey-soft); }
.calendar-card { margin-top: 27px; overflow: hidden; }
.calendar-head, .calendar-row { display: grid; grid-template-columns: 190px repeat(5,1fr); min-width: 790px; }
.calendar-head { background: var(--soft); color: var(--muted); font-size: 12px; text-align: center; }
.calendar-head > * { padding: 13px 10px; border-right: 1px solid var(--line); }
.calendar-head b { text-align: left; color: var(--text); }
.calendar-row { border-top: 1px solid var(--line); }
.calendar-row > div:first-child { padding: 15px; }
.calendar-row small { display: block; color: var(--muted); }
.calendar-track { grid-column: 2 / span 5; display: grid; grid-template-columns: repeat(5,1fr); align-items: center; background: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), var(--line) calc(20% - 1px), var(--line) 20%); }
.calendar-track span { min-height: 35px; display: grid; place-items: center; margin: 5px; padding: 0 8px; border-radius: 8px; background: var(--primary); color: white; font-size: 11px; font-weight: 750; white-space: nowrap; }
.calendar-track span.pale { background: var(--journey-soft); color: var(--journey); }
.calendar-track span.maintenance { background: var(--warn-soft); color: var(--warn); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; padding: 12px; }
.toolbar input { flex: 1 1 220px; min-width: 0; }
.toolbar select { flex: 1 1 160px; width: auto; min-width: 0; }
.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--soft); color: var(--muted); font-size: 12px; }
td { font-size: 14px; }
td small { display: block; margin-top: 2px; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.deadline-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 28px; }
.deadline { padding: 22px; }
.deadline h2 { margin: 22px 0 4px; font-size: 20px; }
.deadline p { color: var(--muted); }
.progress { height: 7px; margin: 20px 0; overflow: hidden; border-radius: 99px; background: var(--soft); }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.deadline.urgent .progress i { background: var(--danger); }
.step-label { color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.vehicle-choices { grid-column: 1 / -1; display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.vehicle-choices legend, .severity legend { margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.vehicle-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.vehicle-option:has(input:checked) { border: 2px solid var(--primary); background: var(--soft); }
.vehicle-option input { width: auto; min-height: auto; }
.vehicle-option span:last-child { min-width: 0; }
.vehicle-option b, .vehicle-option small { display: block; }
.vehicle-option small { color: var(--muted); }
.summary-box { grid-column: 1 / -1; display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 14px; border-radius: 12px; background: var(--soft); }
.summary-box span { color: var(--muted); }
.field small { color: var(--muted); }
.checkline { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.checkline input { width: 18px; min-height: 18px; }
.quick-times { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 18px; }
.quick-times button { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--primary); font-weight: 750; }
.impact-box { margin-top: 16px; padding: 13px; border-radius: 11px; background: var(--soft); color: var(--muted); font-size: 13px; }
.severity { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 16px 0; padding: 0; border: 0; }
.severity legend { grid-column: 1 / -1; }
.severity label { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.severity label:has(input:checked) { border: 2px solid var(--primary); background: var(--soft); }
.severity input { width: auto; min-height: auto; }
.severity b, .severity small { display: block; }
.severity small { color: var(--muted); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.issue-summary { display: flex; gap: 13px; padding: 15px; border-radius: 12px; background: var(--danger-soft); }
.issue-summary p { margin: 3px 0 0; color: var(--danger); }
.decision-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 18px; }
.decision-grid button { min-height: 110px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--text); text-align: left; }
.decision-grid b, .decision-grid small { display: block; }
.decision-grid small { margin-top: 5px; color: var(--muted); }
.detail-list { display: grid; gap: 0; }
.detail-list div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.disabled-setting { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.disabled-setting:last-child { border-bottom: 0; }
.disabled-setting p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.btn.danger { background: var(--danger); color: white; }
.form-grid > .full { grid-column: 1 / -1; }
.form-error { min-height: 20px; margin: 4px 0 0; color: var(--danger); font-weight: 700; }
.top-gap { margin-top: 24px; }
.result-count { margin: 10px 2px 0; color: var(--muted); font-size: 13px; }
.empty-inline { padding: 20px; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 245px; }
.calendar-actions { display: flex; gap: 8px; }
.schedule { margin-top: 28px; overflow-x: auto; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: 190px repeat(5, minmax(118px, 1fr)); min-width: 820px; }
.schedule-head { position: sticky; top: 0; z-index: 2; background: var(--soft); }
.schedule-head > * { min-height: 66px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 10px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; text-transform: capitalize; }
.schedule-head > b { align-items: flex-start; color: var(--text); }
.schedule-head strong { display: block; color: var(--text); font-size: 14px; }
.schedule-row { border-top: 1px solid var(--line); }
.schedule-vehicle { min-height: 82px; display: flex; justify-content: center; flex-direction: column; padding: 12px 15px; border-right: 1px solid var(--line); }
.schedule-vehicle small { color: var(--muted); }
.schedule-cell { min-height: 82px; display: flex; align-items: stretch; justify-content: center; flex-direction: column; gap: 5px; padding: 7px; border-right: 1px solid var(--line); }
.calendar-event { display: block; overflow: hidden; padding: 7px 8px; border-radius: 8px; background: var(--journey); color: white; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.maintenance { background: var(--warn-soft); color: var(--warn); }
.calendar-event.live-event { background: var(--travel); }
.free-slot { color: #8ca097; font-size: 12px; text-align: center; }
.status-available { background: var(--success-soft); color: var(--success); }
.status-review, .status-out_of_service { background: var(--danger-soft); color: var(--danger); }
.status-blocked { background: var(--warn-soft); color: var(--warn); }
.status-in_use { background: var(--journey-soft); color: var(--journey); }
.status-inactive { background: var(--soft); color: var(--muted); }
dialog[data-type="booking"] { width: min(940px, calc(100% - 28px)); }
.availability-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 5px 0 10px; }
.availability-title b, .availability-title small { display: block; }
.availability-title small { margin-top: 2px; color: var(--muted); }
.mini-nav { width: 36px; height: 36px; margin-left: 5px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--primary); font-weight: 800; }
#booking-availability { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.availability-grid { min-width: 860px; }
.availability-head, .availability-row { display: grid; grid-template-columns: minmax(110px,150px) repeat(7, minmax(78px, 1fr)); }
.availability-head { background: var(--soft); }
.availability-head > *, .availability-row > * { min-height: 38px; display: grid; place-items: center; padding: 7px; border-right: 1px solid var(--line); font-size: 11px; }
.availability-head b, .availability-row > b { place-items: center start; padding-left: 11px; }
.availability-row { border-top: 1px solid var(--line); }
.availability-row > b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.availability-cell.free { color: var(--success); background: var(--success-soft); }
.availability-cell.busy { color: var(--danger); background: var(--danger-soft); }
.trip-card-focus { grid-template-columns: minmax(0,1fr) 205px; }
.trip-date-rail { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.trip-date-rail > i { position: absolute; top: 40px; left: 16%; right: 16%; z-index: 0; height: 2px; background: var(--line); }
.trip-date-point { position: relative; z-index: 1; display: grid; place-items: center; min-height: 78px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); line-height: 1; }
.trip-date-point small { color: var(--muted); font-size: 11px; }
.trip-date-point strong { margin: 5px 0; font-size: 25px; }
.trip-date-point span { color: var(--primary); font-size: 11px; font-weight: 800; }
.trip-date-point.is-today { background: var(--surface); color: var(--text); border-color: var(--primary); }
.trip-date-point.is-today small { color: var(--primary); }
.trip-date-point.is-today span { color: var(--primary); }
.next-trip-strip { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 13px; }
.next-trip { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 13px; padding: 14px; color: var(--text); text-align: left; }
.next-trip > span:nth-child(2) b, .next-trip > span:nth-child(2) small { display: block; }
.next-trip > span:nth-child(2) small { margin-top: 4px; color: var(--muted); }
.daily-stats { margin-bottom: 28px; }
.section-title .live-count { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 999px; background: var(--danger); color: white; font-weight: 800; }
.active-trip-row { display: grid; grid-template-columns: auto minmax(220px,1fr) minmax(150px,.6fr) minmax(150px,.6fr) auto; align-items: center; gap: 14px; margin-top: 10px; padding: 16px; }
.active-trip-row p { margin: 4px 0 0; color: var(--muted); }
.active-trip-row small, .movement-range small { display: block; color: var(--muted); }
.live-pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--travel); box-shadow: 0 0 0 6px var(--travel-soft); }
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.check-task { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.check-task > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-weight: 850; }
.check-task.done > span { background: #e4f6eb; color: var(--primary); }
.check-task small { display: block; color: var(--muted); }
.movement-range { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; min-width: 240px; }
.schedule-14 .schedule-head, .schedule-14 .schedule-row { grid-template-columns: 190px repeat(14, minmax(105px, 1fr)); min-width: 1660px; }
.today-column { background: #f3f4f6 !important; box-shadow: inset 2px 0 0 var(--primary), inset -2px 0 0 var(--primary); }
.schedule-head .today-column em { margin-top: 3px; color: var(--primary); font-size: 9px; font-style: normal; font-weight: 900; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 250px; }
.row-actions .btn { min-height: 36px; padding: 0 10px; font-size: 12px; }
.row-actions .issue-button { border-color: #e8a5a7; color: var(--danger); }
.event-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.event-toolbar label { display: flex; align-items: center; gap: 8px; }
.event-toolbar select { min-width: 210px; }
.vehicle-event-list { display: grid; gap: 0; }
.vehicle-event { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.vehicle-event:first-child { border-top: 0; }
.vehicle-event p { margin: 5px 0; color: var(--text); }
.vehicle-event small { color: var(--muted); }
.event-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--soft); color: var(--primary); font-weight: 850; }
.event-issue { background: var(--danger-soft); color: var(--danger); }
.event-maintenance { background: var(--warn-soft); color: var(--warn); }
.photo-thumb { display: flex; align-items: center; gap: 9px; width: fit-content; margin-top: 10px; color: var(--primary); font-weight: 750; text-decoration: none; }
.photo-thumb img { width: 86px; height: 58px; object-fit: cover; border: 1px solid var(--line); border-radius: 9px; }
.issue-detail { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.issue-detail p { margin: 4px 0; color: var(--muted); }
.trip-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.trip-evidence > div { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--soft); }
.upload-field input[type="file"] { padding: 8px; }
.photo-preview { padding: 9px 11px; border-radius: 9px; background: var(--bg); color: var(--muted); font-size: 12px; }
.photo-preview.ready { background: #e4f6eb; color: var(--primary); font-weight: 750; }
.damage-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid #efb8ba; border-radius: 12px; background: var(--danger-soft); }
.damage-details[hidden] { display: none; }
.maintenance-stack { display: grid; gap: 28px; margin-top: 30px; }
.maintenance-area { padding-top: 4px; }
.maintenance-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; min-width: 0; }
.maintenance-head h2 { margin: 0; font-size: 21px; }
.maintenance-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.maintenance-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 17px; }
.maintenance-item.due-soon { border-left: 4px solid var(--problem); }
.maintenance-main { flex: 1 1 160px; min-width: 0; }
.maintenance-meta { flex: 1 1 140px; min-width: 0; }
.maintenance-action { flex: 0 0 auto; margin-left: auto; }
.maintenance-action .btn { white-space: nowrap; }
.maintenance-item h3 { margin: 8px 0 0; overflow-wrap: anywhere; }
.maintenance-item p { margin: 2px 0 0; color: var(--muted); }
.maintenance-item small, .maintenance-item b { display: block; }
.maintenance-item small { color: var(--muted); }
.planned-blocks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); }
.planned-blocks > b { width: 100%; }
.planned-blocks > span { padding-right: 10px; border-right: 1px solid #e3c493; }
@media (max-width: 900px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .content { padding: 28px 18px 100px; }
  .grid-main, .notice-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .manager-grid { grid-template-columns: 1fr; }
  .checklist-grid, .maintenance-list { grid-template-columns: 1fr; }
  .deadline-grid { grid-template-columns: 1fr; }
  .bottom-nav { position: fixed; inset: auto 0 0; z-index: 35; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
  .bottom-nav.manager-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bottom-nav button { min-height: 58px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
  .bottom-nav button.active { color: var(--primary); background: var(--soft); }
}
@media (max-width: 640px) {
  .topbar { padding: 0 14px; }
  .brand { min-width: 0; }
  .role-switch { display: none; }
  .mobile-role { display: block; max-width: 125px; min-height: 38px; margin-left: auto; padding: 0 28px 0 9px; }
  .heading-row { align-items: stretch; flex-direction: column; }
  .heading-row .btn { width: 100%; }
  .trip-card { grid-template-columns: 1fr; padding: 22px; }
  .trip-meta { grid-template-columns: 1fr; }
  .trip-meta span:last-child { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full, .choice { grid-column: auto; }
  .modal-foot { flex-direction: column-reverse; }
  .booking-row, .ready-card { align-items: flex-start; flex-direction: column; }
  .booking-row .btn, .ready-actions, .ready-actions .btn { width: 100%; }
  .car-detail { grid-template-columns: 1fr; }
  .car-visual { min-height: 220px; }
  .car-facts { grid-template-columns: 1fr; }
  .car-facts div, .car-facts div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .car-facts div:last-child { border-bottom: 0; }
  .action-grid, .decision-grid { grid-template-columns: 1fr; }
  .action-card { min-height: 118px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-direction: column; }
  .toolbar select { width: 100%; }
  .quick-times, .severity { grid-template-columns: 1fr; }
  .detail-list div { grid-template-columns: 1fr; gap: 3px; }
  .disabled-setting { flex-direction: column; }
  .calendar-actions { width: 100%; }
  .calendar-actions .btn { flex: 1; }
  dialog[data-type="booking"] .modal-body { padding: 18px; }
  .active-trip-row { grid-template-columns: auto 1fr; }
  .active-trip-row > div:nth-of-type(n+2), .active-trip-row .btn { grid-column: 2; }
  .next-trip-strip { grid-template-columns: 1fr; }
  .maintenance-action { margin-left: 0; width: 100%; }
  .maintenance-action .btn { width: 100%; }
}
@media (max-width: 520px) {
  .trip-date-rail { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .trip-date-point { min-width: 0; }
  .trip-date-point small { font-size: 10px; }
  .damage-details, .trip-evidence { grid-template-columns: 1fr; }
  .maintenance-head { align-items: stretch; flex-direction: column; }
  .maintenance-head .btn { width: 100%; }
  .maintenance-action { width: 100%; }
}

.booking-draft-summary { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--travel); border-radius: 12px; background: var(--travel-soft); }
.booking-draft-summary small, .booking-draft-summary b, .booking-draft-summary em { display: block; }
.booking-draft-summary small { color: var(--travel); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.booking-draft-summary em { margin-top: 2px; color: var(--muted); font-style: normal; }
.draft-marker { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--travel); box-shadow: 0 0 0 4px rgba(29,79,145,.16); }
.selected-day { background: var(--travel-soft); color: var(--travel); font-weight: 800; }
.selected-day small { display: block; margin-top: 2px; font-size: 9px; letter-spacing: .04em; }
.selected-vehicle-row { background: rgba(29, 79, 145, .04); }
.availability-cell.range-day { box-shadow: inset 0 3px 0 var(--travel); }
.availability-cell.booking-selection { background: var(--travel) !important; color: white !important; }
.draft-slot { display: grid; gap: 2px; padding: 4px 2px; text-align: center; }
.draft-slot b, .draft-slot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-slot small { font-weight: 650; opacity: .88; }
.status-available { background: var(--ok-soft); color: var(--ok); }
.status-in_use { background: var(--travel-soft); color: var(--travel); }
.status-review, .status-out_of_service { background: var(--problem-soft); color: var(--problem); }
.status-blocked { background: var(--warn-soft); color: var(--warn); }
.status-inactive { background: var(--soft); color: var(--muted); }
.tag.ok-tag { background: var(--ok-soft); color: var(--ok); }
.tag.travel-tag { background: var(--travel-soft); color: var(--travel); }
.tag.problem-tag { background: var(--problem-soft); color: var(--problem); }
.inactive-row { opacity: .72; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 14px; }
.fleet-card { display: grid; grid-template-columns: 112px minmax(0,1fr); min-width: 0; overflow: hidden; }
.fleet-card-photo { min-height: 148px; background: var(--soft); }
.fleet-card-photo img, .fleet-card-photo .vehicle-photo-placeholder { width: 100%; height: 100%; min-height: 148px; object-fit: cover; }
.vehicle-photo-placeholder, .vehicle-photo-placeholder-lg { display: grid; place-items: center; color: var(--primary); font-size: 28px; background: var(--soft); }
.fleet-card-body { display: grid; gap: 10px; min-width: 0; padding: 16px; }
.fleet-card-top { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; }
.fleet-card-top h3 { flex: 1 1 140px; margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.fleet-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.fleet-facts div { min-width: 0; }
.fleet-facts small { display: block; color: var(--muted); font-size: 11px; }
.fleet-facts b { display: block; overflow-wrap: anywhere; font-size: 13px; }
.fleet-card .row-actions { min-width: 0; }
.vehicle-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vehicle-identity img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.vehicle-photo-large { display: block; max-width: 100%; max-height: 180px; margin-top: 8px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; }
.activation-control { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--soft); }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.legend-row i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 99px; vertical-align: -1px; }
.legend-ok { background: var(--ok); }
.legend-problem { background: var(--problem); }
.legend-travel { background: var(--travel); }
.legend-warn { background: var(--warn); }
.legend-today { background: #d4d7dc; }
.status-in_maintenance { background: var(--warn-soft); color: var(--warn); }
.tag.warn-tag { background: var(--warn-soft); color: var(--warn); }
.problem-line { margin: 4px 0 0; color: var(--problem); font-weight: 650; }
.notice-bell { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); }
.notice-bell .nav-count { position: absolute; top: 2px; right: 2px; }
.notice-panel { position: absolute; top: 68px; right: 16px; z-index: 40; width: min(360px, calc(100% - 24px)); max-height: 70vh; overflow: auto; padding: 16px; }
.notice-panel .attention-row { width: 100%; border: 0; background: transparent; text-align: left; }
.unread { background: var(--travel-soft); }
.date-jump { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.date-jump input { min-height: 38px; }
.topbar { position: sticky; }
@media (max-width: 640px) {
  .fleet-card { grid-template-columns: 1fr; }
  .fleet-card-photo img, .fleet-card-photo .vehicle-photo-placeholder { min-height: 160px; }
  .bottom-nav.manager-nav button { font-size: 10px; padding: 0 2px; }
  .notice-panel { right: 8px; left: 8px; width: auto; }
}

