.fleet-layout { display:grid; grid-template-columns:minmax(280px,350px) minmax(0,1fr); gap:20px; }
.fleet-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:20px; }
.fleet-toolbar h1 { font-size:26px; font-weight:750; margin-right:auto; }
.fleet button,.fleet a.fleet-button { border:1px solid #dbe2eb; border-radius:12px; padding:10px 14px; background:white; color:#172039; cursor:pointer; }
.fleet button.primary { background:#303bdc; color:white; border-color:#303bdc; font-weight:650; }
.fleet button:disabled { opacity:.5; cursor:wait; }
.fleet button:focus-visible,.fleet input:focus-visible,.fleet select:focus-visible { outline:3px solid #a5b4fc; outline-offset:2px; }
.fleet-card { border:1px solid #dce4ee; background:white; border-radius:18px; padding:20px; margin-bottom:14px; }
.fleet-card.selected { border-color:#4f46e5; box-shadow:0 0 0 1px #4f46e5; }
.fleet-map { height:420px; overflow:hidden; border:1px solid #dce4ee; background:#f8fafc; border-radius:18px; display:grid; place-items:center; margin-bottom:14px; }
.fleet-map-message { max-width:460px; padding:28px; text-align:center; color:#526179; line-height:1.6; }
.fleet-muted { color:#64748b; font-size:14px; line-height:1.55; }
.fleet-warning { padding:12px 16px; border-radius:12px; background:#fff7df; color:#854d0e; margin:12px 0; }
.fleet-status { font-size:12px; font-weight:700; display:inline-block; padding:4px 9px; border-radius:20px; background:#eef2ff; color:#3730a3; }
.fleet-status.ok { background:#dcfce7; color:#166534; }
.fleet-status.bad { background:#fee2e2; color:#991b1b; }
.fleet-stop { padding:14px 0; border-top:1px solid #e5eaf1; display:grid; grid-template-columns:32px 1fr; gap:12px; }
.fleet-stop-number { width:30px; height:30px; border-radius:50%; background:#eef2ff; display:grid; place-items:center; color:#3730a3; font-weight:700; }
.fleet-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.fleet-form { display:grid; gap:14px; }
.fleet-form label { display:grid; gap:5px; font-size:14px; font-weight:600; }
.fleet-form input,.fleet-form select,.fleet-form textarea { padding:10px; border:1px solid #cbd5e1; border-radius:10px; min-width:0; width:100%; font-weight:400; color:#172039; }
.fleet-form input[type=checkbox] { width:auto; }
.fleet-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.fleet-form h2 { font-size:23px; font-weight:700; }
.fleet-form h3 { font-size:17px; font-weight:700; }
.fleet-error { color:#b91c1c; background:#fff1f2; border-radius:10px; padding:12px; white-space:pre-wrap; }
.fleet-error:empty { display:none; }
.fleet-route-list { max-height:570px; overflow:auto; padding:2px; }
.fleet h2 { font-size:20px; font-weight:700; }
.fleet-metrics { display:flex; flex-wrap:wrap; gap:22px; margin:14px 0; }
.fleet-metrics strong { display:block; font-size:24px; }
.driver-page { margin:0; background:#f1f5f9; color:#172039; font:16px/1.5 system-ui,sans-serif; }
.driver-page main { max-width:620px; margin:auto; padding:20px; }
.driver-page button { font-size:16px; }
.driver-page .fleet-card { margin-top:16px; }
.driver-page header { font-size:24px; font-weight:750; }
.fleet-form .fleet-stop-form { border-top:1px solid #dbe2eb; padding-top:14px; display:grid; gap:10px; }
@media(max-width:850px) { .fleet-layout { grid-template-columns:1fr; } .fleet-route-list { max-height:300px; } .fleet-map { height:340px; } }
@media(prefers-reduced-motion:reduce) { .fleet * { scroll-behavior:auto; } }

.fleet-map-ready { display:block; position:relative; z-index:0; }
.leaflet-tooltip.fleet-map-number { background:transparent; border:0; box-shadow:none; color:white; font-weight:700; }
.fleet-coordinate-picker { height:280px; margin:8px 0; }
.fleet-dialog { max-height:calc(100dvh - 80px); grid-template-rows:auto minmax(0,1fr) auto; }
.fleet-dialog > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.fleet-dialog > header button { flex-shrink:0; }
.fleet-dialog-content { min-height:0; overflow-y:auto; overscroll-behavior:contain; display:grid; gap:14px; padding:2px 6px 2px 0; }
.fleet-dialog > footer { border-top:1px solid #dbe2eb; padding-top:12px; }
.fleet-dialog > footer button { width:100%; }
#modal-body:has(.fleet-form) { max-height:calc(100dvh - 32px); overflow-y:auto; }
