:root {
  color-scheme: light;
  --bg: #eef3f4;
  --surface: #ffffff;
  --surface-strong: #f8fbfb;
  --ink: #172123;
  --muted: #647478;
  --line: #dbe5e7;
  --teal: #0a8f8b;
  --teal-dark: #086d6b;
  --mint: #8ce0c6;
  --amber: #f0a12b;
  --coral: #e7604f;
  --violet: #6956c9;
  --navy: #182b3a;
  --shadow: 0 24px 60px rgba(24, 43, 58, 0.14);
  --soft-shadow: 0 12px 30px rgba(24, 43, 58, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark {
  color-scheme: dark;
  --bg: #0f1719;
  --surface: #162326;
  --surface-strong: #1b2a2e;
  --ink: #eef7f6;
  --muted: #9fb1b5;
  --line: #2a3d42;
  --teal: #28b8af;
  --teal-dark: #8ce0d7;
  --mint: #79d9c1;
  --amber: #f2b24d;
  --coral: #f47a69;
  --violet: #9c8cff;
  --navy: #d8ecef;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(240, 161, 43, 0.09), transparent 30%),
    var(--bg);
}

:root.dark body {
  background:
    linear-gradient(135deg, rgba(40, 184, 175, 0.1), transparent 28%),
    linear-gradient(315deg, rgba(242, 178, 77, 0.08), transparent 30%),
    var(--bg);
}

:root.dark .garage-page {
  background:
    linear-gradient(135deg, rgba(40, 184, 175, 0.1), transparent 28%),
    linear-gradient(315deg, rgba(242, 178, 77, 0.08), transparent 30%),
    var(--bg);
}

:root.dark .garage-page .manager-shell {
  background: rgba(22, 35, 38, 0.9);
  border-color: rgba(54, 79, 84, 0.82);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  fill: currentColor;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 28px 22px;
  color: #e9f7f5;
  background: linear-gradient(180deg, #152b2f 0%, #111d23 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #0f2d31;
  background: linear-gradient(135deg, #9ae8ce, #f5c05a);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0;
}

.brand small {
  margin-top: 3px;
  color: #9fb4b8;
  font-size: 0.76rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  color: #a9bdc1;
  text-decoration: none;
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item:hover {
  transform: translateX(2px);
}

.sidebar-panel {
  margin-top: auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.sidebar-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-panel span,
.sidebar-panel p {
  color: #adc1c5;
  font-size: 0.84rem;
}

.sidebar-panel strong {
  color: #ffffff;
  font-size: 1.4rem;
}

.readiness-track {
  height: 8px;
  margin: 14px 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
}

.readiness-track span {
  display: block;
  width: 91%;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--amber));
  border-radius: inherit;
}

.sidebar-panel p {
  margin: 0;
  line-height: 1.5;
}

.dashboard {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.dashboard > * {
  min-width: 0;
}

.app-page[hidden] {
  display: none;
}

.dashboard-page {
  display: grid;
  gap: 24px;
}

.garage-page {
  position: fixed;
  inset: 0 0 0 280px;
  z-index: 20;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(240, 161, 43, 0.09), transparent 30%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 32vw);
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(219, 229, 231, 0.9);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.search svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.icon-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-button {
  position: relative;
  width: 44px;
  color: var(--navy);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.theme-toggle .moon-icon {
  display: none;
}

:root.dark .theme-toggle .sun-icon {
  display: none;
}

:root.dark .theme-toggle .moon-icon {
  display: block;
}

.icon-button svg,
.primary-action svg,
.secondary-action svg {
  width: 19px;
  height: 19px;
}

.primary-action {
  padding: 0 17px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0d726f);
  box-shadow: 0 16px 34px rgba(10, 143, 139, 0.26);
}

.secondary-action {
  width: 100%;
  padding: 0 16px;
  color: var(--teal-dark);
  background: #e8f7f4;
  border: 1px solid #b8ddd7;
}

.icon-button:hover,
.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.pulse-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 9px;
  height: 9px;
  background: var(--coral);
  border: 2px solid var(--surface);
  border-radius: 999px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-visual,
.summary-panel,
.stat-card,
.fleet-section,
.detail-card,
.timeline-card,
.data-section,
.chart-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-visual {
  min-height: 360px;
  overflow: hidden;
}

.vehicle-stage {
  position: relative;
  min-height: 360px;
  height: 100%;
  background:
    linear-gradient(160deg, rgba(24, 43, 58, 0.95), rgba(21, 62, 68, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, 0.04) 18px 19px);
}

.vehicle-stage::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.road-line {
  position: absolute;
  left: -8%;
  width: 120%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(140, 224, 198, 0.8), transparent);
  opacity: 0.74;
}

.line-a {
  top: 34%;
  transform: rotate(-11deg);
}

.line-b {
  top: 68%;
  transform: rotate(7deg);
}

.truck-art {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(440px, 76%);
  height: 160px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 34px 38px rgba(0, 0, 0, 0.28));
}

.truck-box {
  position: absolute;
  left: 84px;
  top: 64px;
  width: 300px;
  height: 66px;
  background: linear-gradient(135deg, #eef6f7, #b9cfd3);
  border-radius: 28px 36px 10px 10px;
}

.truck-box::before {
  content: "";
  position: absolute;
  left: 46px;
  top: -3px;
  width: 108px;
  height: 8px;
  background: rgba(10, 143, 139, 0.68);
  border-radius: 999px;
}

.truck-box::after {
  content: "";
  position: absolute;
  right: 34px;
  top: 16px;
  width: 58px;
  height: 34px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
}

.truck-cab {
  position: absolute;
  left: 122px;
  top: 34px;
  width: 178px;
  height: 62px;
  background: linear-gradient(135deg, #22a09b, #0a6f6c);
  border-radius: 54px 70px 8px 8px;
  clip-path: polygon(14% 100%, 29% 12%, 73% 12%, 94% 100%);
}

.truck-cab::before {
  content: "";
  position: absolute;
  left: 43px;
  top: 12px;
  width: 82px;
  height: 29px;
  background: #d6f3f2;
  clip-path: polygon(0 100%, 18% 0, 74% 0, 100% 100%);
  border-radius: 6px;
}

.truck-light {
  position: absolute;
  left: 52px;
  top: 98px;
  width: 22px;
  height: 11px;
  background: #f7c85f;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(247, 200, 95, 0.72);
}

.truck-wheel {
  position: absolute;
  bottom: 12px;
  width: 58px;
  height: 58px;
  background: #10232a;
  border: 9px solid #273e45;
  border-radius: 50%;
}

.truck-wheel::after {
  content: "";
  position: absolute;
  inset: 11px;
  background: #b8c9cc;
  border-radius: inherit;
}

.truck-wheel.front {
  left: 106px;
}

.truck-wheel.rear {
  right: 68px;
}

.service-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.service-node svg {
  width: 19px;
  height: 19px;
  color: var(--mint);
}

.service-node.oil {
  left: clamp(22px, 7vw, 86px);
  top: 58px;
}

.service-node.tires {
  right: clamp(22px, 6vw, 76px);
  bottom: 54px;
}

.summary-panel {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 24px;
}

.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  gap: 16px;
  min-width: 0;
}

.summary-heading strong {
  color: var(--ink);
}

.metric-ring {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
}

.metric-ring svg {
  position: absolute;
  width: 174px;
  height: 174px;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: #e2ecee;
}

.ring-fg {
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: calc(302 - (302 * var(--ring)) / 100);
}

.metric-ring div {
  display: grid;
  place-items: center;
  gap: 3px;
}

.metric-ring strong {
  font-size: 2.4rem;
}

.metric-ring span {
  color: var(--muted);
  font-size: 0.84rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quick-stats li {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 10px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quick-stats span {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.quick-stats strong {
  font-size: 1.28rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 108px;
  padding: 18px;
  color: inherit;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-action {
  cursor: pointer;
}

.stat-action:hover,
.stat-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

.stat-action:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.stat-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.teal {
  color: #074f4d;
  background: #cef2eb;
}

.stat-icon.amber {
  color: #7a4a03;
  background: #fde6bd;
}

.stat-icon.coral {
  color: #7c231b;
  background: #ffd6d1;
}

.stat-icon.violet {
  color: #332783;
  background: #ddd8ff;
}

.stat-card span:not(.stat-icon) {
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-size: 1.8rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.82fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.main-column {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.fleet-section,
.detail-card,
.timeline-card,
.data-section {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  background: #edf5f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-chip {
  min-height: 34px;
  min-width: 78px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.filter-chip.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 43, 58, 0.1);
}

.vehicle-list {
  display: grid;
  gap: 12px;
}

.vehicle-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  padding: 14px;
  background: #fbfdfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(24, 43, 58, 0.05);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.vehicle-card:hover,
.vehicle-card.selected {
  border-color: rgba(10, 143, 139, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(24, 43, 58, 0.1);
}

.vehicle-badge {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(140, 224, 198, 0.34), rgba(240, 161, 43, 0.18)),
    #f2f7f7;
  border-radius: 8px;
}

.vehicle-badge svg {
  width: 58px;
  height: 58px;
  color: var(--teal-dark);
}

.vehicle-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.vehicle-main {
  min-width: 0;
}

.vehicle-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.vehicle-title strong {
  font-size: 1.04rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.74rem;
  font-weight: 800;
  border-radius: 999px;
}

.status-pill.good {
  color: #07534f;
  background: #d6f4ee;
}

.status-pill.due {
  color: #705000;
  background: #ffedc2;
}

.status-pill.overdue {
  color: #7f251d;
  background: #ffd8d3;
}

.vehicle-meta,
.vehicle-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.84rem;
}

.vehicle-services {
  margin-top: 10px;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 999px;
}

.vehicle-action {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.vehicle-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 8px;
}

.health-meter {
  width: 96px;
  height: 8px;
  overflow: hidden;
  background: #e5eef0;
  border-radius: 999px;
}

.health-meter span {
  display: block;
  width: var(--health);
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal));
  border-radius: inherit;
}

.open-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--teal-dark);
  background: #edf8f6;
  border: 1px solid #c6e3df;
  border-radius: 8px;
}

.open-detail svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.status-button {
  color: #5a4207;
  background: #fff4d9;
  border-color: #edd28b;
}

.service-button {
  color: #074f4d;
  background: #dff8f3;
  border-color: #b4e3dc;
}

.log-button {
  color: #332783;
  background: #efedff;
  border-color: #d6d0ff;
}

.mileage-button {
  color: #705000;
  background: #fff6df;
  border-color: #efdca7;
}

.detail-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 10px;
}

.detail-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.unit-portrait {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(10, 143, 139, 0.2), rgba(240, 161, 43, 0.16)),
    #f4f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.unit-portrait::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(10, 143, 139, 0.28);
  border-radius: 8px;
}

.car-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

.unit-portrait.has-photo::before,
.unit-portrait.has-photo .mini-truck {
  display: none;
}

.unit-portrait.has-photo .car-photo {
  display: block;
}

.mini-truck {
  position: relative;
  z-index: 2;
  width: 210px;
  height: 78px;
  background: linear-gradient(135deg, #fbffff, #bdcdd0);
  border-radius: 32px 38px 10px 10px;
  box-shadow: 0 18px 30px rgba(24, 43, 58, 0.12);
}

.mini-truck::before {
  content: "";
  position: absolute;
  left: 44px;
  bottom: 48px;
  width: 104px;
  height: 48px;
  background: linear-gradient(135deg, var(--teal), #0b6967);
  border-radius: 42px 48px 6px 6px;
  clip-path: polygon(10% 100%, 27% 10%, 76% 10%, 95% 100%);
}

.mini-truck::after,
.mini-truck span::after {
  content: "";
  position: absolute;
  bottom: -17px;
  width: 42px;
  height: 42px;
  background: #183036;
  border: 7px solid #38525a;
  border-radius: 50%;
}

.mini-truck::after {
  left: 20px;
}

.mini-truck span::after {
  right: 24px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.detail-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-mini-row span {
  color: var(--muted);
}

.detail-mini-row strong {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.health-summary {
  display: grid;
  gap: 10px;
}

.health-tile {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.08), rgba(240, 161, 43, 0.06)),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.health-tile span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.health-tile strong {
  font-size: 1.45rem;
}

.health-tile small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-tile-track {
  height: 8px;
  overflow: hidden;
  background: #e5eef0;
  border-radius: 999px;
}

.health-tile-track i {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.health-tile.due .health-tile-track i {
  background: var(--amber);
}

.health-tile.overdue .health-tile-track i {
  background: var(--coral);
}

.parts-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.parts-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--teal-dark);
  text-decoration: none;
  background: #eef8f6;
  border: 1px solid #c6e3df;
  border-radius: 8px;
}

.parts-link svg {
  width: 17px;
  height: 17px;
}

.detail-card > .primary-action,
.detail-card > .secondary-action {
  width: 100%;
}

.detail-card > .primary-action + .secondary-action {
  margin-top: 10px;
}

.data-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-actions select {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cost-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.cost-summary-card {
  display: grid;
  gap: 6px;
  min-height: 94px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.08), rgba(240, 161, 43, 0.07)),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cost-summary-card span,
.chart-head span,
.data-log-preview span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cost-summary-card strong {
  font-size: 1.45rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.main-column .chart-grid {
  grid-template-columns: 1fr;
}

.main-column .cost-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-panel {
  min-height: 280px;
  padding: 16px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
}

.chart-row span,
.chart-row strong {
  font-size: 0.84rem;
}

.chart-row strong {
  text-align: right;
}

.chart-row div {
  height: 12px;
  overflow: hidden;
  background: #e5eef0;
  border-radius: 999px;
}

.chart-row i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  border-radius: inherit;
}

.month-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  min-height: 208px;
  padding-top: 10px;
}

.month-bar {
  display: grid;
  grid-template-rows: minmax(130px, 1fr) auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}

.month-bar span {
  display: block;
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, var(--teal), var(--amber));
  border-radius: 999px 999px 4px 4px;
}

.month-bar small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  text-overflow: ellipsis;
}

.data-log-preview {
  margin-top: 14px;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-log-preview strong {
  display: block;
  margin-top: 5px;
}

.data-log-preview p,
.empty-note {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.timeline {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 5px;
  padding-left: 28px;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--teal);
  border: 3px solid #d9f2ee;
  border-radius: 50%;
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: -14px;
  left: 7px;
  width: 2px;
  background: #dce9ea;
}

.timeline strong {
  font-size: 0.94rem;
}

.timeline span {
  color: var(--muted);
  font-size: 0.84rem;
}

.schedule-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.schedule-dialog::backdrop {
  background: rgba(17, 29, 35, 0.42);
  backdrop-filter: blur(4px);
}

.schedule-dialog form {
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.manager-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button.ghost {
  background: #edf4f5;
  box-shadow: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.field-grid input,
.field-grid select,
.field-grid textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #f7fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field-grid textarea {
  min-height: 104px;
  padding: 12px;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
}

.dialog-actions .secondary-action,
.dialog-actions .primary-action {
  width: auto;
}

.file-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.file-action input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.status-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.service-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.service-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  min-height: 0;
}

.service-fields {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.service-log-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.settings-section {
  scroll-margin-top: 24px;
}

.settings-grid {
  display: grid;
  gap: 16px;
}

.settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-card div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.settings-actions .primary-action,
.settings-actions .secondary-action,
.danger-settings .danger-action {
  width: auto;
  min-height: 42px;
}

.service-log-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: calc(100vh - 32px);
  min-height: 0;
  padding: 22px;
}

.service-log-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.service-log-summary article {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-log-summary span,
.service-record span,
.empty-receipt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-log-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.inline-log-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inline-service-log {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.service-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-record-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.service-record-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.service-record-side {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  min-width: 120px;
}

.service-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.record-action {
  min-height: 30px;
  padding: 0 10px;
  color: var(--teal-dark);
  background: #edf8f6;
  border: 1px solid #c6e3df;
  border-radius: 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.record-action.danger {
  color: #8f3027;
  background: #fff0ed;
  border-color: #f0c2bb;
}

.receipt-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--teal-dark);
  background: #edf8f6;
  border: 1px solid #c6e3df;
  border-radius: 8px;
}

.status-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  min-height: 0;
}

.status-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.status-overview {
  display: grid;
  gap: 14px;
}

.status-score-panel {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.12), rgba(240, 161, 43, 0.1)),
    #f8fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-ring {
  --score: 80;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  padding: 18px;
  text-align: center;
  background:
    radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
    conic-gradient(var(--teal) calc(var(--score) * 1%), #e5eef0 0);
  border-radius: 999px;
}

.status-ring strong {
  display: block;
  font-size: 1.7rem;
}

.status-ring span,
.status-score-copy span,
.status-metric span,
.status-metric small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-score-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.status-score-copy strong {
  font-size: 1.2rem;
}

.status-score-copy p,
.status-metric p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-metric {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-metric div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.status-metric strong {
  font-size: 1.25rem;
}

.status-track {
  height: 8px;
  overflow: hidden;
  background: #e5eef0;
  border-radius: 999px;
}

.status-track span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal));
  border-radius: inherit;
}

.status-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-actions {
  flex-shrink: 0;
}

.manager-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.garage-page.manager-dialog {
  width: auto;
  height: auto;
  max-height: none;
}

.manager-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 22px;
}

.garage-page .manager-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.manager-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  height: 100%;
}

.manager-list-panel,
.manager-form {
  min-height: 0;
  min-width: 0;
}

.manager-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f4f8f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manager-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manager-car-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.manager-car-button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manager-car-button.active {
  border-color: rgba(10, 143, 139, 0.65);
  box-shadow: 0 12px 24px rgba(24, 43, 58, 0.09);
}

.manager-thumb {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  color: var(--teal-dark);
  background: #e4f3f0;
  border-radius: 8px;
}

.manager-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manager-thumb svg {
  width: 34px;
  height: 34px;
}

.manager-car-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manager-car-copy strong,
.manager-car-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-car-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.manager-form {
  display: grid;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.editor-banner {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(24, 43, 58, 0.08);
  backdrop-filter: blur(10px);
}

.editor-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-banner span,
.automation-head span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.automation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.editor-banner strong,
.automation-head strong {
  display: block;
  margin-top: 3px;
}

.photo-editor {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.photo-preview {
  display: grid;
  min-height: 166px;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background:
    linear-gradient(150deg, rgba(10, 143, 139, 0.16), rgba(240, 161, 43, 0.14)),
    #f7fbfb;
  border: 1px dashed rgba(10, 143, 139, 0.35);
  border-radius: 8px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.photo-inputs {
  display: grid;
  gap: 12px;
}

.photo-upload input {
  width: 100%;
  padding: 11px;
  color: var(--ink);
  background: #f7fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manager-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manager-fields input[readonly] {
  color: var(--teal-dark);
  font-weight: 800;
  background: #e8f7f4;
}

.spec-field {
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.08), rgba(240, 161, 43, 0.07)),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.automation-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(10, 143, 139, 0.09), rgba(240, 161, 43, 0.08)),
    #f8fbfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.automation-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.manager-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 -10px 24px rgba(24, 43, 58, 0.08);
  backdrop-filter: blur(10px);
}

.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: #7f251d;
  background: #ffded9;
  border: 1px solid #ffc5bd;
  border-radius: 8px;
}

.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .sidebar {
    align-items: center;
    padding: 22px 12px;
  }

  .brand span:last-child,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
    width: 50px;
    padding: 0;
  }

  .sidebar-panel {
    display: none;
  }

  .garage-page {
    left: 90px;
  }

  .hero-grid,
  .workspace-grid,
  .manager-layout {
    grid-template-columns: 1fr;
  }

  .main-column {
    display: contents;
  }

  .fleet-section {
    order: 1;
  }

  .detail-column {
    order: 2;
  }

  .data-section {
    order: 3;
  }

  .manager-layout {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .manager-car-list {
    max-height: 260px;
  }

  .manager-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automation-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cost-summary-grid,
  .service-log-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .status-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search {
    width: 270px;
  }
}

@media (max-width: 780px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .nav-item.active,
  .nav-item {
    width: 44px;
    min-height: 44px;
  }

  .dashboard {
    padding: 18px;
  }

  .garage-page {
    inset: 72px 0 0;
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .search {
    flex: 1;
    width: auto;
  }

  .primary-action {
    padding-inline: 12px;
  }

  .hero-visual,
  .vehicle-stage {
    min-height: 300px;
  }

  .service-node {
    font-size: 0.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vehicle-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .vehicle-badge {
    width: 72px;
    height: 72px;
  }

  .vehicle-action {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .vehicle-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-meter {
    flex: 1;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .photo-editor,
  .manager-fields,
  .automation-fields,
  .status-fields {
    grid-template-columns: 1fr;
  }

  .status-dialog {
    width: min(920px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .service-dialog,
  .service-log-dialog {
    width: min(960px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .status-form {
    max-height: calc(100vh - 20px);
  }

  .service-form,
  .service-log-shell {
    max-height: calc(100vh - 20px);
  }

  .status-score-panel {
    grid-template-columns: 1fr;
  }

  .manager-dialog {
    width: min(1120px, calc(100vw - 20px));
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
  }

  .manager-shell {
    padding: 18px;
  }
}

@media (max-width: 520px) {
  .shell,
  .dashboard,
  .topbar,
  .topbar-actions,
  .hero-grid,
  .hero-visual,
  .summary-panel,
  .stats-grid,
  .workspace-grid,
  .fleet-section,
  .detail-card,
  .timeline-card,
  .data-section,
  .chart-panel {
    width: 100%;
    max-width: 100%;
  }

  .dashboard {
    width: 100vw;
    max-width: 100vw;
    padding: 14px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    justify-content: stretch;
  }

  .search {
    width: 100%;
  }

  .topbar-actions .primary-action {
    grid-column: 1 / -1;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .truck-art {
    left: 48%;
    width: 92%;
    transform: translate(-50%, -50%) scale(0.82);
  }

  .vehicle-stage {
    overflow: hidden;
  }

  .service-node {
    max-width: calc(100% - 28px);
    white-space: nowrap;
  }

  .summary-heading strong {
    white-space: nowrap;
  }

  .vehicle-action {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-buttons,
  .status-metric-grid,
  .cost-summary-grid,
  .service-log-summary,
  .settings-card {
    grid-template-columns: 1fr;
  }

  .month-chart {
    gap: 4px;
  }

  .chart-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .chart-row strong {
    grid-column: 2;
    text-align: left;
  }

  .status-ring {
    justify-self: center;
  }

  .manager-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .data-actions,
  .detail-action-grid,
  .service-record {
    grid-template-columns: 1fr;
  }

  .data-actions {
    display: grid;
    width: 100%;
  }

  .service-record-side {
    justify-items: start;
  }

  .service-record-actions {
    justify-content: flex-start;
  }

  .status-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .settings-actions .primary-action,
  .settings-actions .secondary-action,
  .danger-settings .danger-action {
    width: 100%;
  }

  .manager-head-actions {
    display: grid;
    grid-template-columns: 1fr 44px;
    width: 100%;
  }

  .editor-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .automation-head {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-banner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .editor-banner-actions .primary-action,
  .editor-banner-actions .danger-action {
    width: 100%;
  }

  .manager-actions .secondary-action,
  .manager-actions .primary-action,
  .manager-actions .danger-action {
    width: 100%;
  }

  .parts-link-list {
    grid-template-columns: 1fr;
  }

  .service-node.oil {
    top: 32px;
  }

  .service-node.tires {
    right: 14px;
    bottom: 36px;
  }
}

:root.dark .search {
  background: rgba(22, 35, 38, 0.84);
  border-color: rgba(42, 61, 66, 0.9);
}

:root.dark .hero-visual,
:root.dark .summary-panel,
:root.dark .stat-card,
:root.dark .fleet-section,
:root.dark .detail-card,
:root.dark .timeline-card,
:root.dark .data-section,
:root.dark .chart-panel {
  background: rgba(22, 35, 38, 0.86);
  border-color: rgba(54, 79, 84, 0.82);
}

:root.dark .quick-stats li,
:root.dark .vehicle-card,
:root.dark .manager-car-button,
:root.dark .status-metric,
:root.dark .service-record,
:root.dark .health-tile {
  background: #132124;
}

:root.dark .segmented-control,
:root.dark .manager-list-panel,
:root.dark .photo-preview,
:root.dark .automation-panel,
:root.dark .status-score-panel,
:root.dark .cost-summary-card {
  background:
    linear-gradient(135deg, rgba(40, 184, 175, 0.08), rgba(242, 178, 77, 0.06)),
    #101c1f;
}

:root.dark .filter-chip.active {
  background: #223338;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

:root.dark .vehicle-badge {
  background:
    linear-gradient(145deg, rgba(40, 184, 175, 0.2), rgba(242, 178, 77, 0.12)),
    #1b2a2e;
}

:root.dark .health-meter {
  background: #263a3f;
}

:root.dark .status-track {
  background: #263a3f;
}

:root.dark .health-tile-track {
  background: #263a3f;
}

:root.dark .status-ring {
  background:
    radial-gradient(circle at center, #132124 0 57%, transparent 58%),
    conic-gradient(var(--teal) calc(var(--score) * 1%), #263a3f 0);
}

:root.dark .unit-portrait {
  background:
    linear-gradient(150deg, rgba(40, 184, 175, 0.14), rgba(242, 178, 77, 0.1)),
    #162326;
}

:root.dark .parts-link,
:root.dark .open-detail,
:root.dark .receipt-link,
:root.dark .record-action,
:root.dark .secondary-action {
  color: var(--teal-dark);
  background: #132d2f;
  border-color: #2a5b5c;
}

:root.dark .record-action.danger {
  color: #ffc9c1;
  background: #3a1f1c;
  border-color: #6d342d;
}

:root.dark .status-button {
  color: #f2c76e;
  background: #332813;
  border-color: #684f1c;
}

:root.dark .service-button {
  color: var(--teal-dark);
  background: #123033;
  border-color: #2a5b5c;
}

:root.dark .log-button {
  color: #c7c0ff;
  background: #25243d;
  border-color: #494577;
}

:root.dark .mileage-button {
  color: #f2c76e;
  background: #342914;
  border-color: #705929;
}

:root.dark .data-actions select,
:root.dark .data-log-preview,
:root.dark .service-log-summary article,
:root.dark .settings-card {
  color: var(--ink);
  background: #101c1f;
  border-color: var(--line);
}

:root.dark .inline-log-panel {
  background: #101c1f;
  border-color: var(--line);
}

:root.dark .chart-row div {
  background: #263a3f;
}

:root.dark .schedule-dialog {
  background: #162326;
}

:root.dark .icon-button.ghost {
  background: #223338;
}

:root.dark .field-grid input,
:root.dark .field-grid select,
:root.dark .field-grid textarea,
:root.dark .photo-upload input {
  color: var(--ink);
  background: #101c1f;
  border-color: var(--line);
}

:root.dark .manager-thumb {
  background: #132d2f;
}

:root.dark .editor-banner,
:root.dark .manager-actions {
  background: rgba(22, 35, 38, 0.95);
}

:root.dark .manager-fields input[readonly] {
  background: #123033;
}

:root.dark .danger-action {
  color: #ffc7bf;
  background: #4a211d;
  border-color: #75362f;
}
