/* Fleet → Maintenance: parts lines, tire view (tire-3d.js), engine codes. */
.tile-link{ cursor:pointer; } .tile-link:hover{ outline:1px solid var(--brand-accent); }
.parts-table input{ width:100%; min-width:70px; } .parts-table input.qty, input.qty{ width:72px; min-width:0; text-align:right; }
.parts-table td{ padding:3px 4px; }
.truck-picks{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.chip-check{ display:inline-flex !important; flex-direction:row !important; align-items:center; gap:5px; font-size:12px; padding:3px 9px; border:1px solid var(--border); border-radius:99px; background:var(--surface-2); cursor:pointer; }
.chip-check:has(input:checked){ border-color:var(--brand-accent); color:var(--brand-accent); font-weight:600; }
.chip-check input{ margin:0; }

.tire-wrap{ display:grid; grid-template-columns:minmax(0, 1.6fr) minmax(280px, 1fr); gap:12px; align-items:start; }
@media (max-width:900px){ .tire-wrap{ grid-template-columns:1fr; } }
.t3d{ height:400px; margin:8px 0; border-radius:8px; user-select:none;
  background:var(--surface-1); }
.t3d.dragging{ cursor:grabbing; }
.tire3d{ width:100%; height:100%; display:block; }
.tire3d .sk{ stroke:var(--text-secondary); stroke-width:.035; stroke-linecap:round; fill:none; vector-effect:non-scaling-stroke; }
.tire3d .sk{ stroke-width:1.4px; } .tire3d .sk.thin{ stroke-width:1px; opacity:.6; } .tire3d .sk.frame{ stroke:var(--text-primary); stroke-width:2px; }
.tire3d .sk.body{ stroke-width:1px; opacity:.45; } .tire3d .sk.dash{ stroke-dasharray:4 3; }
.tire3d .sk.axle{ stroke:var(--text-primary); stroke-width:2.6px; } .tire3d .sk.axle.steer{ stroke:var(--series-1); }
.tire3d .tw{ stroke:var(--text-primary); stroke-width:.8px; vector-effect:non-scaling-stroke; cursor:pointer; stroke-linejoin:round; }
.tire3d .tw.tread{ fill-opacity:.55; stroke-opacity:.35; } .tire3d .tw.face{ fill-opacity:.9; }
.tire3d .tw.ok{ fill:var(--good); } .tire3d .tw.soon{ fill:var(--warning); } .tire3d .tw.bad{ fill:var(--critical); }
.tire3d .tw.unknown{ fill:var(--text-secondary); }
.tire3d .tw.empty{ fill:var(--surface-1); fill-opacity:.35; stroke-dasharray:3 2; stroke:var(--text-secondary); }
.tire3d .tw.sel{ stroke:var(--brand-accent); stroke-width:2.4px; stroke-opacity:1; }
.tire3d .tw:hover{ fill-opacity:1; stroke:var(--brand-accent); }
.tire3d .hub{ fill:var(--surface-1); stroke:var(--text-primary); stroke-width:.6px; vector-effect:non-scaling-stroke; }
.tire3d .tw-lab{ font:600 .22px ui-monospace, Menlo, monospace; fill:var(--text-primary); text-anchor:middle; paint-order:stroke; stroke:var(--surface-1); stroke-width:.06px; cursor:pointer; }
.tire3d .tw-lab.sel{ fill:var(--brand-accent); }
.tire3d .tw-front{ font:700 .3px system-ui, sans-serif; fill:var(--series-1); text-anchor:middle; letter-spacing:.02px; }
.tire-legend{ color:var(--text-secondary); } .tire-legend .sw{ display:inline-block; width:12px; height:12px; border-radius:50%; margin-right:4px; vertical-align:-2px; border:1px solid var(--text-secondary); }
.sw-ok{ background:var(--good); } .sw-soon{ background:var(--warning); } .sw-bad{ background:var(--critical); } .sw-unknown{ background:var(--text-secondary); } .sw-empty{ background:transparent; border-style:dashed !important; }
.tire-facts{ display:grid; grid-template-columns:auto 1fr; gap:4px 12px; font-size:13px; margin:10px 0; }
.tire-facts dt{ color:var(--text-secondary); } .tire-facts dd{ margin:0; }
.meter.big{ width:140px; }
.tire-hist{ list-style:none; padding:0; margin:0; max-height:260px; overflow:auto; font-size:13px; }
.tire-hist li{ padding:5px 0; border-bottom:1px solid var(--grid); }
.dtc-truck h3{ font-size:16px; }

/* Fleet → Vehicles tiles (renderFleetTiles in app.js) */
.vtiles{ display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:10px; }
.vtile{ background:var(--surface-1); border:1px solid var(--border); border-left:4px solid var(--good); border-radius:10px; padding:10px 12px; cursor:pointer; display:flex; flex-direction:column; gap:6px; }
.vtile:hover, .vtile:focus-visible{ box-shadow:0 0 0 2px var(--focus); outline:none; }
.vtile.slow{ border-left-color:var(--warning); } .vtile.late{ border-left-color:var(--critical); }
.vtile.off{ border-left-color:var(--border); opacity:.7; }
.vtile header{ display:flex; align-items:center; gap:6px; }
.vtile-name{ font-size:16px; } .vtile-status{ margin-left:auto; }
.vtile-stats{ display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
.vtile-stats > div{ background:var(--surface-2); border-radius:6px; padding:5px 7px; min-width:0; }
.vtile-stats span{ display:block; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .vtile-stats b{ font-size:14px; }
.vtile-flags{ display:flex; flex-wrap:wrap; gap:4px; }
.vtile footer{ margin-top:auto; }

/* A driver's name anywhere opens their profile (driverLink in dispatch-util.js). */
a.drv-link{ color:inherit; text-decoration:underline dotted; text-underline-offset:2px; }
a.drv-link:hover{ color:var(--brand-accent); text-decoration-style:solid; }

.tire3d .lifebar{ cursor:pointer; }
.tire3d .lb-bg{ fill:var(--surface-2); stroke:var(--border); stroke-width:.6px; vector-effect:non-scaling-stroke; }
.tire3d .lifebar.ok .lb-fill{ fill:var(--good); } .tire3d .lifebar.soon .lb-fill{ fill:var(--warning); } .tire3d .lifebar.bad .lb-fill{ fill:var(--critical); }
.tire3d .lifebar.unknown .lb-fill, .tire3d .lifebar.empty .lb-fill{ fill:var(--text-secondary); }
.tire3d .tw-pct{ font-weight:500; fill:var(--text-secondary); }

/* Red ! on a truck tile with engine codes nobody has dealt with (openDtcAlert in app.js). */
.vtile-alert{ flex:none; width:24px; height:24px; border-radius:50%; border:0; background:var(--critical); color:#fff; font:800 15px/24px system-ui, sans-serif; text-align:center; padding:0; cursor:pointer;
  box-shadow:0 0 0 3px color-mix(in srgb, var(--critical) 25%, transparent); animation:vtile-pulse 2s ease-in-out infinite; }
.vtile-alert:hover{ transform:scale(1.1); } .vtile-alert.static{ display:inline-block; animation:none; cursor:default; vertical-align:-3px; }
@keyframes vtile-pulse{ 50%{ box-shadow:0 0 0 6px color-mix(in srgb, var(--critical) 10%, transparent); } }
@media (prefers-reduced-motion:reduce){ .vtile-alert{ animation:none; } }
.da-actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:12px; }
.da-remind{ display:inline-flex; align-items:center; gap:6px; }

.tire3d .tw.est{ fill-opacity:.4; stroke-dasharray:2 2; }
.vtile-tires{ display:flex; flex-wrap:wrap; gap:4px 12px; align-items:center; } .vtile-tires .meter{ width:60px; margin:0 4px; }
.meter i.warn{ background:var(--warning); }

.tl-grid{ display:grid; grid-template-columns:auto 1fr 1fr; gap:8px 12px; align-items:center; margin:8px 0; }
.tl-grid input{ width:100%; } .tl-grid .tl-h{ font-weight:600; }

.parts-table .p-stock{ min-height:0; line-height:1.2; }
#invQ{ min-width:220px; }
.stats > .warn b{ color:var(--warning); }

/* Roadside (dispatch-intake.js / dispatch-call.js) */
.subform.roadside summary{ font-weight:600; }
.qi-rs{ display:flex; flex-wrap:wrap; gap:8px 14px; align-items:end; margin:10px 0 4px; padding:10px; border:1px dashed var(--border); border-radius:8px; }
.qi-rs label{ display:grid !important; gap:2px; font-size:13px; } .qi-rs label[hidden]{ display:none !important; }

/* Office → Financials (financials-page.js): QuickBooks report rows */
.qb-report tr.qb-section td{ font-weight:600; background:var(--surface-2); }
.qb-report tr.qb-total td{ font-weight:700; border-top:1px solid var(--border); }
.warn-text{ color:var(--warning); }

/* Call form trip map (call-trip.js): truck's home lot → pickup → stops → destination → back */
.trip{ display:grid; grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); gap:12px; align-items:start; }
.trip-map{ height:260px; border-radius:8px; border:1px solid var(--border); overflow:hidden; }
.trip-legs{ line-height:1.5; }
.trip-list{ list-style:none; margin:6px 0 0; padding:0; }
.trip-list li{ display:grid; grid-template-columns:1fr auto 90px; gap:8px; padding:4px 0; border-bottom:1px solid var(--border); }
.trip-list li span:last-child{ text-align:right; color:var(--text-secondary); }
.trip-list .trip-total{ font-weight:700; border-bottom:0; }
.map-tag.trip-lot{ background:#05070A; border:2px solid #fff; }
.map-tag.trip-start{ background:#2F63D4; border:2px solid #fff; }
.map-tag.trip-pickup{ background:#c62828; border:2px solid #fff; }
.map-tag.trip-drop{ background:#0a7a33; border:2px solid #fff; }
.map-tag.trip-stop{ background:#e3a33a; border:2px solid #fff; }
@media (max-width:800px){ .trip{ grid-template-columns:1fr; } }

/* Destination quick-picks: ★ = dealer for this make, fits = suits the job (body shop for accidents…) */
.dest-chips .chip-btn.best{ border-color:var(--brand-accent); background:color-mix(in srgb, var(--brand-accent) 14%, transparent); font-weight:700; }
.dest-chips .chip-btn.fits{ border-color:var(--brand-accent); }
.dest-table td.addr{ position:relative; min-width:280px; }
.dest-table input{ width:100%; }
#destForm{ grid-column:1 / -1; }
.dest-table td.addr{ display:flex; align-items:center; gap:6px; }
.dest-table td.addr .suggest{ top:100%; left:0; }
