#fleet-workspace-root [hidden] { display: none !important; }
#fleet-workspace-root .toolrow,
#fleet-workspace-root .fleet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}
#fleet-workspace-root :is(input:not([type=checkbox],[type=radio]), select, button) {
  min-height: 40px;
}
#fleet-workspace-root label { min-width: 0; }
#fleet-workspace-root .fleet-actions label { flex: 0 1 auto; }
#fleet-workspace-root .fleet-plate { font-weight: 750; color: #165441; }
#fleet-workspace-root .fleet-grid > .fleet-inspection-group { grid-column: 1 / -1; }
.fleet-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-block: 12px;
}
.fleet-kpis button {
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: start;
  border: 1px solid #d6e7df;
  background: #f4faf6;
  color: #194d3c;
}
.fleet-kpis button:hover { border-color: #39775e; }
.fleet-kpis strong { font-size: 1.55rem; }
.fleet-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 12px 0 20px;
  list-style: none;
  counter-reset: fleet-step;
}
.fleet-steps li {
  padding: 10px;
  border-radius: 9px;
  background: #f1f5f2;
  color: #405c4e;
  counter-increment: fleet-step;
}
.fleet-steps li::before {
  content: counter(fleet-step) ". ";
  font-weight: 750;
}
.fleet-steps [aria-current=step] {
  background: #ffe03b;
  color: #20372b;
  font-weight: 750;
}
.fleet-inspection-group {
  margin: 8px 0;
  border: 1px solid #d6e7df;
  border-radius: 9px;
  padding: 10px 12px;
}
#fleet-workspace-root summary { cursor: pointer; font-weight: 650; margin-bottom: 8px; }
.fleet-inspection-group .fleet-checks { margin-top: 12px; }
.fleet-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fleet-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
}
.fleet-facts div { overflow-wrap: anywhere; }
.fleet-facts dt { font-size: 0.85rem; color: #405c4e; }
.fleet-facts dd { margin: 4px 0 0; font-weight: 650; }
#fleet-evidence { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-block: 14px; }
#fleet-evidence .fleet-note { flex-basis: 100%; }
#fleet-finish { margin-top: 12px; }
@media (max-width: 680px) {
  .fleet-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fleet-workspace-root .fleet-checks { grid-template-columns: 1fr; }
}
#fleet-workspace-root :is(input:not([type=checkbox],[type=radio],[type=file]), select, textarea) {
  box-sizing: border-box;
  border: 1px solid #cbdcd2;
  border-radius: 9px;
  padding: 8px 11px;
  background-color: #fff;
  color: #20372b;
  font: inherit;
}
#fleet-workspace-root select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, #405c4e 50%), linear-gradient(135deg, #405c4e 50%, transparent 50%);
  background-size: 5px 5px;
  background-position: right 15px center, right 10px center;
  background-repeat: no-repeat;
}
#fleet-workspace-root :is(input, select, textarea, button):focus-visible {
  outline: 2px solid #39775e;
  outline-offset: 2px;
}
#fleet-workspace-root button:not(.primary,.fleet-kpis button) {
  border-radius: 9px;
  border: 1px solid #cbdcd2;
  padding: 6px 12px;
  background: #fff;
  color: #254b3c;
  font: inherit;
  cursor: pointer;
}
#fleet-workspace-root button:not(.primary):hover { background: #eef7f1; }
#fleet-workspace-root button:disabled { opacity: 0.55; cursor: default; }
#fleet-search { width: min(100%, 310px); }

/* Fleet overview uses the same palette and card rhythm as the operations dashboard. */
.fleet-dashboard {
  --fleet-ink: #16352a;
  --fleet-muted: #53665b;
  --fleet-line: #dbe7df;
  --fleet-green: #166044;
  --fleet-yellow: #ffe03b;
  color: var(--fleet-ink);
}
.fleet-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid #18513c;
  border-radius: 18px;
  background: linear-gradient(115deg, #173e31, #205b44);
  color: #fff;
}
.fleet-dashboard-hero h2 {
  margin: 0 0 20px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}
.fleet-dashboard-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px clamp(20px, 4vw, 48px);
  margin-bottom: 24px;
}
.fleet-dashboard-totals > div { display: grid; gap: 6px; }
.fleet-dashboard-totals strong {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fleet-dashboard-totals > div + div strong { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.fleet-dashboard-totals span { color: #e1f0e7; font-size: .86rem; }
.fleet-dashboard-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#fleet-workspace-root .fleet-dashboard-hero-action {
  background: transparent;
  border-color: #a9c6b4;
  color: #fff;
  padding-inline: 14px;
}
#fleet-workspace-root .fleet-dashboard-hero-action:hover { background: #32694f; }
.fleet-dashboard-distribution {
  padding: 16px;
  border: 1px solid #58816c;
  border-radius: 14px;
  background: rgba(11, 39, 29, .28);
}
.fleet-dashboard-distribution h3 { margin: 0 0 12px; font-size: .96rem; }
.fleet-dashboard-bar {
  display: flex;
  height: 9px;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 20px;
  background: #486d5a;
}
.fleet-dashboard-bar span { flex-basis: 0; }
.fleet-dashboard [data-fleet-tone=active] { background: #74d9a3; }
.fleet-dashboard [data-fleet-tone=available] { background: #79b7f3; }
.fleet-dashboard [data-fleet-tone=repair] { background: #f3cd49; }
.fleet-dashboard [data-fleet-tone=accident] { background: #f19c8b; }
.fleet-dashboard [data-fleet-tone=retired] { background: #b9c7c0; }
.fleet-dashboard-statuses {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
}
#fleet-workspace-root .fleet-dashboard-statuses button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
  color: #fff;
  font-size: .82rem;
}
#fleet-workspace-root .fleet-dashboard-statuses button:hover { background: #32694f; }
.fleet-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.fleet-dashboard-summaries,
.fleet-dashboard-columns {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.fleet-dashboard-summaries { grid-template-columns: repeat(auto-fit,minmax(min(100%, 180px),1fr)); }
.fleet-dashboard-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.fleet-dashboard-card,
#fleet-workspace-root .fleet-dashboard-summaries button {
  padding: 16px;
  border: 1px solid var(--fleet-line);
  border-radius: 15px;
  background: #fff;
  min-width: 0;
}
#fleet-workspace-root .fleet-dashboard-summaries button {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 4px 8px;
  text-align: left;
  font-size: .85rem;
}
.fleet-dashboard-summaries button > strong {
  grid-column: 1;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  overflow-wrap: anywhere;
  color: var(--fleet-ink);
}
.fleet-dashboard-summaries .fleet-dashboard-arrow { grid-column: 2; grid-row: 1 / span 2; }
.fleet-dashboard-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.fleet-dashboard-rows { display: grid; }
#fleet-workspace-root .fleet-dashboard-rows button {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 9px 6px;
  border-color: transparent;
  border-radius: 0;
  font-size: .85rem;
}
#fleet-workspace-root .fleet-dashboard-rows button[data-overview-record] {
  grid-template-columns: auto minmax(0,1fr) auto auto;
}
#fleet-workspace-root .fleet-dashboard-rows button + button { border-top-color: var(--fleet-line); }
#fleet-workspace-root .fleet-dashboard-rows button:focus-visible { border-radius: 8px; }
.fleet-dashboard-rows small { display: block; margin-top: 3px; color: var(--fleet-muted); }
.fleet-task-count, .fleet-record-type {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 26px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #edf4ef;
  color: var(--fleet-green);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
}
.fleet-task-count[data-attention=true] { background: #fff2c5; color: #6a4a0d; }
.fleet-record-type[data-record-type=accident] { background: #fff0e9; color: #813d2c; }
.fleet-record-type[data-record-type=handover] { background: #e9f1fb; color: #31597e; }
.fleet-dashboard time { font-size: .76rem; color: var(--fleet-muted); font-variant-numeric: tabular-nums; }
.fleet-dashboard-arrow { color: var(--fleet-green); font-size: 1.18rem; line-height: 1; }
.fleet-dashboard-empty, .fleet-dashboard-loading {
  margin: 8px 0 0;
  padding: 16px;
  border-radius: 10px;
  background: #f3f8f4;
  color: var(--fleet-muted);
  font-size: .86rem;
}
@media (max-width: 900px) {
  .fleet-dashboard-hero, .fleet-dashboard-columns { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 370px) {
  .fleet-dashboard-statuses { grid-template-columns: 1fr; }
  #fleet-workspace-root .fleet-dashboard-rows button[data-overview-record] {
    grid-template-columns: auto minmax(0,1fr) auto;
  }
  .fleet-dashboard-rows time { grid-column: 2; grid-row: 2; }
}
