/* fleet & transport — trips, planner with stall diagram, fleet cards, vehicle page, availability calendar */
.fl-tabs { margin-bottom: 14px; display: flex; overflow-x: auto; max-width: 100%; }
.fl-tabs a, .fl-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; text-decoration: none; color: var(--ink2); font: 600 13.5px var(--f-head); border: 0; background: transparent; cursor: pointer; white-space: nowrap; border-inline-end: 1px solid var(--line); }
.fl-tabs a.on, .fl-tabs button.on { background: var(--green); color: var(--oat); }
:root[data-theme="dark"] .fl-tabs a.on, :root[data-theme="dark"] .fl-tabs button.on { background: var(--oat); color: var(--green); }
.fl-tabs .ico { width: 16px; height: 16px; }
.fl-h { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: .06em; margin: 18px 0 8px; cursor: default; }
.fl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; }
.fl-trip { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; border-inline-start: 4px solid var(--line2); }
.fl-trip.s-in_transit { border-inline-start-color: var(--clay); } .fl-trip.s-confirmed { border-inline-start-color: var(--sage); } .fl-trip.s-cancelled { opacity: .6; }
.fl-date { text-align: center; } .fl-date b { display: block; font: 700 26px var(--f-head); line-height: 1; } .fl-date small { font: 500 10.5px var(--f-mono); color: var(--mute); }
.fl-main { min-width: 0; } .fl-main p { margin: 3px 0; } .fl-main .ico { width: 15px; height: 15px; vertical-align: -3px; }
.fl-title { font: 700 16px var(--f-head); text-decoration: none; } .fl-title:hover { color: var(--tack); }
.fl-horses { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0; }
.fl-meter { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 6px; } .fl-meter i { display: block; height: 100%; background: var(--sage); }
.fl-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.fl-past summary { list-style: none; } .fl-past summary::-webkit-details-marker { display: none; } .fl-past summary::before { content: '▸ '; } .fl-past[open] summary::before { content: '▾ '; }

/* planner */
.fl-plan { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.fl-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fl-check p { margin: 0 0 6px; font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; } .fl-check .ico { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.fl-err { color: var(--bad); } .fl-warn { color: var(--warn); } .fl-ok { color: var(--ok); } .warn-txt { color: var(--warn); }
.fl-est { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0 0; } .fl-est dt { font: 600 10px var(--f-mono); color: var(--mute); text-transform: uppercase; } .fl-est dd { margin: 0; font-weight: 700; }
.fl-lorry { display: grid; grid-template-columns: 54px repeat(var(--n), minmax(0, 1fr)) 36px; gap: 6px; align-items: stretch; background: var(--panel2); border: 2px solid var(--line2); border-radius: 14px; padding: 8px; overflow-x: auto; }
.fl-cab { display: grid; place-items: center; background: var(--green); color: var(--oat); border-radius: 10px 4px 4px 10px; min-height: 96px; }
[dir="rtl"] .fl-cab { border-radius: 4px 10px 10px 4px; }
.fl-stall { position: relative; min-width: 62px; min-height: 96px; border-radius: 16px 16px 6px 6px; border: 1.5px dashed var(--line2); background: var(--panel); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; padding: 8px 6px 6px; cursor: pointer; text-align: start; font: inherit; }
.fl-stall small { font: 500 10px var(--f-mono); color: var(--mute); } .fl-stall b { font: 700 13px var(--f-head); line-height: 1.1; overflow-wrap: anywhere; }
.fl-stall.full { border-style: solid; border-color: var(--clay); background: color-mix(in srgb, var(--clay) 18%, var(--panel)); }
.fl-stall.open { border-inline-start-style: dotted; }
.fl-stall em { font: 500 9.5px var(--f-mono); font-style: normal; color: var(--tack); text-decoration: underline dotted; }
.l-herringbone .fl-stall { transform: skewX(-10deg); } .l-herringbone .fl-stall > * { transform: skewX(10deg); }
.fl-ramp { writing-mode: vertical-rl; display: grid; place-items: center; font: 600 9.5px var(--f-mono); color: var(--mute); background: var(--line); border-radius: 6px; }
.fl-pool { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.fl-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--sage); color: var(--green); border-radius: 99px; padding: 4px 6px 4px 12px; font-weight: 700; font-size: 13.5px; cursor: grab; user-select: none; }
.fl-chip.sel { outline: 3px solid var(--clay); } .fl-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; }
.fl-add { margin-top: 4px; }
.fl-inline { display: flex; gap: 6px; margin-top: 8px; } .fl-inline input { min-width: 0; }
.fl-ck { display: flex; padding: 4px 0; font-size: 14px; } .fl-ck.done { color: var(--mute); text-decoration: line-through; }
.fl-logrow { font-size: 13.5px; margin: 0 0 6px; }
.fl-sheet { display: none; }

/* fleet cards & vehicle page */
.fl-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fl-veh { display: flex; flex-direction: column; gap: 8px; } .fl-veh.off { border-color: var(--straw); background: var(--straw-bg); }
.fl-veh-top { display: flex; gap: 10px; align-items: center; text-decoration: none; } .fl-veh-top b { display: block; font-size: 17px; } .fl-veh-top small { display: block; }
.fl-veh-top img, .fl-veh-ico { width: 56px; height: 56px; border-radius: 16px 16px 6px 6px; object-fit: cover; flex: none; }
.fl-veh-ico { display: grid; place-items: center; background: var(--green); color: var(--oat); } .fl-veh-ico .ico { width: 26px; height: 26px; }
.fl-veh-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; } .fl-veh p { margin: 0; }
.fl-due { display: flex; flex-wrap: wrap; gap: 4px; } .fl-due-top { margin-bottom: 12px; }
.fl-veh-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fl-oos { border-color: var(--straw); background: var(--straw-bg); }
.fl-svg { overflow-x: auto; } .fl-stall-svg { width: 100%; max-width: 720px; height: auto; }
.fl-stall-svg .fl-body { fill: var(--panel2); stroke: var(--line2); stroke-width: 2; }
.fl-stall-svg .fl-cabr { fill: var(--green); } .fl-stall-svg .fl-ramp-r { fill: var(--line); }
.fl-stall-svg .fl-s { fill: var(--panel); stroke: var(--line2); stroke-width: 1.5; stroke-dasharray: 4 3; } .fl-stall-svg .fl-s.full { fill: var(--sage); stroke: var(--sage); stroke-dasharray: none; }
.fl-stall-svg .fl-t { font: 600 11px var(--f-mono); fill: var(--mute); } .fl-stall-svg .fl-t.big { font: 700 14px var(--f-head); fill: var(--ink); }
.fl-stall-svg .fl-cabr + text { fill: var(--oat); }

/* availability calendar */
.fl-legend { display: inline-flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--mute); margin-inline-start: auto; flex-wrap: wrap; }
.fl-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 3px; vertical-align: -2px; }
.fl-cal-wrap { overflow-x: auto; }
.fl-cal { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 12px; }
.fl-cal th, .fl-cal td { border: 1px solid var(--line); padding: 0; height: 34px; text-align: center; }
.fl-cal thead th { font: 600 11px var(--f-mono); padding: 4px 2px; background: var(--panel2); } .fl-cal thead th small { display: block; color: var(--mute); font-size: 9.5px; }
.fl-cal thead th.now { background: var(--clay); color: var(--green); }
.fl-cal tbody th { text-align: start; padding: 4px 8px; white-space: nowrap; font: 700 13px var(--f-head); position: sticky; inset-inline-start: 0; background: var(--panel); z-index: 1; } .fl-cal tbody th small { display: block; font: 500 10px var(--f-mono); }
.fl-cal td a, .fl-cal td button { display: block; width: 100%; height: 100%; min-height: 32px; border: 0; background: transparent; cursor: pointer; }
.fl-cal td.free button:hover { background: var(--panel2); }
.k-trip, .fl-cal td.k-trip { background: var(--sage); } .k-hire, .fl-cal td.k-hire { background: var(--info-bg); } .k-service, .fl-cal td.k-service { background: var(--straw-bg); } .k-out, .fl-cal td.k-out { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 5px, var(--panel2) 5px 10px); }
.fl-cal td.clash { box-shadow: inset 0 0 0 2px var(--bad); }

@media (max-width: 1100px) { .fl-plan { grid-template-columns: 1fr; } .fl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .fl-trip { grid-template-columns: 48px minmax(0, 1fr); } .fl-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .fl-two { grid-template-columns: 1fr; } .fl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fl-lorry { grid-template-columns: 40px repeat(var(--n), minmax(56px, 1fr)) 28px; }
}
@media print {
  body.fl-printing * { visibility: hidden; } body.fl-printing .fl-sheet, body.fl-printing .fl-sheet * { visibility: visible; }
  body.fl-printing .fl-sheet { display: block; position: absolute; inset: 0; padding: 10mm; color: #000; font: 11pt 'IBM Plex Mono', monospace; }
  .fl-sheet h2, .fl-sheet h3 { font-family: 'Rajdhani', sans-serif; } .fl-sheet table { width: 100%; border-collapse: collapse; margin: 4mm 0; } .fl-sheet td, .fl-sheet th { border: 1px solid #999; padding: 2mm; text-align: start; }
}
