:root {
  color-scheme: light;
  --app-orange: #ed6e38;
  --app-orange-dark: #c85020;
  --app-orange-soft: #fff0e8;
  --app-green: #40ab8c;
  --app-green-soft: #e4f4ef;
  --app-blue: #3d85db;
  --app-blue-soft: #e8f1fc;
  --app-ink: #242629;
  --app-muted: #6c7077;
  --app-bg: #f2f3f5;
  --app-panel: #ffffff;
  --app-line: #e1e3e7;
  --app-sidebar: #232427;
  --app-sidebar-muted: #a7a9ae;
}

* {
  box-sizing: border-box;
}

html,
body.garage-page {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.garage-page {
  --garage-bg: var(--app-bg);
  --mw-text: var(--app-ink);
  --mw-muted: var(--app-muted);
  --mw-panel: var(--app-panel);
  --mw-panel-border: var(--app-line);
  --mw-panel-shadow: none;
  --mw-soft: #f7f7f8;
  --mw-soft-2: #f7f7f8;
  --mw-soft-border: var(--app-line);
  --mw-input-bg: #ffffff;
  --mw-input-border: #cfd2d7;
  --mw-chip-bg: #f4f5f6;
  --mw-chip-border: #dcdee2;
  --mw-card-bg: #ffffff;
  --mw-record-bg: #ffffff;
  --mw-record-border: var(--app-line);
  --mw-meta-bg: #f5f6f7;
  --mw-meta-border: var(--app-line);
  --mw-accent: var(--app-orange);
  --mw-success: var(--app-green);
  --mw-chart-text: var(--app-muted);
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

html.garage-booting .auth-shell {
  display: none !important;
}

html.garage-booting .app-loading[hidden] {
  display: grid !important;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.garage-root,
.garage-main {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: 0;
}

/* Authentication */
.auth-shell {
  width: 100%;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(520px, 1.08fr);
  margin: 0;
  background: var(--app-panel);
}

body.is-authenticated .auth-shell {
  display: none !important;
}

.auth-product {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 52px;
  background: var(--app-sidebar);
  color: #ffffff;
}

.auth-product-brand,
.auth-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 20px;
  font-weight: 760;
  text-decoration: none;
}

.auth-product-brand img,
.auth-mobile-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.auth-product-brand strong {
  color: #ff9163;
  font-weight: 760;
}

.auth-product-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-top: 9vh;
}

.auth-product-kicker {
  display: block;
  margin-bottom: 18px;
  color: #ff9163;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-product h1 {
  max-width: 580px;
  margin: 0;
  font-size: 48px;
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
}

.auth-product-copy p {
  max-width: 540px;
  margin: 20px 0 0;
  color: #c3c5c9;
  font-size: 17px;
  line-height: 1.7;
}

.auth-preview {
  position: relative;
  flex: 1 1 auto;
  min-height: 370px;
  margin-top: 28px;
}

.auth-preview-phone {
  position: absolute;
  bottom: -155px;
  left: 50%;
  width: 238px;
  aspect-ratio: 1206 / 2622;
  margin: 0;
  overflow: hidden;
  border: 6px solid #0f1012;
  border-radius: 31px;
  background: #0f1012;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.auth-preview-phone img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.auth-preview-phone-main {
  z-index: 2;
  transform: translateX(-72%) rotate(-4deg);
}

.auth-preview-phone-side {
  z-index: 1;
  transform: translateX(7%) translateY(34px) rotate(6deg);
}

.auth-product-foot {
  position: relative;
  z-index: 3;
  margin: 0;
  color: #909399;
  font-size: 12px;
}

.auth-panel {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 44px;
  background: var(--app-panel);
}

.auth-card,
.auth-panel-inner {
  width: min(100%, 430px);
  display: block;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-mobile-brand {
  display: none;
  margin-bottom: 40px;
  color: var(--app-ink);
}

.auth-form-head {
  margin-bottom: 30px;
}

.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #287a64;
  font-size: 12px;
  font-weight: 760;
}

.readonly-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--app-green);
  box-shadow: 0 0 0 4px var(--app-green-soft);
}

.auth-form-head h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-copy {
  width: auto;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--app-muted);
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
}

.auth-form {
  width: 100%;
  display: grid;
  gap: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #4f5359;
  font-size: 13px;
  font-weight: 700;
}

.auth-form label > input,
.password-field {
  width: 100%;
  min-height: 50px;
  border: 1px solid #cfd2d7;
  border-radius: 6px;
  background: #ffffff;
  color: var(--app-ink);
  box-shadow: none;
}

.auth-form label > input {
  padding: 13px 14px;
}

.password-field {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.auth-form .password-field input {
  min-height: 48px;
  border: 0;
  background: transparent;
}

.password-field:focus-within,
.auth-form label > input:focus {
  border-color: var(--app-orange);
  outline: 3px solid rgba(237, 110, 56, 0.12);
}

.password-toggle {
  flex: 0 0 40px;
  margin-right: 5px;
  border-radius: 5px;
}

.auth-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: -4px;
  color: #898c92;
  font-size: 12px;
}

.text-button {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--app-orange-dark);
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

.primary-button.auth-submit {
  width: 100%;
  min-height: 50px;
  justify-self: stretch;
  border: 0;
  border-radius: 6px;
  background: var(--app-orange);
  color: #ffffff;
  box-shadow: none;
}

.primary-button.auth-submit:hover {
  background: var(--app-orange-dark);
  transform: none;
}

.auth-social-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-social-button {
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #cfd2d7;
  border-radius: 7px;
  padding: 10px 12px;
  background: #ffffff;
  color: #2d2f33;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.auth-social-button:hover {
  border-color: #8e9298;
  background: #fafafa;
  transform: translateY(-1px);
}

.auth-social-button:focus-visible {
  outline: 3px solid rgba(237, 110, 56, 0.14);
  outline-offset: 2px;
}

.auth-social-button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.auth-social-button > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 850;
}

.auth-social-google > span {
  background: linear-gradient(135deg, #4285f4 0 35%, #34a853 35% 60%, #fbbc05 60% 78%, #ea4335 78%);
  color: #ffffff;
}

.auth-social-apple {
  border-color: #222326;
  background: #222326;
  color: #ffffff;
}

.auth-social-apple:hover {
  border-color: #000000;
  background: #000000;
}

.auth-social-apple > span {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: 19px;
}

.auth-divider {
  position: relative;
  margin: 28px 0 18px;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--app-line);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: #ffffff;
  color: #898c92;
  font-size: 12px;
}

.auth-app-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd2d7;
  border-radius: 6px;
  background: #ffffff;
  color: var(--app-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.auth-app-link:hover {
  border-color: var(--app-ink);
}

.auth-legal {
  margin: 20px 0 0;
  color: #999ca1;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.auth-legal a {
  color: #6d7076;
}

.error {
  margin-top: 16px;
  border-radius: 6px;
  font-size: 13px;
}

/* Application shell */
.dashboard-shell {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--app-bg);
  box-shadow: none;
}

.garage-app-frame {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  background: var(--app-bg);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background: var(--app-sidebar);
  color: #ffffff;
}

.app-brand {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
}

.app-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.app-brand small {
  display: block;
  margin-top: 1px;
  color: #ff9163;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-sidebar-label {
  display: block;
  margin: 34px 10px 10px;
  color: #777a80;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-nav {
  display: grid;
  gap: 5px;
}

.app-nav-button {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: var(--app-sidebar-muted);
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.app-nav-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-nav-button:hover {
  color: #ffffff;
  background: #303236;
}

.app-nav-button.is-active {
  color: #ffffff;
  background: var(--app-orange);
}

.app-sidebar-note {
  margin: 24px 8px 0;
  padding: 14px;
  border: 1px solid #3c3e43;
  border-radius: 7px;
  color: #aeb0b5;
  font-size: 11px;
  line-height: 1.55;
}

.app-sidebar-note strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-size: 12px;
}

.app-account {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid #3b3d41;
  padding: 16px 6px 0;
}

.app-account-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #3b3d42;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
}

.app-account-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-account-copy {
  min-width: 0;
}

.app-account-copy strong,
.app-account-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-account-copy strong {
  font-size: 12px;
}

.app-account-copy span {
  margin-top: 2px;
  color: #8f9297;
  font-size: 10px;
}

.app-signout,
.app-menu-button,
.app-refresh-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.app-signout:hover {
  background: #34363a;
  color: #ff9163;
}

.app-signout svg,
.app-menu-button svg,
.app-refresh-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-main {
  min-width: 0;
  background: var(--app-bg);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--app-line);
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.app-topbar-left,
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-menu-button {
  display: none;
  color: var(--app-ink);
}

.app-page-heading {
  min-width: 0;
}

.app-page-heading span,
.app-page-heading strong {
  display: block;
}

.app-page-heading span {
  color: #8a8d93;
  font-size: 11px;
  font-weight: 750;
}

.app-page-heading strong {
  overflow: hidden;
  color: var(--app-ink);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-readonly-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #38856f;
  font-size: 11px;
  font-weight: 750;
}

.app-readonly-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-green);
}

.app-vehicle-select {
  position: relative;
  min-width: 220px;
}

.app-vehicle-select select {
  width: 100%;
  height: 42px;
  appearance: none;
  border: 1px solid #d3d5d9;
  border-radius: 6px;
  padding: 0 38px 0 12px;
  background: #ffffff;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.app-vehicle-select::after {
  content: "⌄";
  position: absolute;
  top: 9px;
  right: 13px;
  color: #777a80;
  pointer-events: none;
}

.app-refresh-button {
  border-color: #d3d5d9;
  background: #ffffff;
  color: #60646a;
}

.app-refresh-button:hover {
  border-color: var(--app-orange);
  color: var(--app-orange-dark);
}

.app-content {
  width: min(100%, 1540px);
  margin-inline: auto;
  padding: 28px;
}

.app-sidebar-backdrop,
.app-mobile-nav {
  display: none;
}

/* Existing data views, restyled */
.maintenance-workspace,
.garage-home-workspace,
.module-overview-shell,
.garage-home-hero-card,
.garage-home-listing,
.maintenance-layout,
.maintenance-layout-app {
  width: 100%;
  margin: 0;
  background: transparent;
}

.maintenance-workspace {
  display: grid;
  gap: 22px;
}

.maintenance-overview-head {
  display: none;
}

.garage-home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
}

.garage-home-spotlight,
.garage-home-summary,
.garage-home-listing,
.maintenance-overview-surface,
.panel-card,
.vehicle-card,
.metric-card,
.record-card,
.trip-detail,
.route-panel,
.trip-calendar-panel,
.trip-scroller-panel {
  border: 1px solid var(--app-line);
  border-radius: 8px;
  background: var(--app-panel);
  box-shadow: none;
}

.panel-card:hover,
.vehicle-card:hover,
.metric-card:hover {
  border-color: var(--app-line);
  box-shadow: none;
  transform: none;
}

.garage-home-spotlight {
  overflow: hidden;
}

.garage-home-spotlight-copy {
  padding: 26px;
}

.garage-home-spotlight-head,
.garage-home-summary-head,
.panel-head,
.maintenance-overview-panel-head {
  margin-bottom: 20px;
}

.garage-home-mobile-refresh,
.toolbar-refresh-button {
  display: none !important;
}

.garage-home-identity-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1.2fr);
  gap: 28px;
  align-items: center;
}

.garage-home-visual-wrap .car-visual.hero,
.car-visual.hero {
  min-height: 220px;
  border-radius: 6px;
  background: #f6f6f7;
}

.garage-home-inline-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
}

.garage-inline-stat {
  min-height: 86px;
  padding: 16px;
  border-right: 1px solid var(--app-line);
  border-radius: 0;
  background: transparent;
}

.garage-inline-stat:last-child {
  border-right: 0;
}

.garage-inline-stat > span,
.garage-home-timeline-item > span,
.metric-label,
.sub-metric span,
.record-meta-grid span {
  color: #7d8086;
  font-size: 11px;
  font-weight: 700;
}

.garage-inline-stat strong {
  margin-top: 5px;
  font-size: 17px;
}

.garage-home-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--app-line);
}

.garage-home-timeline-item {
  min-height: 76px;
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  border-radius: 0;
  padding: 15px 14px;
  background: transparent;
}

.garage-home-timeline-item:nth-child(even) {
  border-right: 0;
}

.garage-home-summary {
  padding: 24px;
}

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

.metric-card {
  min-height: 94px;
  padding: 15px;
  border-radius: 7px;
  background: #f7f8f9;
}

.metric-value {
  margin-top: 10px;
  font-size: 19px;
}

.garage-home-activity {
  margin-top: 24px;
}

.activity-row {
  display: grid;
  grid-template-columns: 8px 30px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 56px;
  gap: 10px;
  border-bottom: 1px solid var(--app-line);
  padding: 11px 0;
}

.activity-badge {
  width: 8px;
  height: 8px;
  margin-top: 0;
  border-radius: 50%;
}

.activity-brand-logo.brand-logo-shell {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.activity-brand-logo .brand-logo {
  width: 25px;
  height: 25px;
}

.activity-brand-logo .brand-fallback {
  font-size: 10px;
}

.garage-home-listing {
  padding: 24px;
}

.garage-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.garage-car-card {
  padding: 18px;
  cursor: pointer;
}

.garage-car-card:focus-visible {
  outline: 3px solid rgba(237, 110, 56, 0.3);
  outline-offset: 2px;
}

.shared-vehicle-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 3px 8px;
  border: 1px solid #b9d7c3;
  border-radius: 4px;
  background: #edf7f0;
  color: #25623a;
  font-size: 0.72rem;
  font-weight: 750;
}

.garage-car-card.is-active {
  border-color: var(--app-orange);
  box-shadow: 0 0 0 2px rgba(237, 110, 56, 0.11);
}

.garage-car-card .car-visual.card,
.maintenance-vehicle-card .car-visual.card {
  min-height: 150px;
  margin: 18px 0;
  border-radius: 6px;
  background: #f5f6f7;
}

.vehicle-identity h3,
.vehicle-identity.large h3,
.vehicle-identity.medium h3 {
  font-size: 18px;
  letter-spacing: 0;
}

.brand-logo-shell {
  border-radius: 6px;
}

.maintenance-status-card {
  border-top: 1px solid var(--app-line);
}

.vehicle-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
  border-top: 1px solid var(--app-line);
  border-left: 1px solid var(--app-line);
}

.vehicle-facts > div {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  padding: 10px;
}

.vehicle-facts span,
.vehicle-facts strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-facts span {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 700;
}

.vehicle-facts strong {
  font-size: 12px;
}

.maintenance-status-line {
  min-height: 46px;
  border-bottom: 1px solid var(--app-line);
  padding: 11px 0;
}

.maintenance-overview-surface {
  padding: 0;
  overflow: hidden;
}

.maintenance-overview-panel {
  padding: 24px;
}

.maintenance-overview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.maintenance-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 26px;
}

.fuel-workspace .maintenance-filter-row,
.trips-workspace .maintenance-filter-row {
  grid-template-columns: 1fr;
}

.maintenance-search,
.maintenance-filter-group {
  display: grid;
  gap: 8px;
}

.maintenance-search > span,
.maintenance-filter-group > span {
  color: #777a80;
  font-size: 11px;
  font-weight: 750;
}

.maintenance-search input {
  height: 40px;
  border: 1px solid #d4d6da;
  border-radius: 6px;
  background: #ffffff;
}

.maintenance-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.maintenance-chip-button,
.segmented-button {
  min-height: 36px;
  border: 1px solid #d9dbe0;
  border-radius: 5px;
  padding: 7px 11px;
  background: #ffffff;
  color: #61656b;
  font-size: 12px;
  font-weight: 650;
}

.maintenance-chip-button.is-active,
.segmented-button.is-active {
  border-color: var(--app-orange);
  background: var(--app-orange-soft);
  color: var(--app-orange-dark);
}

.maintenance-layout-app {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 20px;
  align-items: start;
}

.maintenance-main,
.maintenance-sidebar {
  min-width: 0;
}

.maintenance-records-panel,
.maintenance-side-panel {
  padding: 22px;
}

.maintenance-sidebar {
  display: grid;
  gap: 20px;
  position: sticky;
  top: 98px;
}

.panel-head h2,
.panel-head h3,
.garage-home-listing h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--app-orange-dark);
  font-size: 10px;
  letter-spacing: 0;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  padding: 17px;
}

.record-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.record-entry {
  min-width: 0;
  display: flex;
  gap: 14px;
}

.record-entry-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 7px;
}

.record-entry-copy h3 {
  margin: 0 0 3px;
  font-size: 16px;
}

.record-inline-meta,
.record-note {
  font-size: 12px;
  line-height: 1.55;
}

.record-value {
  white-space: nowrap;
}

.record-value-main {
  font-size: 19px;
}

.fuel-bridge-pill {
  border-radius: 5px;
}

.attachment-pill,
.status-chip {
  border-radius: 5px;
}

.trip-detail,
.trip-calendar-panel,
.trip-scroller-panel,
.maintenance-vehicle-card {
  padding: 22px;
}

.trip-detail-lines {
  border-top: 1px solid var(--app-line);
}

.trip-detail-line {
  min-height: 48px;
  border-bottom: 1px solid var(--app-line);
}

.trip-detail-line span {
  color: var(--app-muted);
  font-size: 12px;
}

.trip-detail-line strong {
  font-size: 13px;
}

.trip-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.trip-insight {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--app-line);
  border-radius: 6px;
  padding: 12px;
  background: #f7f8f9;
}

.trip-insight span {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 700;
}

.trip-insight strong {
  font-size: 14px;
}

.trip-route-analysis {
  margin-top: 18px;
  border-top: 1px solid var(--app-line);
  padding-top: 18px;
}

.trip-route-analysis h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.trip-route-analysis-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.trip-route-analysis-row {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--app-line);
  padding: 10px 0;
  color: var(--app-muted);
  font-size: 12px;
}

.trip-route-analysis-row strong {
  color: var(--app-ink);
  text-align: right;
}

.route-panel {
  margin-top: 20px;
  padding: 0;
  overflow: hidden;
}

.route-map,
.route-map-canvas {
  min-height: 390px;
  border-radius: 0;
}

.trip-calendar-panel {
  position: relative;
}

.trip-calendar-nav {
  border-radius: 5px;
}

.day-cell {
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.trip-scroller-card {
  border-radius: 6px;
}

.app-loading {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 44%, rgba(237, 110, 56, 0.13) 0, rgba(237, 110, 56, 0.045) 24%, transparent 48%),
    linear-gradient(180deg, #f8f8f9 0%, #f1f2f4 100%);
  color: var(--app-ink);
}

.app-loading::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(35, 36, 39, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 36, 39, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: radial-gradient(circle at center, #000 0, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0, transparent 68%);
  pointer-events: none;
}

.app-loading-content {
  position: relative;
  z-index: 1;
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  text-align: center;
}

.app-loading-mark {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.app-loading-logo {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 17px;
  background: #ff5b00;
  box-shadow: 0 14px 28px rgba(237, 92, 34, 0.28);
  animation: app-loader-float 1.8s ease-in-out infinite;
}

.app-loading-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-loading-brand {
  color: var(--app-ink);
  font-size: 25px;
  font-weight: 790;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.app-loading-brand strong {
  color: var(--app-orange);
  font-weight: inherit;
}

.app-loading-content p {
  margin: 10px 0 20px;
  color: var(--app-muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.app-loading-progress {
  width: min(224px, 78%);
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #eceef1;
}

.app-loading-progress span {
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8c5d, var(--app-orange), #d94f18);
  box-shadow: 0 0 12px rgba(237, 110, 56, 0.36);
  animation: app-loader-progress 1.35s ease-in-out infinite;
}

.app-loading-content small {
  margin-top: 14px;
  color: #969aa1;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

@keyframes app-loader-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.025); }
}

@keyframes app-loader-progress {
  0% { transform: translateX(-115%); }
  55% { transform: translateX(90%); }
  100% { transform: translateX(245%); }
}

.toast {
  z-index: 110;
  border-radius: 6px;
}

@media (max-width: 560px) {
  .app-loading {
    padding: 20px;
  }

  .app-loading-content {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-loading-logo,
  .app-loading-progress span {
    animation-duration: 3s;
  }
}

@media (max-width: 1180px) {
  .garage-app-frame {
    grid-template-columns: 222px minmax(0, 1fr);
  }

  .garage-home-hero-grid {
    grid-template-columns: 1fr;
  }

  .garage-home-summary {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 24px;
  }

  .garage-home-summary-head {
    grid-column: 1 / -1;
  }

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

  .maintenance-layout-app {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .maintenance-filter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(330px, 0.78fr) minmax(430px, 1.22fr);
  }

  .auth-product {
    padding: 34px;
  }

  .auth-product h1 {
    font-size: 38px;
  }

  .auth-preview-phone {
    width: 190px;
  }

  .garage-app-frame {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    height: 100svh;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .garage-app-frame.is-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    border: 0;
    background: rgba(20, 21, 23, 0.52);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .garage-app-frame.is-sidebar-open .app-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-menu-button {
    display: grid;
  }

  .app-readonly-state {
    display: none;
  }

  .app-content {
    padding: 22px;
    padding-bottom: 96px;
  }

  .app-mobile-nav {
    position: fixed;
    z-index: 22;
    right: 14px;
    bottom: 12px;
    left: 14px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid #d9dbe0;
    border-radius: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 34px rgba(30, 32, 35, 0.16);
    backdrop-filter: blur(16px);
  }

  .app-mobile-nav > .app-nav {
    display: contents;
  }

  .app-mobile-nav .app-nav-button {
    min-height: 52px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 5px 3px;
    color: #777a80;
    font-size: 10px;
    text-align: center;
  }

  .app-mobile-nav .app-nav-button svg {
    width: 19px;
    height: 19px;
  }

  .app-mobile-nav .app-nav-button.is-active {
    background: var(--app-orange-soft);
    color: var(--app-orange-dark);
  }

  .maintenance-layout-app {
    grid-template-columns: 1fr;
  }

  .maintenance-sidebar {
    position: static;
    grid-row: 1;
  }

  .trips-workspace .maintenance-sidebar {
    grid-row: auto;
  }

  .garage-home-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    display: block;
    background: #ffffff;
  }

  .auth-product {
    display: none;
  }

  .auth-panel {
    min-height: 100svh;
    display: block;
    padding: 28px 22px 40px;
  }

  .auth-panel-inner {
    margin-inline: auto;
  }

  .auth-mobile-brand {
    display: inline-flex;
  }

  .auth-form-head h2 {
    font-size: 30px;
  }

  .auth-social-buttons {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    min-height: 68px;
    padding: 10px 14px;
  }

  .app-page-heading strong {
    font-size: 17px;
  }

  .app-topbar-actions {
    gap: 8px;
  }

  .app-vehicle-select {
    min-width: 0;
    width: 150px;
  }

  .app-vehicle-select select {
    font-size: 11px;
  }

  .app-refresh-button {
    display: none;
  }

  .app-content {
    padding: 14px;
    padding-bottom: 92px;
  }

  .garage-home-spotlight-copy,
  .garage-home-summary,
  .garage-home-listing,
  .maintenance-overview-panel,
  .maintenance-records-panel,
  .maintenance-side-panel,
  .trip-detail,
  .trip-calendar-panel,
  .trip-scroller-panel {
    padding: 16px;
  }

  .garage-home-identity-row {
    grid-template-columns: 1fr;
  }

  .garage-home-visual-wrap {
    grid-row: 1;
  }

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

  .garage-inline-stat:nth-child(2) {
    border-right: 0;
  }

  .garage-inline-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--app-line);
  }

  .garage-home-timeline {
    grid-template-columns: 1fr;
  }

  .garage-home-timeline-item,
  .garage-home-timeline-item:nth-child(even) {
    border-right: 0;
  }

  .garage-cards-grid {
    grid-template-columns: 1fr;
  }

  .record-main {
    display: grid;
  }

  .record-side {
    padding-left: 54px;
  }

  .trip-insight-grid,
  .trip-route-analysis-list {
    grid-template-columns: 1fr;
  }

  .route-map,
  .route-map-canvas {
    min-height: 310px;
  }
}

@media (max-width: 430px) {
  .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .app-page-heading span {
    display: none;
  }

  .app-page-heading strong {
    max-width: 100px;
  }

  .app-vehicle-select {
    width: 136px;
  }

  .garage-home-summary .summary-grid {
    grid-template-columns: 1fr;
  }

  .garage-home-timeline-value strong {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Fixed application viewport and desktop master-detail workspaces */
body.is-authenticated {
  height: 100dvh;
  overflow: hidden;
}

body.is-authenticated .garage-root,
body.is-authenticated .dashboard-shell,
body.is-authenticated [data-app],
body.is-authenticated .garage-app-frame {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.is-authenticated .app-main {
  min-height: 0;
  overflow: hidden;
}

body.is-authenticated .app-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.selectable-record {
  position: relative;
  cursor: pointer;
}

.selectable-record::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.selectable-record.is-active {
  border-color: rgba(237, 110, 56, 0.55);
  background: #fffaf7;
}

.selectable-record.is-active::before {
  background: var(--app-orange);
}

.selectable-record:focus-visible {
  outline: 3px solid rgba(237, 110, 56, 0.24);
  outline-offset: 2px;
}

.record-detail-panel {
  height: 100%;
  min-height: 0;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.record-detail-header,
.record-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.record-detail-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--app-line);
}

.record-detail-header h2 {
  margin: 0;
  font-size: 18px;
}

.record-detail-title {
  justify-content: flex-start;
  padding: 18px 0;
}

.record-detail-title > div {
  min-width: 0;
}

.record-detail-title > div strong,
.record-detail-title > div span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-detail-title > div strong {
  font-size: 16px;
}

.record-detail-title > div span {
  margin-top: 3px;
  color: var(--app-muted);
  font-size: 11px;
}

.record-detail-title > b {
  margin-left: auto;
  white-space: nowrap;
  font-size: 17px;
}

.record-detail-grid,
.record-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--app-line);
  border-left: 1px solid var(--app-line);
}

.record-detail-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  background: #f7f8f9;
}

.record-detail-fact {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-right: 1px solid var(--app-line);
  border-bottom: 1px solid var(--app-line);
  padding: 10px;
}

.record-detail-fact span {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 700;
}

.record-detail-fact strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-detail-section {
  margin-top: 16px;
  border-top: 1px solid var(--app-line);
  padding-top: 14px;
}

.record-detail-section > span {
  display: block;
  margin-bottom: 9px;
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.record-detail-section > p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.garage-rail-card {
  position: relative;
  min-width: 0;
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
  gap: 12px;
  border: 1px solid var(--app-line);
  border-radius: 7px;
  padding: 12px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
}

.garage-rail-card:hover {
  border-color: #c8cbd0;
}

.garage-rail-card.is-active {
  border-color: var(--app-orange);
  box-shadow: inset 3px 0 0 var(--app-orange);
  background: #fffaf7;
}

.garage-rail-card:focus-visible {
  outline: 3px solid rgba(237, 110, 56, 0.24);
  outline-offset: 2px;
}

.garage-rail-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.garage-rail-copy .vehicle-identity {
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
}

.garage-rail-copy .brand-logo-shell {
  width: 38px;
  height: 38px;
}

.garage-rail-copy .vehicle-identity h3 {
  font-size: 14px;
}

.garage-rail-copy .engine-note {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage-rail-km {
  color: var(--app-muted);
  font-size: 10px;
  font-weight: 750;
}

.garage-rail-visual,
.garage-rail-visual .car-visual.card {
  min-width: 0;
  height: 100%;
  min-height: 78px;
}

.garage-rail-visual .car-visual.card {
  margin: 0;
  border: 0;
  border-radius: 5px;
  background: #f3f4f5;
}

.garage-rail-card .shared-vehicle-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  min-height: 20px;
  margin: 0;
  padding: 2px 6px;
  font-size: 9px;
}

.garage-page .car-photo {
  object-fit: contain;
  padding: 8px;
}

.garage-home-visual-wrap .car-photo {
  padding: 14px;
}

.trip-day-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: stretch;
  gap: 12px;
}

.trip-day-summary {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  border-left: 1px solid var(--app-line);
  padding-left: 16px;
}

.trip-day-summary span,
.trip-day-summary em {
  color: var(--app-muted);
  font-size: 10px;
  font-style: normal;
}

.trip-day-summary strong {
  font-size: 14px;
}

@media (min-width: 901px) {
  body.is-authenticated .garage-app-frame {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
  }

  body.is-authenticated .app-sidebar {
    position: relative;
    height: 100dvh;
  }

  body.is-authenticated .app-main {
    height: 100dvh;
    display: grid;
    grid-template-rows: 76px minmax(0, 1fr);
  }

  body.is-authenticated .app-topbar {
    position: relative;
    top: auto;
    height: 76px;
  }
}

@media (min-width: 901px) and (max-width: 1279px) {
  body.is-authenticated .garage-app-frame {
    grid-template-columns: 222px minmax(0, 1fr);
  }

  body.is-authenticated .app-content {
    height: 100%;
  }
}

@media (min-width: 1360px) and (min-height: 780px) {
  body.is-authenticated .app-content {
    height: 100%;
    padding: 18px;
    overflow: hidden;
  }

  body.is-authenticated .maintenance-workspace {
    height: 100%;
    min-height: 0;
    gap: 14px;
    overflow: hidden;
  }

  body.is-authenticated .garage-home-workspace {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 164px;
  }

  .garage-home-hero-card,
  .garage-home-hero-grid,
  .garage-home-spotlight,
  .garage-home-summary {
    height: 100%;
    min-height: 0;
  }

  .garage-home-hero-card {
    overflow: hidden;
  }

  .garage-home-hero-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.65fr);
    gap: 14px;
  }

  .garage-home-spotlight-copy {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(330px, 0.95fr) minmax(350px, 1.05fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px 20px;
    padding: 18px;
  }

  .garage-home-spotlight-head {
    grid-column: 1 / -1;
    margin: 0;
  }

  .garage-home-identity-row {
    min-height: 0;
    display: grid;
    grid-column: 1;
    grid-row: 2 / 5;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

  .garage-home-visual-wrap,
  .garage-home-visual-wrap .car-visual.hero,
  .car-visual.hero {
    min-height: 0;
    height: 100%;
  }

  .garage-home-inline-stats {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
  }

  .garage-inline-stat {
    min-height: 54px;
    padding: 9px 11px;
  }

  .garage-inline-stat:nth-child(2) {
    border-right: 0;
  }

  .garage-inline-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--app-line);
  }

  .garage-inline-stat strong {
    margin-top: 2px;
    font-size: 14px;
  }

  .garage-home-spotlight-copy > .vehicle-facts {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
  }

  .garage-home-spotlight-copy > .vehicle-facts > div {
    min-height: 42px;
    padding: 7px 9px;
  }

  .garage-home-timeline {
    min-height: 0;
    grid-column: 2;
    grid-row: 4;
    margin: 0;
    overflow: auto;
  }

  .garage-home-timeline-item {
    min-height: 46px;
    padding: 8px 10px;
  }

  .garage-home-timeline-value strong,
  .garage-home-timeline-value em {
    font-size: 11px;
  }

  .garage-home-summary {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 18px;
    overflow: hidden;
  }

  .garage-home-summary-head {
    margin-bottom: 12px;
  }

  .garage-home-summary .metric-card {
    min-height: 70px;
    padding: 11px;
  }

  .garage-home-summary .metric-value {
    margin-top: 5px;
    font-size: 15px;
  }

  .garage-home-activity {
    min-height: 0;
    margin-top: 14px;
    overflow: auto;
  }

  .garage-home-activity .activity-row {
    min-height: 40px;
    padding: 5px 0;
  }

  .garage-home-listing {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 13px 16px;
    overflow: hidden;
  }

  .garage-home-listing .panel-head {
    margin-bottom: 8px;
  }

  .garage-home-listing .panel-head h2 {
    font-size: 15px;
  }

  .garage-home-listing .garage-cards-grid {
    min-height: 0;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .garage-home-listing .garage-rail-card {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 104px;
    padding: 10px 12px;
  }

  body.is-authenticated .maintenance-workspace:not(.garage-home-workspace) {
    display: grid;
    grid-template-rows: 200px minmax(0, 1fr);
  }

  .module-overview-shell,
  .maintenance-overview-surface,
  .maintenance-overview-panel {
    height: 100%;
    min-height: 0;
  }

  .maintenance-overview-panel {
    display: grid;
    grid-template-columns: minmax(180px, 0.48fr) minmax(310px, 0.8fr) minmax(390px, 1.25fr);
    align-items: stretch;
    gap: 14px;
    border: 0;
    border-radius: 0;
    padding: 14px 16px;
    background: transparent;
  }

  .maintenance-overview-surface {
    border: 1px solid var(--app-line);
    border-radius: 8px;
    background: #ffffff;
  }

  .maintenance-overview-panel-head {
    min-width: 0;
    align-items: flex-start;
    align-content: center;
    margin: 0;
    border-right: 1px solid var(--app-line);
    padding-right: 14px;
  }

  .maintenance-overview-panel-head .vehicle-identity {
    min-width: 0;
  }

  .maintenance-overview-panel .maintenance-filter-row,
  .maintenance-overview-panel > .trip-range-group {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 8px;
    margin: 0;
    overflow: hidden;
    border-right: 1px solid var(--app-line);
    padding-right: 14px;
  }

  .maintenance-overview-panel .maintenance-search,
  .maintenance-overview-panel .maintenance-filter-group,
  .maintenance-overview-panel > .trip-range-group {
    min-height: 0;
    gap: 4px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .maintenance-overview-panel > .trip-range-group {
    padding-right: 14px;
  }

  .maintenance-overview-panel .maintenance-search input {
    height: 32px;
  }

  .maintenance-overview-panel .maintenance-chip-list {
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .maintenance-overview-panel .maintenance-chip-list::-webkit-scrollbar {
    display: none;
  }

  .maintenance-overview-panel .maintenance-chip-button {
    min-height: 28px;
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 10px;
  }

  .maintenance-overview-panel > .maintenance-chart-card {
    min-width: 0;
    align-self: stretch;
    gap: 4px;
    overflow: hidden;
  }

  .maintenance-overview-panel .maintenance-bar-chart {
    min-height: 0;
    height: 140px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }

  .maintenance-overview-panel .maintenance-bar-col {
    min-height: 118px;
    grid-template-rows: minmax(0, 1fr) 18px;
    gap: 4px;
  }

  .maintenance-overview-panel .maintenance-bar-track {
    width: 20px;
    height: 80px;
    border-radius: 4px 4px 0 0;
  }

  .maintenance-overview-panel .maintenance-bar-fill,
  .maintenance-overview-panel .maintenance-bar-fill.fuel,
  .maintenance-overview-panel .maintenance-bar-fill.trip {
    border-radius: inherit;
    background: var(--app-green);
  }

  .maintenance-overview-panel .maintenance-bar-fill.fuel {
    background: var(--app-blue);
  }

  .maintenance-overview-panel .maintenance-bar-fill.trip {
    background: var(--app-orange);
  }

  .maintenance-overview-panel .maintenance-bar-plot {
    padding: 4px 0 8px;
  }

  .maintenance-overview-panel .maintenance-bar-value,
  .maintenance-overview-panel .maintenance-bar-col strong {
    font-size: 10px;
  }

  .maintenance-layout-app {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.72fr);
    gap: 14px;
    align-items: stretch;
  }

  .maintenance-main,
  .maintenance-sidebar {
    height: 100%;
    min-height: 0;
  }

  .maintenance-sidebar {
    position: static;
    top: auto;
    overflow: hidden;
  }

  .maintenance-records-panel {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 16px;
    overflow: hidden;
  }

  .maintenance-records-panel .panel-head {
    margin-bottom: 10px;
  }

  .maintenance-records-panel .panel-head h2 {
    font-size: 16px;
  }

  .maintenance-records-panel > .record-list {
    min-height: 0;
    align-content: start;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1px 4px 1px 1px;
  }

  .maintenance-records-panel .record-card {
    padding: 12px 13px;
  }

  .maintenance-records-panel .record-entry-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .maintenance-records-panel .record-entry-copy h3 {
    font-size: 14px;
  }

  .maintenance-records-panel .record-inline-meta,
  .maintenance-records-panel .record-note {
    margin-top: 2px;
    font-size: 11px;
  }

  .maintenance-records-panel .record-value-main {
    font-size: 15px;
  }

  .maintenance-records-panel .repair-map,
  .maintenance-records-panel .attachment-strip,
  .maintenance-records-panel .fuel-bridge {
    display: none;
  }

  .trips-workspace .maintenance-layout-app {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .trips-workspace .maintenance-sidebar {
    display: grid;
    grid-template-rows: 184px minmax(0, 1fr);
    gap: 12px;
  }

  .trips-workspace .maintenance-vehicle-card {
    height: 184px;
    gap: 8px;
    padding: 10px;
    overflow: hidden;
  }

  .trips-workspace .maintenance-vehicle-card .car-visual,
  .trips-workspace .maintenance-vehicle-card .vehicle-facts {
    display: none;
  }

  .trips-workspace .maintenance-status-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--app-line);
    border-left: 1px solid var(--app-line);
  }

  .trips-workspace .maintenance-status-line {
    min-width: 0;
    min-height: 44px;
    display: grid;
    align-content: center;
    gap: 3px;
    border: 0;
    border-right: 1px solid var(--app-line);
    border-bottom: 1px solid var(--app-line);
    border-radius: 0;
    padding: 7px 8px;
    background: #f7f8f9;
  }

  .trips-workspace .maintenance-status-line span,
  .trips-workspace .maintenance-status-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trips-workspace .maintenance-status-line span {
    font-size: 9px;
  }

  .trips-workspace .maintenance-status-line strong {
    font-size: 11px;
  }

  .trips-workspace [data-trip-calendar-section],
  .trips-workspace .trip-calendar-panel {
    height: 100%;
    min-height: 0;
  }

  .trips-workspace .trip-calendar-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 10px 12px;
  }

  .trips-workspace .calendar-grid {
    min-height: 0;
    align-content: center;
    gap: 2px 0;
  }

  .trips-workspace .day-bubble {
    width: 22px;
    height: 22px;
  }

  .trips-workspace .day-bubble strong {
    font-size: 11px;
    line-height: 22px;
  }

  .trips-workspace .day-cell {
    min-height: 26px;
  }

  .trips-workspace .weekday {
    font-size: 9px;
  }

  .trip-day-panel {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
  }

  .trip-scroller-panel {
    padding: 10px;
  }

  .trip-scroller {
    min-width: 0;
    grid-auto-columns: minmax(165px, 210px);
  }

  .trip-scroller-card {
    min-height: 76px;
    border-radius: 6px;
    padding: 10px 12px;
  }

  .trip-detail {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 0 16px;
    padding: 16px;
    overflow: hidden;
  }

  .trip-detail > .panel-head {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 8px;
  }

  .trip-detail > .trip-detail-lines {
    grid-column: 1;
    grid-row: 2;
  }

  .trip-detail .trip-detail-line {
    min-height: 34px;
    padding-block: 7px;
  }

  .trip-detail > .trip-insight-grid {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }

  .trip-detail .trip-insight {
    min-height: 49px;
    padding: 8px;
  }

  .trip-detail > .trip-route-analysis {
    min-height: 0;
    grid-column: 1;
    grid-row: 4;
    margin-top: 10px;
    padding-top: 10px;
    overflow: auto;
  }

  .trip-detail .trip-route-analysis-row {
    min-height: 34px;
    padding: 7px 0;
  }

  .trip-detail > .route-panel {
    height: 100%;
    min-height: 0;
    grid-column: 2;
    grid-row: 1 / 5;
    margin: 0;
  }

  .trip-detail > .route-panel > div,
  .trip-detail .route-map,
  .trip-detail .route-map-canvas {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  body.is-authenticated .garage-app-frame,
  body.is-authenticated .app-main {
    height: 100dvh;
    min-height: 0;
  }

  body.is-authenticated .app-main {
    display: grid;
    grid-template-rows: 68px minmax(0, 1fr);
  }

  body.is-authenticated .app-topbar {
    position: relative;
    top: auto;
    height: 68px;
  }

  body.is-authenticated .app-content {
    height: 100%;
    overflow: auto;
  }

  .record-detail-panel {
    max-height: none;
  }
}

/* Garage content refresh — the navigation rail intentionally stays unchanged. */
body.is-authenticated .app-main {
  background:
    radial-gradient(circle at 74% -12%, rgba(237, 110, 56, 0.11), transparent 28%),
    #f7f5f2;
}

body.is-authenticated .app-topbar {
  min-height: 90px;
  border-bottom-color: rgba(42, 43, 47, 0.08);
  padding: 14px clamp(20px, 2.5vw, 38px);
  background: rgba(250, 249, 247, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-page-heading {
  display: grid;
  gap: 4px;
}

.app-page-heading strong {
  color: #202124;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.app-page-heading span {
  color: #85878d;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.app-topbar-actions {
  gap: 10px;
}

.report-download-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(237, 110, 56, 0.28);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff6f1;
  color: var(--app-orange-dark);
  box-shadow: 0 8px 24px rgba(41, 35, 31, 0.045);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.report-download-button:hover {
  border-color: var(--app-orange);
  background: #ffede3;
  transform: translateY(-1px);
}

.report-download-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.report-download-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-download-button i {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(207, 78, 29, 0.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: report-download-spin 700ms linear infinite;
}

.report-download-button.is-loading svg {
  display: none;
}

.report-download-button.is-loading i {
  display: block;
}

@keyframes report-download-spin {
  to { transform: rotate(360deg); }
}

.report-download-button.is-premium-locked {
  border-color: rgba(237, 110, 56, 0.32);
  background: linear-gradient(135deg, #fff8f4, #ffede3);
}

.report-download-button.is-premium-locked b {
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(237, 110, 56, 0.12);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.premium-lock-shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  isolation: isolate;
}

.premium-lock-content {
  filter: blur(7px);
  opacity: 0.48;
  pointer-events: none;
  user-select: none;
}

.premium-lock-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 247, 242, 0.72));
  text-align: center;
  backdrop-filter: blur(2px);
}

.premium-lock-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(237, 110, 56, 0.22);
  border-radius: 14px;
  background: #fff4ed;
  color: var(--app-orange-dark);
  box-shadow: 0 10px 26px rgba(207, 78, 29, 0.12);
}

.premium-lock-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-lock-overlay > strong {
  color: var(--app-ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.premium-lock-overlay > p {
  max-width: 390px;
  margin: 0;
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.5;
}

.premium-lock-overlay > button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 3px;
  border: 0;
  border-radius: 11px;
  padding: 0 14px;
  background: var(--app-orange);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(237, 110, 56, 0.2);
}

.premium-lock-shell.is-inline {
  min-width: 175px;
  height: 42px;
  border-radius: 10px;
}

.premium-lock-shell.is-inline .premium-lock-content {
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.premium-lock-shell.is-inline .premium-lock-overlay {
  flex-direction: row;
  justify-content: flex-start;
  gap: 7px;
  padding: 3px 6px;
  background: rgba(255, 248, 244, 0.68);
  text-align: left;
}

.premium-lock-shell.is-inline .premium-lock-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 9px;
}

.premium-lock-shell.is-inline .premium-lock-icon svg {
  width: 16px;
  height: 16px;
}

.premium-lock-shell.is-inline .premium-lock-overlay > strong,
.premium-lock-shell.is-inline .premium-lock-overlay > p {
  display: none;
}

.premium-lock-shell.is-inline .premium-lock-overlay > button {
  min-height: 31px;
  margin: 0;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 9px;
}

.premium-lock-shell.is-trip-detail {
  min-height: 600px;
  border: 1px solid rgba(237, 110, 56, 0.13);
  background: #fffaf7;
}

.trip-premium-detail-content {
  display: grid;
  gap: 16px;
}

.trip-ios-summary-grid.is-primary-only,
.trip-ios-summary-grid.is-premium-insights {
  grid-template-columns: minmax(0, 1fr);
}

.app-readonly-state {
  min-height: 30px;
  border: 1px solid rgba(64, 171, 140, 0.2);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(64, 171, 140, 0.08);
  color: #2f7e67;
}

.app-vehicle-select {
  min-width: 230px;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 1px;
  border: 1px solid rgba(38, 39, 42, 0.09);
  border-radius: 16px;
  padding: 6px 38px 6px 13px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(41, 35, 31, 0.055);
}

.app-vehicle-select > span {
  color: #a0a1a6;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.app-vehicle-select select {
  height: 27px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  outline: none;
}

.app-vehicle-select::after {
  top: 16px;
  right: 15px;
  color: #96989d;
}

.app-refresh-button {
  width: 44px;
  height: 44px;
  border-color: rgba(38, 39, 42, 0.09);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(41, 35, 31, 0.05);
}

.app-refresh-button:hover {
  border-color: rgba(237, 110, 56, 0.35);
  background: #fff7f2;
}

body.is-authenticated .app-content {
  width: min(100%, 1620px);
  height: 100%;
  padding: clamp(20px, 2.5vw, 38px);
  padding-bottom: 54px;
  overflow: auto;
  scrollbar-gutter: stable;
}

body.is-authenticated .maintenance-workspace {
  height: auto;
  gap: 22px;
  overflow: visible;
}

body.is-authenticated .garage-home-v2 {
  display: grid;
  grid-template-rows: none;
}

/* My Cars */
.garage-home-v2 {
  --garage-card-border: rgba(42, 43, 47, 0.075);
  --garage-card-shadow: 0 18px 50px rgba(57, 47, 39, 0.075), 0 2px 7px rgba(57, 47, 39, 0.035);
}

.garage-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.65fr);
  gap: 20px;
}

.garage-focus-card,
.garage-health-card,
.garage-kpi-card,
.garage-home-v2 .garage-home-listing,
.garage-activity-panel,
.module-hero,
.module-analytics-card,
.maintenance-workspace .maintenance-records-panel,
.maintenance-workspace .record-detail-panel,
.maintenance-workspace .maintenance-side-panel,
.trips-workspace .trip-calendar-panel,
.trips-workspace .trip-day-panel,
.trips-workspace .trip-detail,
.trips-workspace .trip-scroller-panel {
  border: 1px solid var(--garage-card-border, rgba(42, 43, 47, 0.075));
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--garage-card-shadow, 0 18px 50px rgba(57, 47, 39, 0.07));
}

.garage-focus-card {
  position: relative;
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(270px, 0.82fr) minmax(360px, 1.18fr);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.99) 0 48%, rgba(255, 248, 243, 0.96) 100%);
}

.garage-focus-card::before {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: rgba(237, 110, 56, 0.07);
  pointer-events: none;
}

.garage-focus-copy {
  position: relative;
  z-index: 10;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(24px, 3vw, 42px) 28px;
}

.garage-focus-label-row,
.garage-health-head,
.garage-listing-head,
.garage-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.garage-focus-label-row {
  justify-content: flex-start;
  margin-bottom: 25px;
}

.garage-section-label,
.module-hero-kicker {
  color: #a34d28;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.garage-soft-status,
.garage-readonly-pill,
.garage-count-badge,
.garage-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.garage-soft-status {
  padding: 6px 9px;
  background: #edf8f0;
  color: #278552;
}

.garage-soft-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #33a166;
  box-shadow: 0 0 0 4px rgba(51, 161, 102, 0.1);
}

.garage-soft-status.is-warning {
  background: rgba(247, 186, 64, 0.13);
  color: #a36a00;
}

.garage-soft-status.is-warning i {
  background: #f7ba40;
  box-shadow: 0 0 0 4px rgba(247, 186, 64, 0.14);
}

.garage-soft-status.is-danger {
  background: rgba(230, 71, 74, 0.1);
  color: #c53d41;
}

.garage-soft-status.is-danger i {
  background: #e6474a;
  box-shadow: 0 0 0 4px rgba(230, 71, 74, 0.12);
}

.garage-focus-card .vehicle-identity {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  flex-wrap: nowrap;
  gap: 12px;
}

.garage-focus-card .brand-logo-shell {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.garage-focus-card .brand-logo {
  width: 68px;
  height: 68px;
}

.garage-focus-card .vehicle-identity .eyebrow {
  margin-bottom: 2px;
  color: var(--app-orange);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.garage-focus-card .vehicle-identity h3 {
  font-size: clamp(25px, 2.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.garage-focus-card .engine-note {
  margin-top: 5px;
  color: #8d8e93;
  font-size: 12px;
}

.garage-focus-note {
  max-width: 440px;
  margin: 20px 0 25px;
  color: #77797f;
  font-size: 13px;
  line-height: 1.6;
}

.garage-focus-primary-stat {
  display: grid;
  grid-template-rows: 14px 42px;
  align-items: end;
  gap: 3px;
}

.garage-focus-primary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 3vw, 46px);
}

.garage-focus-consumption-stat {
  position: relative;
  padding-left: clamp(24px, 3vw, 46px);
}

.garage-focus-primary-stat > span {
  align-self: start;
  color: #999ba0;
  font-size: 10px;
  font-weight: 750;
  line-height: 14px;
}

.garage-focus-primary-stat strong {
  align-self: end;
  color: #292a2e;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.garage-focus-consumption-stat strong.consumption-ready {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #3d85db;
  font-size: clamp(19px, 1.75vw, 26px);
}

.garage-focus-consumption-heading {
  position: relative;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.garage-focus-consumption-heading > span {
  color: #999ba0;
  font-size: 10px;
  font-weight: 750;
  line-height: 14px;
}

.garage-focus-consumption-stat strong.consumption-ready small {
  color: #3d85db;
  font-size: 0.43em;
  font-weight: 750;
  letter-spacing: 0;
}

.consumption-collecting {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}

.garage-focus-primary-stat .consumption-collecting-pending > strong {
  color: #35aa85 !important;
  font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: -0.02em;
}

.consumption-calculating {
  display: grid;
  min-height: 30px;
  place-items: center;
}

.consumption-calculating > i {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(53, 170, 133, 0.24);
  border-top-color: #35aa85;
  border-radius: 50%;
  animation: consumption-calculating-spin 0.75s linear infinite;
}

@keyframes consumption-calculating-spin {
  to { transform: rotate(360deg); }
}

.consumption-info-button {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(61, 133, 219, 0.35);
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: #3d85db;
  font: 800 11px/1 Arial, sans-serif;
  cursor: pointer;
}

.consumption-info-button:hover,
.consumption-info-button[aria-expanded="true"] {
  border-color: #3d85db;
  background: #edf6ff;
}

.consumption-progress-popover {
  position: absolute;
  z-index: 1000;
  bottom: calc(100% + 10px);
  left: 0;
  width: min(270px, 48vw);
  border: 1px solid rgba(61, 133, 219, 0.28);
  border-radius: 16px;
  padding: 10px 11px;
  background: #fbf8f2;
  box-shadow: 0 12px 26px rgba(30, 39, 47, 0.15);
}

.consumption-progress-popover p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  color: #5a5a5a;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.consumption-progress-intro-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #3d85db;
  color: #fff;
  font: 800 10px/1 Arial, sans-serif;
}

.consumption-progress-popover ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.consumption-progress-popover li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  color: #555;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.consumption-progress-popover li span {
  min-width: 0;
}

.consumption-progress-popover li b {
  font-weight: 800;
  white-space: nowrap;
}

.consumption-progress-popover li b.is-pending { color: #e05e5e; }
.consumption-progress-popover li b.is-progressing { color: #d89728; }
.consumption-progress-popover li b.is-complete { color: #35aa85; }

.consumption-progress-popover li .consumption-progress-check {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #35aa85;
  color: transparent;
  font-size: 0;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
}

.consumption-progress-popover li .consumption-progress-check::after {
  content: "✓";
  color: #fff;
  font-size: 8px;
  line-height: 1;
  transform: translateY(-0.35px);
}

.garage-focus-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #8a8c91;
  font-size: 10px;
  font-weight: 700;
}

.garage-focus-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c6c7ca;
}

.garage-tech-specs-button { position:absolute; z-index:12; top:26px; right:28px; width:max-content; display:inline-flex; align-items:center; gap:7px; border:0; padding:0; background:transparent; color:#3d85db; font-size:11px; font-weight:800; cursor:pointer; }
.garage-tech-specs-button > span { font-size: 18px; line-height: 0; }.garage-tech-specs-button > i { font-size: 14px; font-style: normal; }
.technical-specs-modal { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: center; padding: 28px; }.technical-specs-backdrop { position: absolute; inset: 0; border: 0; background: rgba(24,27,31,.42); }
.technical-specs-sheet { position: relative; z-index: 1; width: min(760px,100%); max-height: min(780px,calc(100vh - 56px)); overflow: auto; border-radius: 24px; padding: 26px; background: #fff; box-shadow: 0 28px 70px rgba(16,21,28,.26); }
.technical-specs-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }.technical-specs-head>div { display:grid; gap:4px; }.technical-specs-head .vehicle-identity { margin:0; }.technical-specs-head>div>span { padding-left:52px; color:#83858a; font-size:11px; font-weight:800; letter-spacing:.05em; }.technical-specs-head>button { width:32px; height:32px; border:0; border-radius:50%; background:#f2f3f4; color:#55585e; font-size:22px; line-height:1; cursor:pointer; }
.technical-specs-hero { margin-top:24px; border-radius:18px; padding:18px; background:linear-gradient(135deg,#eef6ff,#f7fbff); }.technical-specs-hero>p { margin:0 0 13px; color:#3d85db; font-size:10px; font-weight:850; letter-spacing:.1em; }.technical-specs-hero>div { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; }.technical-specs-hero article { min-width:0; padding:11px; border-radius:12px; background:rgba(255,255,255,.78); }.technical-specs-hero span,.technical-specs-groups section>div span { display:block; color:#86888d; font-size:10px; font-weight:700; }.technical-specs-hero strong { display:block; margin-top:5px; color:#2c2e33; font-size:15px; white-space:nowrap; }
.technical-specs-hero article.is-positive strong,.technical-specs-groups section>div.is-positive strong { color:#27975d; }.technical-specs-hero article.is-negative strong,.technical-specs-groups section>div.is-negative strong { color:#d5484c; }.technical-specs-hero article.is-changed strong,.technical-specs-groups section>div.is-changed strong { color:#3d85db; }
.technical-specs-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }.technical-specs-groups section { overflow:hidden; border:1px solid rgba(42,43,47,.08); border-radius:14px; }.technical-specs-groups h3 { margin:0; padding:12px 14px; background:#fafafa; color:#33353a; font-size:12px; }.technical-specs-groups section>div { display:flex; justify-content:space-between; gap:12px; padding:9px 14px; border-top:1px solid rgba(42,43,47,.06); }.technical-specs-groups section>div strong { color:#43454a; font-size:11px; text-align:right; }.technical-specs-note { margin:16px 2px 0; color:#929499; font-size:10px; line-height:1.45; }
.technical-specs-empty { padding:74px 25px; text-align:center; }.technical-specs-empty>span { color:#3d85db; font-size:34px; }.technical-specs-empty h2 { margin:10px 0 6px; color:#34363b; font-size:19px; }.technical-specs-empty p { max-width:360px; margin:0 auto; color:#85878c; font-size:12px; line-height:1.5; }
@media (max-width:600px) { .technical-specs-modal { padding:14px; align-items:end; }.technical-specs-sheet { max-height:calc(100vh - 28px); border-radius:22px; padding:20px; }.technical-specs-hero>div,.technical-specs-groups { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.garage-focus-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 36px 34px 68px;
}

.garage-focus-orbit {
  position: absolute;
  inset: 13% 8% 11%;
  border: 1px solid rgba(237, 110, 56, 0.16);
  border-radius: 50%;
  transform: rotate(-7deg);
}

.garage-focus-orbit::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px dashed rgba(237, 110, 56, 0.11);
  border-radius: 50%;
}

.garage-focus-visual .car-visual.hero,
.module-hero-visual .car-visual.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 230px;
  border: 0;
  background: transparent;
}

.garage-focus-visual .car-photo,
.module-hero-visual .car-photo {
  padding: 12px;
  filter: drop-shadow(0 25px 20px rgba(40, 33, 27, 0.16));
}

.garage-plate {
  position: absolute;
  z-index: 4;
  right: 30px;
  bottom: 24px;
  border: 1px solid rgba(32, 33, 36, 0.11);
  border-left: 9px solid #3a77be;
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #25262a;
  box-shadow: 0 10px 24px rgba(34, 30, 26, 0.09);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.garage-health-card {
  min-width: 0;
  padding: clamp(22px, 2.4vw, 32px);
}

.garage-health-head {
  margin-bottom: 24px;
}

.garage-health-head h2,
.garage-listing-head h2,
.garage-activity-head h2,
.module-analytics-card h2 {
  margin: 5px 0 0;
  color: #292a2d;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.garage-health-dot {
  width: 12px;
  height: 12px;
  border: 3px solid #dff3ec;
  border-radius: 50%;
  background: #33a166;
  box-shadow: 0 0 0 5px rgba(51, 161, 102, 0.08);
}

.garage-health-dot.is-warning {
  border-color: #fde8b5;
  background: #f7ba40;
  box-shadow: 0 0 0 5px rgba(247, 186, 64, 0.1);
}

.garage-health-dot.is-danger {
  border-color: #f7c9ca;
  background: #e6474a;
  box-shadow: 0 0 0 5px rgba(230, 71, 74, 0.1);
}

.garage-health-carousel {
  position: relative;
}

.garage-health-progress-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
}

.garage-health-progress-list::-webkit-scrollbar {
  display: none;
}

.garage-health-progress-list.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.garage-health-carousel-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(42, 43, 47, 0.11);
  border-radius: 50%;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  color: #6a6c71;
  box-shadow: 0 4px 10px rgba(42, 43, 47, 0.1);
  font: 700 20px/1 Arial, sans-serif;
  cursor: pointer;
}

.garage-health-carousel-arrow:hover {
  border-color: rgba(61, 133, 219, 0.45);
  color: #3d85db;
}

.garage-health-carousel-arrow.is-previous { left: -18px; }
.garage-health-carousel-arrow.is-next { right: -18px; }

.garage-service-progress {
  --service-accent: #33a166;
  --service-soft: rgba(51, 161, 102, 0.13);
  border-radius: 18px;
  min-width: 100%;
  padding: 13px 15px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: linear-gradient(145deg, color-mix(in srgb, var(--service-soft) 72%, #fff), #fff);
}

.garage-service-progress.is-warning {
  --service-accent: #d39113;
  --service-soft: rgba(247, 186, 64, 0.18);
}

.garage-service-progress.is-danger {
  --service-accent: #d84246;
  --service-soft: rgba(230, 71, 74, 0.14);
}

.garage-service-progress-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 4px 12px;
}

.garage-service-progress-copy span {
  grid-column: 1 / -1;
  color: #73757a;
  font-size: 10px;
  font-weight: 750;
}

.garage-service-progress-copy strong {
  color: var(--service-accent);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.garage-service-progress-copy em {
  color: var(--service-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.garage-progress-track {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--service-soft);
}

.garage-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--service-accent);
}

.garage-status-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.garage-status-list .garage-home-timeline-item {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(42, 43, 47, 0.07);
  padding: 11px 2px;
  background: transparent;
}

.garage-status-list .garage-home-timeline-item:last-child {
  border-bottom: 0;
}

.garage-home-timeline-label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #696b71;
  font-size: 11px;
  font-weight: 750;
}

.garage-home-timeline-label > i {
  width: 9px;
  height: 9px;
  border: 2px solid #f5c4ae;
  border-radius: 50%;
  background: #ed6e38;
  box-shadow: 0 0 0 4px #fff3ed;
}

.garage-home-timeline-item.fuel .garage-home-timeline-label > i {
  border-color: #bdd8f8;
  background: #3d85db;
  box-shadow: 0 0 0 4px #eef6ff;
}

.garage-home-timeline-item.trip .garage-home-timeline-label > i {
  border-color: #bfe6da;
  background: #40ab8c;
  box-shadow: 0 0 0 4px #edf8f4;
}

.garage-home-timeline-value {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.garage-home-timeline-value strong {
  color: #2f3034;
  font-size: 11px;
}

.garage-home-timeline-value em {
  color: #a0a1a5;
  font-size: 9px;
  font-style: normal;
}

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

.garage-kpi-card {
  min-width: 0;
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  box-shadow: 0 12px 34px rgba(57, 47, 39, 0.045);
}

.garage-kpi-marker {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff0e9;
}

.garage-kpi-marker i {
  width: 13px;
  height: 13px;
  border: 4px solid #ed6e38;
  border-radius: 50%;
}

.garage-kpi-blue .garage-kpi-marker {
  background: #eaf3ff;
}

.garage-kpi-blue .garage-kpi-marker i {
  border-color: #3d85db;
}

.garage-kpi-green .garage-kpi-marker {
  background: #eaf7f3;
}

.garage-kpi-green .garage-kpi-marker i {
  border-color: #40ab8c;
}

.garage-kpi-slate .garage-kpi-marker {
  background: #eff0f2;
}

.garage-kpi-slate .garage-kpi-marker i {
  border-color: #777b83;
}

.garage-kpi-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.garage-kpi-copy > span,
.garage-kpi-copy > em {
  overflow: hidden;
  color: #909297;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage-kpi-copy strong {
  overflow: hidden;
  color: #2b2c30;
  font-size: clamp(20px, 1.8vw, 28px);
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage-home-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.7fr);
  gap: 20px;
  align-items: start;
}

.report-workspace {
  display: grid;
  gap: 20px;
}

.report-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-panel-head h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 22px;
}

.report-status-open { color: #d27a27; }
.report-status-resolved { color: var(--app-green); }

.report-schema-panel {
  padding: 26px;
}

.report-schema-content {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(260px, 0.65fr);
  align-items: stretch;
  gap: 24px;
  margin-top: 18px;
}

.report-schema-note {
  color: var(--app-muted);
  font-size: 11px;
}

.report-schema-layout {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 0;
  padding: 0;
  background: transparent;
}

.report-schema-figure {
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 0;
  background: transparent;
}

.report-schema-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.report-schema-zone {
  position: absolute;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  opacity: 0.82;
  transform: translate(-50%, -50%);
  transform-origin: center;
  -webkit-mask-image: var(--part-mask);
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: var(--part-mask);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  pointer-events: none;
}

.report-schema-zone em {
  display: none;
}

.report-schema-original { color: #8d9298; }
.report-schema-local { color: #efa85d; }
.report-schema-paint { color: #4d91de; }
.report-schema-replaced { color: #e36560; }
.report-schema-damage { color: var(--app-orange); }

.report-schema-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
}

.report-schema-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.report-schema-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.report-legend-original { background: #d7d9dc; }
.report-legend-local { background: #df8e31; }
.report-legend-paint { background: #3d85db; }
.report-legend-replaced { background: #e05b58; }
.report-legend-damage { background: var(--app-orange); }

.report-inspection-summary {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: 18px;
  background: var(--app-panel);
}

.report-inspection-summary h3 {
  margin: 8px 0 18px;
  color: var(--app-ink);
  font-size: 22px;
}

.report-inspection-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border-bottom: 1px solid var(--app-line);
  color: var(--app-muted);
  font-size: 12px;
}

.report-inspection-stat span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.report-inspection-stat i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.report-inspection-stat strong {
  color: var(--app-ink);
  font-size: 15px;
}

.report-tramer-total {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--app-orange-soft);
}

.report-tramer-total span {
  color: var(--app-orange-dark);
  font-size: 11px;
  font-weight: 750;
}

.report-tramer-total strong {
  color: var(--app-ink);
  font-size: 23px;
}

.report-records-panel {
  padding: 26px;
}

.report-records-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.report-records-head h2 {
  margin: 0;
  color: var(--app-ink);
  font-size: 22px;
}

.report-section-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #f2f3f4;
}

.report-section-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.report-section-tab em {
  min-width: 21px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(108, 112, 119, 0.1);
  font-size: 9px;
  font-style: normal;
  text-align: center;
}

.report-section-tab.is-active {
  background: var(--app-panel);
  color: var(--app-orange-dark);
  box-shadow: 0 2px 8px rgba(36, 38, 41, 0.08);
}

.report-record-list {
  display: grid;
  margin-top: 22px;
}

.report-record-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 13px 0;
  border-bottom: 1px solid var(--app-line);
}

.report-record-row:last-child {
  border-bottom: 0;
}

.report-record-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--app-orange-soft);
  color: var(--app-orange-dark);
  font-size: 15px;
  font-weight: 900;
}

.report-record-icon svg {
  width: 20px;
  height: 20px;
}

.report-record-fault .report-record-icon {
  background: rgba(224, 91, 88, 0.11);
  color: #d64c49;
}

.report-record-damage .report-record-icon {
  background: rgba(224, 162, 47, 0.13);
  color: #c78718;
}

.report-record-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.report-record-copy > strong {
  overflow: hidden;
  color: var(--app-ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-record-copy > span {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-record-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.report-record-parts i {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f3f4f5;
  color: var(--app-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.report-record-parts .report-part-local { color: #33836d; background: rgba(74, 168, 139, 0.12); }
.report-record-parts .report-part-paint { color: #a66e12; background: rgba(224, 162, 47, 0.13); }
.report-record-parts .report-part-replaced { color: #c64643; background: rgba(224, 91, 88, 0.11); }

.report-record-meta {
  min-width: 108px;
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.report-record-meta > strong {
  color: var(--app-ink);
  font-size: 13px;
}

.report-record-meta em {
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.report-severity-low { color: var(--app-blue) !important; }
.report-severity-medium { color: #c78718 !important; }
.report-severity-high,
.report-severity-critical { color: #d64c49 !important; }

@media (max-width: 700px) {
  .report-schema-layout,
  .report-schema-content {
    grid-template-columns: 1fr;
  }

  .report-schema-panel,
  .report-records-panel {
    padding: 20px;
  }

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

  .report-section-tabs {
    width: 100%;
  }

  .report-section-tab {
    flex: 1 1 0;
    justify-content: center;
    padding-inline: 7px;
  }

  .report-record-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .report-record-meta {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

.garage-home-v2 .garage-home-listing,
.garage-activity-panel {
  padding: clamp(20px, 2.5vw, 30px);
}

.garage-home-v2 .garage-home-listing {
  min-width: 0;
  overflow: hidden;
}

.garage-listing-head,
.garage-activity-head {
  margin-bottom: 20px;
}

.garage-count-badge,
.garage-readonly-pill {
  padding: 7px 10px;
  background: #f2f3f4;
  color: #777a80;
}

.garage-home-v2 .garage-cards-grid {
  min-width: 0;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(310px, 48%, 420px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(237, 110, 56, 0.42) transparent;
  padding: 2px 2px 10px;
}

.garage-home-v2 .garage-cards-grid::-webkit-scrollbar {
  height: 7px;
}

.garage-home-v2 .garage-cards-grid::-webkit-scrollbar-track {
  background: transparent;
}

.garage-home-v2 .garage-cards-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(237, 110, 56, 0.42);
}

.garage-home-v2 .garage-rail-card {
  scroll-snap-align: start;
  min-height: 334px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 24px 152px auto auto;
  align-items: stretch;
  gap: 10px;
  border-color: rgba(42, 43, 47, 0.08);
  border-radius: 20px;
  padding: 15px;
  background: #fbfbfb;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.garage-home-v2 .garage-rail-card:hover {
  border-color: rgba(237, 110, 56, 0.28);
  box-shadow: 0 14px 30px rgba(48, 40, 34, 0.08);
  transform: translateY(-2px);
}

.garage-home-v2 .garage-rail-card.is-active {
  border-color: rgba(237, 110, 56, 0.5);
  background: #fffaf7;
  box-shadow: inset 0 0 0 1px rgba(237, 110, 56, 0.08);
}

.garage-rail-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.garage-active-badge {
  padding: 5px 8px;
  background: #feece3;
  color: #bd5225;
}

.garage-home-v2 .garage-rail-card .shared-vehicle-badge {
  position: static;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
}

.garage-home-v2 .garage-rail-visual,
.garage-home-v2 .garage-rail-visual .car-visual.card {
  width: 100%;
  height: 152px;
  min-height: 0;
}

.garage-home-v2 .garage-rail-visual .car-visual.card {
  border: 0;
  border-radius: 15px;
  background: transparent;
}

.garage-home-v2 .garage-rail-visual .car-photo {
  padding: 0;
  transform: scale(1.14);
  filter: drop-shadow(0 12px 10px rgba(33, 31, 29, 0.1));
}

.garage-home-v2 .garage-rail-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.garage-home-v2 .garage-rail-copy .vehicle-identity {
  grid-template-columns: 38px minmax(0, 1fr);
}

.garage-home-v2 .garage-rail-copy .brand-logo-shell {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.garage-home-v2 .garage-rail-copy .vehicle-identity h3 {
  font-size: 15px;
}

.garage-rail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.garage-rail-stats > span {
  min-width: 0;
  display: grid;
  gap: 3px;
  border-radius: 11px;
  padding: 9px;
  background: #ffffff;
}

.garage-rail-stats small,
.garage-rail-stats strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage-rail-stats small {
  color: #9a9ca1;
  font-size: 8px;
  font-weight: 750;
}

.garage-rail-stats strong {
  color: #44464b;
  font-size: 9px;
}

.garage-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(42, 43, 47, 0.07);
  padding-top: 10px;
  color: #b84e22;
  font-size: 10px;
  font-weight: 800;
}

.garage-card-action i {
  font-size: 15px;
  font-style: normal;
}

.garage-activity-panel {
  min-width: 0;
}

.garage-activity-panel .garage-home-activity {
  margin-top: 0;
}

.garage-activity-panel .activity-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 9px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-bottom-color: rgba(42, 43, 47, 0.07);
  padding: 12px 0;
}

.garage-activity-panel .activity-row:last-child {
  border-bottom: 0;
}

.garage-activity-panel .activity-copy strong,
.garage-activity-panel .activity-meta strong {
  font-size: 11px;
}

.garage-activity-panel .activity-copy span,
.garage-activity-panel .activity-meta span {
  color: #999ba0;
  font-size: 9px;
}

.garage-activity-panel .activity-copy .activity-plate {
  color: #707278;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Shared module experience */
.module-hero {
  --module-accent: #ed6e38;
  --module-ink: #7d3518;
  --module-soft: #fff0e8;
  position: relative;
  min-height: 270px;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(300px, 0.72fr);
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.99), var(--module-soft));
}

.module-hero-fuel {
  --module-accent: #3d85db;
  --module-ink: #235b9e;
  --module-soft: #eaf3ff;
}

.module-hero-trips {
  --module-accent: #40ab8c;
  --module-ink: #29765f;
  --module-soft: #eaf7f3;
}

.module-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
}

.module-hero-kicker {
  display: block;
  margin-bottom: 16px;
  color: var(--module-ink);
}

.module-hero-copy .vehicle-identity {
  margin-bottom: 20px;
}

.module-hero-copy .vehicle-identity .eyebrow {
  color: var(--module-accent);
}

.module-hero-copy .brand-logo-shell {
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(38, 34, 30, 0.08);
}

.module-hero h1 {
  max-width: 620px;
  margin: 0;
  color: #28292d;
  font-size: clamp(24px, 2.25vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.module-hero-copy > p {
  max-width: 650px;
  margin: 12px 0 22px;
  color: #75777c;
  font-size: 12px;
  line-height: 1.55;
}

.module-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.module-hero-stat {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(12px);
}

.module-hero-stat > span,
.module-hero-stat > em {
  overflow: hidden;
  color: #8e9095;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-hero-stat strong {
  overflow: hidden;
  color: #303136;
  font-size: clamp(17px, 1.4vw, 21px);
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-hero-stat.is-success {
  border-color: rgba(64, 171, 140, 0.28);
  background: rgba(228, 244, 239, 0.84);
}

.module-hero-stat.is-success strong {
  color: #277f66;
}

.module-hero-stat.is-warning {
  border-color: rgba(214, 150, 34, 0.3);
  background: rgba(255, 244, 211, 0.86);
}

.module-hero-stat.is-warning strong {
  color: #a86a00;
}

.module-hero-stat.is-danger {
  border-color: rgba(211, 83, 72, 0.3);
  background: rgba(255, 235, 233, 0.88);
}

.module-hero-stat.is-danger strong {
  color: #c54b42;
}

.module-hero-visual {
  position: relative;
  min-height: 270px;
  display: grid;
  place-items: center;
  padding: 34px 30px 54px;
}

.module-hero-halo {
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid color-mix(in srgb, var(--module-accent) 22%, transparent);
  border-radius: 50%;
}

.module-hero-halo::before,
.module-hero-halo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.module-hero-halo::before {
  inset: 18%;
  border: 1px dashed color-mix(in srgb, var(--module-accent) 20%, transparent);
}

.module-hero-halo::after {
  inset: 35%;
  background: color-mix(in srgb, var(--module-accent) 9%, transparent);
}

.module-overview-shell {
  min-width: 0;
}

.module-analytics-card {
  overflow: hidden;
}

.module-analytics-card .maintenance-overview-panel {
  padding: clamp(20px, 2.5vw, 30px);
}

.module-analytics-card .maintenance-overview-panel-head {
  margin-bottom: 18px;
}

.module-analytics-card .maintenance-filter-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  align-content: center;
  gap: 12px;
  margin-bottom: 18px;
  border-radius: 17px;
  padding: 14px;
  background: #f8f7f5;
}

.module-analytics-card .maintenance-search,
.module-analytics-card .maintenance-filter-group {
  width: 100%;
  min-width: 0;
}

.module-analytics-card .maintenance-chip-list {
  flex-wrap: wrap;
}

.fuel-workspace .module-analytics-card .maintenance-filter-row,
.trips-workspace .module-analytics-card .maintenance-filter-row {
  grid-template-columns: 1fr;
}

.maintenance-search input {
  height: 42px;
  border-color: rgba(42, 43, 47, 0.09);
  border-radius: 12px;
  padding-inline: 13px;
  background: #ffffff;
}

.maintenance-search input:focus {
  border-color: rgba(237, 110, 56, 0.55);
  box-shadow: 0 0 0 3px rgba(237, 110, 56, 0.1);
  outline: none;
}

.maintenance-chip-list {
  gap: 5px;
}

.maintenance-chip-button,
.segmented-button {
  min-height: 34px;
  border-color: rgba(42, 43, 47, 0.09);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  cursor: pointer;
}

.maintenance-chip-button:hover,
.segmented-button:hover {
  border-color: rgba(237, 110, 56, 0.3);
}

.maintenance-chip-button.is-active,
.segmented-button.is-active {
  border-color: rgba(237, 110, 56, 0.22);
  background: #feece3;
  color: #b84e22;
  box-shadow: inset 0 0 0 1px rgba(237, 110, 56, 0.04);
}

.fuel-workspace .maintenance-chip-button.is-active {
  border-color: rgba(61, 133, 219, 0.22);
  background: #eaf3ff;
  color: #2f6fb9;
}

.trips-workspace .maintenance-chip-button.is-active {
  border-color: rgba(64, 171, 140, 0.22);
  background: #eaf7f3;
  color: #28765e;
}

.maintenance-chart-card {
  border: 0;
  border-radius: 18px;
  padding: 16px 16px 10px;
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}

.maintenance-bar-axis span,
.maintenance-bar-col strong,
.maintenance-bar-value {
  color: #9a9ca1;
  font-size: 9px;
}

.maintenance-bar-track {
  border-bottom-color: rgba(42, 43, 47, 0.08);
}

.maintenance-bar-fill {
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #ff9b70, #ed6e38);
}

.maintenance-bar-fill.fuel {
  background: linear-gradient(180deg, #82b7f2, #3d85db);
}

.maintenance-bar-fill.trip {
  background: linear-gradient(180deg, #76ceb3, #40ab8c);
}

.maintenance-layout-app {
  height: auto;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 20px;
}

.maintenance-workspace .maintenance-main,
.maintenance-workspace .maintenance-sidebar,
.maintenance-workspace .record-detail-panel {
  min-width: 0;
  max-width: 100%;
}

.maintenance-workspace .maintenance-records-panel,
.maintenance-workspace .maintenance-side-panel,
.maintenance-workspace .record-detail-panel {
  height: auto;
  padding: 22px;
  overflow: visible;
}

.maintenance-workspace .maintenance-records-panel {
  display: block;
}

.maintenance-workspace .maintenance-records-panel > .record-list {
  max-height: 720px;
  overflow: auto;
  padding: 2px 4px 2px 2px;
}

.maintenance-sidebar {
  top: 24px;
  gap: 18px;
}

.maintenance-workspace .panel-head {
  margin-bottom: 16px;
}

.maintenance-workspace .record-list {
  gap: 9px;
}

.maintenance-workspace .record-card {
  border-color: rgba(42, 43, 47, 0.075);
  border-radius: 17px;
  padding: 15px;
  background: #fbfbfb;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.maintenance-workspace .record-card:hover {
  border-color: rgba(237, 110, 56, 0.25);
  background: #ffffff;
  transform: translateY(-1px);
}

.maintenance-workspace .selectable-record.is-active {
  border-color: rgba(237, 110, 56, 0.38);
  background: #fff7f2;
}

.fuel-workspace .selectable-record.is-active {
  border-color: rgba(61, 133, 219, 0.34);
  background: #f2f7ff;
}

.maintenance-workspace .selectable-record::before {
  top: 15px;
  bottom: 15px;
  left: 0;
  width: 3px;
  border-radius: 0 5px 5px 0;
}

.maintenance-workspace .record-entry-icon {
  border-radius: 13px;
}

.maintenance-workspace .record-entry-copy h3 {
  font-size: 14px;
}

.maintenance-workspace .record-value-main {
  font-size: 16px;
}

.maintenance-workspace .maintenance-record-detail .record-detail-title > b,
.maintenance-workspace .fuel-record-detail .record-detail-title > b {
  color: var(--mw-success);
}

.maintenance-workspace .record-detail-header {
  border-bottom-color: rgba(42, 43, 47, 0.08);
}

.maintenance-workspace .record-detail-grid,
.maintenance-workspace .record-detail-metrics {
  gap: 8px;
  border: 0;
  background: transparent;
}

.maintenance-workspace .record-detail-fact {
  border: 0;
  border-radius: 12px;
  background: #f7f7f7;
}

.maintenance-workspace .record-detail-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.maintenance-workspace .record-detail-section {
  border-top-color: rgba(42, 43, 47, 0.08);
}

.trips-workspace .maintenance-layout-app {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.trips-workspace .maintenance-sidebar {
  height: auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 18px;
  overflow: visible;
}

.trips-workspace .maintenance-vehicle-card {
  height: auto;
  padding: 20px;
  overflow: hidden;
}

.trips-workspace .maintenance-vehicle-card .car-visual.card {
  min-height: 145px;
  border: 0;
  border-radius: 16px;
  background: #f6f7f7;
}

.trips-workspace .trip-calendar-panel {
  height: auto;
  padding: 18px;
}

.trips-workspace .trip-day-list-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--garage-card-border, rgba(42, 43, 47, 0.075));
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--garage-card-shadow, 0 18px 50px rgba(57, 47, 39, 0.07));
}

.trip-day-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #8a8c91;
  font-size: 11px;
  font-weight: 750;
}

.trip-day-list-head strong {
  color: var(--app-ink);
  font-size: 13px;
}

.trip-day-list-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: #8b8d92;
  font-size: 13px;
  font-weight: 750;
}

.trip-day-list-summary .trip-day-total-distance {
  color: var(--app-orange);
  font-size: 15px;
  font-weight: 850;
}

.trip-day-list-summary .trip-day-total-cost {
  color: var(--app-green);
  font-size: 15px;
}

.trip-day-list-summary i {
  color: #a5a7ac;
  font-style: normal;
}

.trip-day-list {
  display: grid;
  gap: 10px;
}

@media (min-width: 901px) {
  .trips-workspace .trip-day-list-panel {
    height: 585px;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .trips-workspace .trip-day-list-panel.is-single-trip {
    height: auto;
    grid-template-rows: auto;
  }

  .trips-workspace .trip-day-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    scrollbar-gutter: stable;
  }

  .trips-workspace .trip-day-list-panel.is-single-trip .trip-day-list {
    overflow: visible;
    padding-right: 0;
    scrollbar-gutter: auto;
  }
}

.trip-day-list-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  border: 1px solid rgba(42, 43, 47, 0.075);
  border-radius: 17px;
  padding: 13px;
  background: #ffffff;
  color: var(--app-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.trip-day-list-card:hover,
.trip-day-list-card.is-active {
  border-color: rgba(237, 110, 56, 0.42);
  background: #fffaf7;
}

.trip-day-list-card:hover {
  transform: translateY(-1px);
}

.trip-day-list-time {
  min-width: 0;
  color: var(--app-blue);
  font-size: 12px;
  font-weight: 800;
}

.trip-day-list-time i {
  color: #9b9da2;
  font-style: normal;
}

.trip-day-list-card > strong {
  color: var(--app-orange);
  font-size: 17px;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.trip-endpoint-map {
  position: relative;
  grid-column: 1 / -1;
  height: 142px;
  overflow: hidden;
  border-radius: 13px;
  background: #edf0eb;
}

.trip-endpoint-map .route-map-canvas {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: hidden;
}

.trip-endpoint-map .gm-style,
.trip-endpoint-map .gm-style > div {
  border-radius: inherit;
}

.trip-endpoint-map-loading {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background: linear-gradient(135deg, #eef1ee, #e3e8e1);
}

.trip-endpoint-map-loading[hidden] {
  display: none;
}

.trips-workspace .day-cell {
  border-radius: 9px;
}

.trips-workspace .day-cell.is-selected {
  box-shadow: 0 0 0 3px rgba(64, 171, 140, 0.14);
}

.trips-workspace .trip-day-panel {
  height: auto;
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.trips-workspace .trip-scroller-panel,
.trips-workspace .trip-detail {
  height: auto;
  padding: 20px;
}

.trips-workspace .trip-scroller-card {
  border-color: rgba(42, 43, 47, 0.075);
  border-radius: 15px;
  background: #fbfbfb;
}

.trips-workspace .trip-detail {
  min-height: 500px;
}

.trips-workspace .route-panel {
  overflow: hidden;
  border-radius: 18px;
}

.trips-workspace .route-map,
.trips-workspace .route-map-canvas {
  border-radius: 18px;
}

@media (min-width: 901px) {
  body.is-authenticated .app-main {
    grid-template-rows: 90px minmax(0, 1fr);
  }

  body.is-authenticated .app-topbar {
    height: 90px;
  }
}

@media (max-width: 1280px) {
  .garage-overview-grid,
  .garage-home-lower-grid {
    grid-template-columns: 1fr;
  }

  .garage-health-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.65fr) minmax(0, 1.35fr);
    gap: 16px 24px;
  }

  .garage-health-head {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .garage-status-list {
    margin-top: 0;
  }

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

  .module-analytics-card .maintenance-filter-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .garage-focus-card {
    grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  }

  .module-hero {
    grid-template-columns: minmax(330px, 1fr) minmax(260px, 0.62fr);
  }

  .maintenance-layout-app,
  .trips-workspace .maintenance-layout-app {
    grid-template-columns: minmax(0, 1.15fr) minmax(285px, 0.85fr);
  }
}

@media (max-width: 900px) {
  body.is-authenticated .app-main {
    grid-template-rows: 78px minmax(0, 1fr);
  }

  body.is-authenticated .app-topbar {
    height: 78px;
    min-height: 78px;
    padding: 10px 16px;
  }

  .app-page-heading span {
    display: none;
  }

  .app-page-heading strong {
    max-width: 180px;
    font-size: 20px;
  }

  .app-readonly-state {
    display: none;
  }

  .app-vehicle-select {
    width: min(230px, 35vw);
    min-width: 150px;
    min-height: 48px;
    border-radius: 14px;
  }

  .app-vehicle-select::after {
    top: 13px;
  }

  .report-download-button {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
  }

  .report-download-button span {
    display: none;
  }

  body.is-authenticated .app-content {
    padding: 20px;
    padding-bottom: 104px;
  }

  .app-mobile-nav {
    right: 16px;
    bottom: 14px;
    left: 16px;
    border-color: rgba(42, 43, 47, 0.1);
    border-radius: 24px;
    padding: 7px;
    box-shadow: 0 18px 50px rgba(35, 32, 29, 0.15);
  }

  .app-mobile-nav .app-nav-button {
    border-radius: 18px;
  }

  .garage-focus-card,
  .module-hero {
    grid-template-columns: 1fr;
  }

  .garage-focus-visual,
  .module-hero-visual {
    min-height: 250px;
  }

  .garage-health-card {
    display: block;
  }

  .garage-health-head {
    margin-bottom: 20px;
  }

  .garage-status-list {
    margin-top: 18px;
  }

  .module-hero-visual {
    grid-row: 1;
  }

  .module-hero-copy {
    padding-top: 6px;
  }

  .maintenance-layout-app,
  .trips-workspace .maintenance-layout-app {
    grid-template-columns: 1fr;
  }

  .maintenance-sidebar {
    position: static;
  }

  .maintenance-workspace .maintenance-records-panel > .record-list {
    max-height: none;
  }

  .trips-workspace .trip-detail {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  body.is-authenticated .app-content {
    padding: 14px;
    padding-bottom: 98px;
  }

  .app-page-heading strong {
    max-width: 110px;
    font-size: 17px;
  }

  .app-vehicle-select {
    width: 142px;
    min-width: 0;
  }

  .app-vehicle-select > span {
    display: none;
  }

  .app-vehicle-select select {
    height: 34px;
    font-size: 10px;
  }

  .garage-overview-grid,
  .garage-home-lower-grid,
  .maintenance-workspace {
    gap: 14px;
  }

  .garage-focus-card,
  .garage-health-card,
  .garage-kpi-card,
  .garage-home-v2 .garage-home-listing,
  .garage-activity-panel,
  .module-hero,
  .module-analytics-card,
  .maintenance-workspace .maintenance-records-panel,
  .maintenance-workspace .record-detail-panel,
  .maintenance-workspace .maintenance-side-panel,
  .trips-workspace .trip-calendar-panel,
  .trips-workspace .trip-detail,
  .trips-workspace .trip-scroller-panel {
    border-radius: 20px;
  }

  .garage-focus-copy {
    padding: 22px;
  }

  .garage-focus-visual {
    grid-row: 1;
    min-height: 235px;
    padding: 26px 20px 54px;
  }

  .garage-focus-card .vehicle-identity h3 {
    font-size: 25px;
  }

  .garage-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .garage-kpi-card {
    min-height: 108px;
    gap: 9px;
    padding: 13px;
  }

  .garage-kpi-marker {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .garage-kpi-copy strong {
    font-size: 14px;
  }

  .garage-home-v2 .garage-cards-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 86%);
  }

  .module-hero-visual {
    min-height: 220px;
    padding: 22px 20px 42px;
  }

  .module-hero-copy {
    padding: 5px 20px 22px;
  }

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

  .module-hero-stat {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .module-hero-stat em {
    grid-column: 1 / -1;
  }

  .module-analytics-card .maintenance-overview-panel,
  .maintenance-workspace .maintenance-records-panel,
  .maintenance-workspace .maintenance-side-panel,
  .maintenance-workspace .record-detail-panel,
  .trips-workspace .trip-calendar-panel,
  .trips-workspace .trip-detail,
  .trips-workspace .trip-scroller-panel {
    padding: 16px;
  }

  .module-analytics-card .maintenance-filter-row {
    margin-inline: -4px;
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .garage-focus-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .garage-focus-card .vehicle-identity {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .garage-focus-card .brand-logo-shell {
    width: 48px;
    height: 48px;
  }

  .garage-kpi-grid {
    grid-template-columns: 1fr;
  }

  .garage-kpi-card {
    min-height: 90px;
  }

  .garage-status-list .garage-home-timeline-item {
    align-items: flex-start;
  }

  .garage-home-timeline-value {
    max-width: 46%;
  }
}

/* Resolve legacy authenticated-shell spacing and fixed-row collisions. */
body.is-authenticated .dashboard-shell {
  padding: 0;
}

body.is-authenticated .maintenance-workspace:not(.garage-home-workspace) {
  grid-template-rows: auto;
}

/* Yakıt karşılaştırması, ait olduğu iki dolum kaydının arasında görünür. */
body.is-authenticated .fuel-workspace .maintenance-records-panel .fuel-bridge {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 4px 16px;
}

.fuel-workspace .fuel-bridge-line {
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: rgba(61, 133, 219, 0.22);
}

.fuel-workspace .fuel-bridge-pill {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  width: min(100%, 620px);
  gap: 0;
  padding: 9px 12px;
  border: 1px solid rgba(61, 133, 219, 0.14);
  border-radius: 14px;
  background: #eef6ff;
  color: #3d85db;
  box-shadow: 0 8px 20px rgba(61, 133, 219, 0.06);
}

.fuel-workspace .fuel-bridge-pill > span {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
  padding: 0 10px;
  border-right: 1px solid rgba(61, 133, 219, 0.14);
  color: #3d85db;
  text-align: center;
}

.fuel-workspace .fuel-bridge-pill > span:last-child {
  border-right: 0;
}

.fuel-workspace .fuel-bridge-pill small {
  color: #788494;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.fuel-workspace .fuel-bridge-pill strong {
  overflow: hidden;
  color: #3078c9;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-workspace .fuel-record-detail .record-detail-grid > .record-detail-fact:last-child {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  body.is-authenticated .fuel-workspace .maintenance-records-panel .fuel-bridge {
    padding-inline: 4px;
  }

  .fuel-workspace .fuel-bridge-pill {
    padding: 8px 6px;
  }

  .fuel-workspace .fuel-bridge-pill > span {
    padding-inline: 5px;
  }

  .fuel-workspace .fuel-bridge-pill small {
    font-size: 7px;
  }

  .fuel-workspace .fuel-bridge-pill strong {
    font-size: 10px;
  }
}

/* iOS yolculuk detayı hiyerarşisi ve Google Maps görünümü. */
body.is-authenticated .trips-workspace .trip-detail.trip-detail-ios {
  display: block;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #f7f6f4;
}

.trip-detail-ios .trip-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 22px;
  border-bottom: 1px solid rgba(42, 43, 47, 0.075);
  background: rgba(255, 255, 255, 0.98);
}

.trip-detail-ios .trip-detail-head .eyebrow {
  margin: 0 0 5px;
  color: var(--app-orange-dark);
}

.trip-detail-ios .trip-detail-title {
  margin: 0;
  font-size: 20px;
}

.trip-detail-ios .trip-detail-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--app-orange-soft);
  color: var(--app-orange);
}

.trip-detail-date {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(42, 43, 47, 0.08);
  border-radius: 12px;
  background: #f7f7f7;
  color: #6f7278;
  font-size: 11px;
  font-weight: 800;
}

.trip-detail-content {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.trip-detail-ios .trip-google-map-panel {
  position: relative;
  margin: 0;
  border: 1px solid rgba(42, 43, 47, 0.08);
  border-radius: 20px;
  background: #e9ecef;
  box-shadow: 0 12px 30px rgba(40, 46, 55, 0.08);
}

.trip-detail-ios .route-map,
.trip-detail-ios .route-map-canvas {
  width: 100%;
  min-height: 410px;
  border-radius: 20px;
}

.trip-detail-ios .route-map {
  aspect-ratio: auto;
  border: 0;
  background: #e9ecef;
}

.trip-detail-ios .route-map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.trip-detail-ios .route-map-canvas .gm-style,
.trip-detail-ios .route-map-canvas > div {
  border-radius: inherit;
}

.route-map-loading {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f1f3f5, #e5e8eb);
  color: #696d73;
  font-size: 12px;
  pointer-events: none;
}

.route-map-loading > span {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(61, 133, 219, 0.18);
  border-top-color: var(--app-blue);
  border-radius: 999px;
  animation: trip-map-spin 0.8s linear infinite;
}

@keyframes trip-map-spin {
  to { transform: rotate(360deg); }
}

.route-google-link {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 56px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(42, 43, 47, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 7px rgba(30, 35, 43, 0.15);
  color: #34373b;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.route-google-link:hover {
  color: var(--app-blue);
}

.google-map-error {
  width: 100%;
  height: 100%;
  min-height: 410px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 24px;
  background: #f2f3f5;
  color: #7a7d82;
  text-align: center;
}

.google-map-error strong {
  color: #33363a;
  font-size: 14px;
}

.trip-detail-ios .route-legend {
  z-index: 5;
  bottom: 13px;
  border-color: rgba(42, 43, 47, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: #36383c;
  box-shadow: 0 8px 22px rgba(30, 35, 43, 0.12);
}

.trip-detail-ios .route-endpoint-icon {
  z-index: 4;
}

.trip-detail-ios .route-endpoint-label {
  color: #24262a;
  font-size: 11px;
  text-shadow: 0 1px 3px #ffffff, 0 0 6px #ffffff;
}

.trip-detail-ios .route-endpoint-dot {
  width: 20px;
  height: 20px;
  margin: 0;
  border: 3px solid #ffffff;
  box-sizing: border-box;
  background: var(--route-point);
  box-shadow: 0 3px 10px rgba(24, 28, 34, 0.28);
}

.trip-ios-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 15px;
}

.trip-ios-summary-grid > :only-child {
  grid-column: 1 / -1;
}

.trip-ios-card,
.trip-detail-ios .trip-route-analysis {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(42, 43, 47, 0.075);
  border-radius: 18px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(57, 47, 39, 0.055);
}

.trip-ios-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(42, 43, 47, 0.08);
}

.trip-ios-row:last-child {
  border-bottom: 0;
}

.trip-ios-row-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3f4f5;
  color: #292b2f;
}

.trip-ios-row-icon svg {
  width: 17px;
  height: 17px;
}

.trip-ios-row-label {
  color: #35373b;
  font-size: 12px;
  font-weight: 700;
}

.trip-ios-row-value {
  color: #292b2f;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.trip-ios-row-value.is-primary {
  color: var(--app-orange);
}

.trip-ios-row-value.is-blue {
  color: var(--app-blue);
}

.trip-ios-row-value.is-green {
  color: var(--app-green);
}

.trip-ios-row-value.is-muted {
  color: #777a80;
  font-weight: 750;
}

.trip-detail-ios .trip-route-analysis {
  border-top: 1px solid rgba(42, 43, 47, 0.075);
  padding: 18px;
}

.trip-detail-ios .trip-route-analysis h4 {
  margin: 0 0 11px;
  font-size: 15px;
}

.trip-detail-ios .trip-route-analysis-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}

.trip-detail-ios .trip-route-analysis-row {
  min-height: 42px;
  padding: 9px 0;
}

.trip-address-card {
  padding-block: 2px;
}

.trip-address-card-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(42, 43, 47, 0.08);
}

.trip-address-card-row:last-child {
  border-bottom: 0;
}

.trip-address-marker {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(24, 28, 34, 0.2);
}

.trip-address-marker.is-start {
  --trip-address-marker-color: #32c77a;
}

.trip-address-marker.is-end {
  --trip-address-marker-color: #ff4d57;
}

.trip-address-marker i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--trip-address-marker-color);
}

.trip-address-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.trip-address-copy > span {
  color: #8a8d92;
  font-size: 10px;
  font-weight: 750;
}

.trip-address-copy strong {
  overflow: hidden;
  color: #2b2d31;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-odometer-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}

.trip-odometer-card .trip-ios-row {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .trip-ios-summary-grid,
  .trip-odometer-card {
    grid-template-columns: 1fr;
  }

  .trip-odometer-card .trip-ios-row + .trip-ios-row {
    border-top: 1px solid rgba(42, 43, 47, 0.08);
  }
}

@media (max-width: 560px) {
  .trip-detail-ios .trip-detail-head {
    align-items: flex-start;
    padding: 17px 16px;
  }

  .trip-detail-date {
    padding: 7px 9px;
    font-size: 9px;
  }

  .trip-detail-content {
    gap: 11px;
    padding: 11px;
  }

  .trip-detail-ios .route-map,
  .trip-detail-ios .route-map-canvas,
  .google-map-error {
    min-height: 310px;
  }

  .route-google-link {
    top: 10px;
    left: 52px;
    min-height: 34px;
    padding-inline: 9px;
    font-size: 8px;
  }

  .trip-ios-card,
  .trip-detail-ios .trip-route-analysis {
    border-radius: 15px;
    padding-inline: 13px;
  }

  .trip-ios-row {
    grid-template-columns: 27px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .trip-ios-row-icon {
    width: 25px;
    height: 25px;
  }

  .trip-ios-row-label {
    font-size: 10px;
  }

  .trip-ios-row-value {
    max-width: 152px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
  }

  .trip-detail-ios .trip-route-analysis-list {
    grid-template-columns: 1fr;
  }

  .trip-address-copy strong {
    white-space: normal;
  }
}

/* Yolculuk detayındaki iOS uyumlu, etkileşimli rota analiz kartları. */
.trip-detail-ios .trip-route-analysis {
  display: grid;
  gap: 16px;
  border-top: 0;
  padding: 20px;
}

.trip-route-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.trip-route-section-head .eyebrow,
.trip-profile-head .eyebrow,
.trip-used-roads-head .eyebrow {
  margin: 0 0 4px;
  color: var(--app-orange-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trip-detail-ios .trip-route-section-head h4 {
  margin: 0;
  color: #292b2f;
  font-size: 18px;
  line-height: 1.2;
}

.trip-route-section-head > span {
  max-width: 260px;
  color: #8a8d92;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.trip-route-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trip-route-card-grid > :nth-child(3):last-child {
  grid-column: 1 / -1;
}

.trip-route-card {
  width: 100%;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  border: 1px solid rgba(42, 43, 47, 0.09);
  border-radius: 16px;
  padding: 15px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(45, 42, 38, 0.035);
  color: #2b2d31;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.trip-route-card.has-chart {
  cursor: pointer;
}

.trip-route-card.has-chart:hover {
  transform: translateY(-1px);
  border-color: rgba(61, 133, 219, 0.28);
  box-shadow: 0 12px 27px rgba(52, 63, 78, 0.085);
}

.trip-route-card.is-active {
  border-color: rgba(61, 133, 219, 0.62);
  background: linear-gradient(145deg, #ffffff 35%, #f3f8ff 100%);
  box-shadow: 0 0 0 3px rgba(61, 133, 219, 0.08), 0 13px 29px rgba(54, 84, 121, 0.1);
}

.trip-route-card:focus-visible,
.trip-profile-actions button:focus-visible {
  outline: 3px solid rgba(61, 133, 219, 0.25);
  outline-offset: 2px;
}

.trip-route-card:disabled {
  opacity: 1;
}

.trip-route-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.trip-route-card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #f3f4f5;
  color: #303237;
}

.trip-route-card.is-active .trip-route-card-icon {
  background: rgba(61, 133, 219, 0.12);
  color: var(--app-blue);
}

.trip-route-card-icon svg {
  width: 19px;
  height: 19px;
}

.trip-route-card-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.trip-route-card-title strong {
  overflow: hidden;
  color: #292b2f;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-route-card-title small {
  color: #92959a;
  font-size: 9px;
  font-weight: 750;
}

.trip-route-card-chart-badge {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(61, 133, 219, 0.1);
  color: var(--app-blue);
  font-size: 9px;
  font-weight: 850;
}

.trip-route-card-chart-badge svg {
  width: 13px;
  height: 13px;
}

.trip-route-card-chevron {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f2f3;
  color: #72767c;
  font-size: 16px;
  font-weight: 600;
}

.trip-route-card.is-active .trip-route-card-chevron {
  background: var(--app-blue);
  color: #ffffff;
}

.trip-route-card-values {
  display: grid;
}

.trip-route-card-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  border-top: 1px solid rgba(42, 43, 47, 0.075);
  padding: 7px 0;
  color: #81848a;
  font-size: 10px;
  font-weight: 650;
}

.trip-route-card-row strong {
  flex: 0 0 auto;
  color: var(--app-orange);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.trip-profile-panel {
  display: grid;
  gap: 15px;
  overflow: hidden;
  border: 1px solid rgba(61, 133, 219, 0.2);
  border-radius: 17px;
  padding: 17px;
  background: linear-gradient(155deg, #ffffff 30%, #f7faff 100%);
  box-shadow: 0 12px 28px rgba(51, 75, 105, 0.075);
  animation: trip-profile-reveal 210ms ease-out both;
}

@keyframes trip-profile-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.trip-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trip-profile-head h5,
.trip-used-roads-head h5 {
  margin: 0;
  color: #292b2f;
  font-size: 15px;
  font-weight: 900;
}

.trip-profile-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.trip-profile-segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(55px, 1fr));
  gap: 3px;
  border-radius: 10px;
  padding: 3px;
  background: #eceff2;
}

.trip-profile-segmented button {
  min-height: 29px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  background: transparent;
  color: #85888e;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.trip-profile-segmented button.is-active {
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(40, 45, 52, 0.11);
  color: #303237;
}

.trip-profile-close {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #eef0f2;
  color: #686c72;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.trip-profile-chart-wrap {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(42, 43, 47, 0.06);
  border-radius: 13px;
  padding: 8px 8px 1px;
  background: rgba(255, 255, 255, 0.78);
}

.trip-profile-chart {
  width: 100%;
  height: auto;
  min-height: 205px;
  display: block;
}

.trip-profile-grid line {
  stroke: #dde2e7;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.trip-profile-grid text,
.trip-profile-xlabels text,
.trip-profile-unit {
  fill: #8b8f95;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}

.trip-profile-area {
  pointer-events: none;
}

.trip-profile-line-underlay {
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trip-profile-segments line {
  stroke-width: 3.6;
  stroke-linecap: round;
}

.trip-profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.trip-profile-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.8);
}

.trip-profile-metric span {
  color: #8b8f95;
  font-size: 9px;
  font-weight: 750;
}

.trip-profile-metric strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--trip-profile-metric-color, var(--app-orange));
}

.trip-profile-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #74787e;
  font-size: 9px;
  font-weight: 750;
}

.trip-profile-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trip-profile-legend i,
.trip-distribution-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.trip-profile-legend i.is-green { background: #31ae7c; }
.trip-profile-legend i.is-red { background: #ef535d; }

.trip-profile-legend strong {
  margin-left: auto;
  color: #34373b;
}

.trip-distribution-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: #81848a;
  font-size: 10px;
  font-weight: 750;
}

.trip-distribution-total strong {
  color: #2c2f33;
  font-size: 15px;
  font-weight: 900;
}

.trip-distribution-stack {
  height: 16px;
  display: flex;
  gap: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f2;
}

.trip-distribution-stack i {
  min-width: 5px;
  border-radius: 999px;
}

.trip-distribution-bars {
  display: grid;
  gap: 10px;
}

.trip-distribution-row {
  display: grid;
  grid-template-columns: 8px minmax(105px, 0.7fr) minmax(90px, 1.3fr) 48px 65px;
  align-items: center;
  gap: 9px;
  color: #777b81;
  font-size: 10px;
}

.trip-distribution-row > strong {
  overflow: hidden;
  color: #383b3f;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-distribution-row > div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebee;
}

.trip-distribution-row > div i {
  height: 100%;
  display: block;
  border-radius: inherit;
}

.trip-distribution-row em,
.trip-distribution-row b {
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.trip-distribution-row b {
  color: #34373b;
}

.trip-used-roads {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(42, 43, 47, 0.075);
  border-radius: 16px;
  padding: 15px;
  background: #ffffff;
}

.trip-used-roads-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trip-used-roads-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}

.trip-used-roads-list > div {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(42, 43, 47, 0.075);
  padding: 8px 0;
  color: #777b81;
  font-size: 10px;
  font-weight: 700;
}

.trip-used-roads-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-used-roads-list strong {
  flex: 0 0 auto;
  color: #34373b;
  font-size: 11px;
  font-weight: 900;
}

.trip-used-roads-list strong em {
  margin-left: 9px;
  color: var(--app-green);
  font-style: normal;
}

.trip-used-roads-list strong.is-check {
  color: var(--app-green);
  font-size: 16px;
}

@media (max-width: 760px) {
  .trip-route-card-grid,
  .trip-used-roads-list {
    grid-template-columns: 1fr;
  }

  .trip-route-card-grid > :nth-child(3):last-child {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .trip-detail-ios .trip-route-analysis {
    gap: 12px;
    padding: 15px 13px;
  }

  .trip-route-section-head {
    align-items: flex-start;
  }

  .trip-route-section-head > span {
    display: none;
  }

  .trip-route-card {
    border-radius: 14px;
    padding: 12px;
  }

  .trip-route-card-head {
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .trip-route-card-icon {
    width: 32px;
    height: 32px;
  }

  .trip-route-card-chart-badge > span {
    display: none;
  }

  .trip-profile-panel {
    border-radius: 14px;
    padding: 13px;
  }

  .trip-profile-head {
    align-items: flex-start;
  }

  .trip-profile-segmented {
    grid-template-columns: repeat(2, minmax(43px, 1fr));
  }

  .trip-profile-segmented button {
    padding-inline: 7px;
  }

  .trip-profile-chart {
    min-height: 165px;
  }

  .trip-profile-metrics {
    gap: 5px;
  }

  .trip-profile-metric {
    padding: 9px 8px;
  }

  .trip-profile-metric strong {
    font-size: 10px;
  }

  .trip-distribution-row {
    grid-template-columns: 8px minmax(78px, 0.8fr) minmax(55px, 1fr) 38px 52px;
    gap: 6px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trip-profile-panel {
    animation: none;
  }

  .trip-route-card {
    transition: none;
  }
}

/* Harita ana sütunda kalır; seçili analiz sağdaki özet alanını devralır. */
.trip-map-analysis-stage {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  scroll-margin-top: 96px;
}

.trip-analysis-sidebar {
  min-width: 0;
  scroll-margin-top: 98px;
}

.trip-analysis-sidebar .trip-profile-panel {
  width: 100%;
  min-width: 0;
  min-height: 0;
  align-content: start;
  padding: 20px;
  background: linear-gradient(155deg, #ffffff 28%, #f5f9ff 100%);
}

.trip-analysis-sidebar .trip-profile-chart {
  min-height: 220px;
}

.trip-analysis-sidebar .trip-profile-metrics {
  gap: 7px;
}

.trip-analysis-sidebar .trip-profile-metric {
  padding: 11px 9px;
}

.trip-profile-chart {
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
}

.trip-profile-selection line {
  stroke: rgba(42, 43, 47, 0.26);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.trip-profile-selection circle {
  stroke: #ffffff;
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(25, 30, 38, 0.24));
}

.trip-profile-selection[hidden],
.trip-speed-limit-selection[hidden],
.trip-profile-tooltip[hidden],
.route-scrub-marker[hidden] {
  display: none !important;
}

.trip-speed-limit-boundary {
  stroke: rgba(237, 110, 56, 0.9);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  pointer-events: none;
}

.trip-speed-limit-sign {
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(35, 38, 43, 0.16));
}

.trip-speed-limit-sign circle {
  fill: rgba(255, 255, 255, 0.98);
  stroke: #ff3b30;
  stroke-width: 4.5;
}

.trip-speed-limit-sign text {
  fill: #2b2d31;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
}

.trip-profile-panel.is-speed:has(.trip-profile-segmented button:last-child.is-active) .trip-profile-tooltip {
  top: 48px;
}

.trip-profile-tooltip {
  position: absolute;
  z-index: 4;
  top: 11px;
  max-width: calc(100% - 18px);
  transform: translateX(-50%);
  border: 1px solid rgba(42, 43, 47, 0.1);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(36, 38, 42, 0.92);
  box-shadow: 0 7px 18px rgba(25, 28, 33, 0.18);
  color: #ffffff;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  pointer-events: none;
  white-space: nowrap;
}

.trip-profile-chart-wrap {
  position: relative;
}

.route-scrub-marker {
  z-index: 8;
  display: grid;
  justify-items: center;
  gap: 3px;
  filter: drop-shadow(0 5px 8px rgba(26, 30, 37, 0.25));
}

.route-scrub-marker-label {
  position: relative;
  border-radius: 7px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.96);
  color: #292b2f;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.route-scrub-marker-label::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border: 4px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.96);
  content: "";
  transform: translateX(-50%);
}

.route-scrub-marker-dot {
  width: 20px;
  height: 20px;
  border: 3px solid #ffffff;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--route-scrub-color, var(--app-orange));
  box-shadow: 0 3px 10px rgba(24, 28, 34, 0.28);
}

.trip-detail-ios .route-legend.is-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 11px;
}

.trip-detail-ios .route-legend.is-swatches > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-style: normal;
  white-space: nowrap;
}

.trip-detail-ios .route-legend.is-swatches i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.trip-detail-ios .route-legend-bar.is-grade {
  background: linear-gradient(90deg, #00b8c7 0%, #9499a3 50%, #ff3840 100%);
}

.trip-detail-ios .route-legend-bar.is-grade i {
  opacity: 0;
}

@media (max-width: 560px) {
  .trip-analysis-sidebar .trip-profile-panel {
    padding: 15px;
  }

  .trip-analysis-sidebar .trip-profile-chart {
    min-height: 180px;
  }

  .trip-profile-tooltip {
    font-size: 8px;
  }
}

/* Shared three-state appearance control */
.app-theme-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--app-ink);
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.app-theme-toggle:hover {
  color: var(--app-orange-dark);
  transform: translateY(-1px);
}

.app-theme-toggle:focus-visible {
  outline: 2px solid var(--app-orange);
  outline-offset: 2px;
}

.app-theme-toggle .theme-toggle-icon {
  position: relative;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
}

.app-theme-toggle .theme-icon {
  grid-area: 1 / 1;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.72) rotate(-12deg);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-theme-toggle .theme-icon-light {
  opacity: 1;
  transform: scale(1) rotate(0);
}

:root[data-theme-resolved="dark"] .app-theme-toggle .theme-icon-light {
  opacity: 0;
  transform: scale(0.72) rotate(12deg);
}

:root[data-theme-resolved="dark"] .app-theme-toggle .theme-icon-dark {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.app-theme-toggle .theme-auto-mark {
  position: absolute;
  right: -7px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  display: none;
  place-items: center;
  border: 2px solid var(--app-panel);
  border-radius: 50%;
  background: var(--app-orange);
  color: #ffffff;
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.2);
}

:root[data-theme="system"] .app-theme-toggle .theme-auto-mark {
  display: grid;
}

.app-theme-toggle .theme-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-sidebar-preferences {
  display: grid;
  gap: 3px;
  margin-top: auto;
  border-top: 1px solid #3b3d41;
  padding: 14px 6px 0;
}

.app-sidebar-preferences-label {
  padding: 0 6px 5px;
  color: #74777d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-sidebar-preference-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px;
  color: var(--app-sidebar-muted);
  font-size: 11px;
  font-weight: 700;
}

.app-sidebar .app-theme-toggle {
  width: 32px;
  height: 32px;
  color: #e2e4e8;
}

.app-sidebar .app-theme-toggle:hover {
  color: #ff9163;
}

.app-sidebar .app-theme-toggle .theme-toggle-icon,
.app-sidebar .app-theme-toggle .theme-icon {
  width: 19px;
  height: 19px;
}

.app-sidebar .app-theme-toggle .theme-auto-mark {
  right: -6px;
  bottom: -5px;
  border-color: var(--app-sidebar);
}

.app-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #65686e;
  font-size: 10px;
  font-weight: 850;
}

.app-language-switcher a {
  padding: 4px 2px;
  color: #95989e;
  text-decoration: none;
  transition: color 150ms ease;
}

.app-language-switcher a:hover,
.app-language-switcher a.is-active {
  color: #ff9163;
}

.app-cookie-preferences {
  border: 0;
  padding: 4px 2px;
  background: transparent;
  color: #95989e;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: color 150ms ease;
}

.app-cookie-preferences:hover {
  color: #ff9163;
}

.app-cookie-preferences:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--app-orange);
  outline-offset: 2px;
}

.app-sidebar-preferences + .app-account {
  margin-top: 8px;
  border-top: 0;
  padding-top: 8px;
}

/* Garage dark appearance */
:root[data-theme-resolved="dark"] {
  --app-orange-dark: #ff8a58;
  --app-orange-soft: #47291e;
  --app-green-soft: #173d34;
  --app-blue-soft: #1c314b;
  --app-ink: #f3f4f6;
  --app-muted: #a7aab1;
  --app-bg: #17181d;
  --app-panel: #23242a;
  --app-line: #3a3c43;
  --app-sidebar: #111216;
  --app-sidebar-muted: #aeb1b7;
}

:root[data-theme-resolved="dark"] body.garage-page {
  --garage-bg: var(--app-bg);
  --mw-text: var(--app-ink);
  --mw-muted: var(--app-muted);
  --mw-panel: var(--app-panel);
  --mw-panel-border: var(--app-line);
  --mw-panel-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  --mw-soft: rgba(255, 255, 255, 0.055);
  --mw-soft-2: rgba(255, 255, 255, 0.045);
  --mw-soft-border: rgba(255, 255, 255, 0.08);
  --mw-input-bg: #292a30;
  --mw-input-border: #46484f;
  --mw-chip-bg: #2d2e34;
  --mw-chip-border: #44464d;
  --mw-card-bg: #28292f;
  --mw-record-bg: #28292f;
  --mw-record-border: #3b3d44;
  --mw-meta-bg: #202126;
  --mw-meta-border: #383a41;
  --mw-accent: #ff8a58;
  --mw-success: #47c8a2;
  --mw-chart-text: #c4c7cd;
  background: var(--app-bg);
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .auth-shell,
:root[data-theme-resolved="dark"] .auth-panel,
:root[data-theme-resolved="dark"] .dashboard-shell,
:root[data-theme-resolved="dark"] .garage-app-frame,
:root[data-theme-resolved="dark"] .app-main {
  background: var(--app-bg);
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .auth-panel {
  background: var(--app-panel);
}

:root[data-theme-resolved="dark"] .auth-form label,
:root[data-theme-resolved="dark"] .auth-social-button,
:root[data-theme-resolved="dark"] .auth-app-link,
:root[data-theme-resolved="dark"] .auth-legal a {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .auth-form label > input,
:root[data-theme-resolved="dark"] .password-field,
:root[data-theme-resolved="dark"] .auth-social-button,
:root[data-theme-resolved="dark"] .auth-app-link {
  border-color: var(--app-line);
  background: #292a30;
}

:root[data-theme-resolved="dark"] .auth-social-button:hover {
  border-color: #666971;
  background: #303137;
}

:root[data-theme-resolved="dark"] .auth-social-apple,
:root[data-theme-resolved="dark"] .auth-social-apple:hover {
  border-color: #f1f2f4;
  background: #f1f2f4;
  color: #17181d;
}

:root[data-theme-resolved="dark"] .auth-divider span {
  background: var(--app-panel);
}

:root[data-theme-resolved="dark"] body.is-authenticated .app-main {
  background:
    radial-gradient(circle at 74% -12%, rgba(237, 110, 56, 0.12), transparent 28%),
    var(--app-bg);
}

:root[data-theme-resolved="dark"] body.is-authenticated .app-topbar {
  border-bottom-color: var(--app-line);
  background: rgba(28, 29, 34, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035);
}

:root[data-theme-resolved="dark"] .app-page-heading strong,
:root[data-theme-resolved="dark"] .app-menu-button,
:root[data-theme-resolved="dark"] .app-vehicle-select select,
:root[data-theme-resolved="dark"] .vehicle-identity h3,
:root[data-theme-resolved="dark"] .garage-focus-primary-stat strong,
:root[data-theme-resolved="dark"] .garage-health-head h2,
:root[data-theme-resolved="dark"] .garage-listing-head h2,
:root[data-theme-resolved="dark"] .garage-activity-head h2,
:root[data-theme-resolved="dark"] .garage-home-timeline-value strong,
:root[data-theme-resolved="dark"] .garage-kpi-copy strong,
:root[data-theme-resolved="dark"] .module-analytics-card h2,
:root[data-theme-resolved="dark"] .module-hero h1,
:root[data-theme-resolved="dark"] .module-hero-stat strong,
:root[data-theme-resolved="dark"] .record-entry-copy h3,
:root[data-theme-resolved="dark"] .record-value-main,
:root[data-theme-resolved="dark"] .panel-head h2,
:root[data-theme-resolved="dark"] .panel-head h3,
:root[data-theme-resolved="dark"] .record-detail-header h2,
:root[data-theme-resolved="dark"] .record-detail-title > div strong,
:root[data-theme-resolved="dark"] .record-detail-fact strong,
:root[data-theme-resolved="dark"] .trip-detail-line strong,
:root[data-theme-resolved="dark"] .trip-route-analysis-row strong,
:root[data-theme-resolved="dark"] .garage-rail-stats strong,
:root[data-theme-resolved="dark"] .garage-card-action {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .garage-focus-consumption-stat strong,
:root[data-theme-resolved="dark"] .garage-focus-consumption-stat strong span,
:root[data-theme-resolved="dark"] .garage-focus-consumption-stat strong small {
  color: #5aa2f1;
}

:root[data-theme-resolved="dark"] .maintenance-records-panel .record-value,
:root[data-theme-resolved="dark"] .maintenance-records-panel .record-value-icon,
:root[data-theme-resolved="dark"] .maintenance-records-panel .record-value-main,
:root[data-theme-resolved="dark"] .maintenance-records-panel .record-value-decimal {
  color: var(--mw-success);
}

:root[data-theme-resolved="dark"] .app-page-heading span,
:root[data-theme-resolved="dark"] .app-vehicle-select > span,
:root[data-theme-resolved="dark"] .garage-focus-card .engine-note,
:root[data-theme-resolved="dark"] .garage-focus-note,
:root[data-theme-resolved="dark"] .garage-focus-primary-stat > span,
:root[data-theme-resolved="dark"] .garage-focus-meta,
:root[data-theme-resolved="dark"] .garage-home-timeline-label,
:root[data-theme-resolved="dark"] .garage-kpi-copy > span,
:root[data-theme-resolved="dark"] .garage-kpi-copy > em,
:root[data-theme-resolved="dark"] .garage-activity-panel .activity-copy span,
:root[data-theme-resolved="dark"] .garage-activity-panel .activity-meta span,
:root[data-theme-resolved="dark"] .module-hero-copy > p,
:root[data-theme-resolved="dark"] .module-hero-stat > span,
:root[data-theme-resolved="dark"] .module-hero-stat > em,
:root[data-theme-resolved="dark"] .maintenance-search > span,
:root[data-theme-resolved="dark"] .maintenance-filter-group > span,
:root[data-theme-resolved="dark"] .record-inline-meta,
:root[data-theme-resolved="dark"] .record-note,
:root[data-theme-resolved="dark"] .record-detail-title > div span,
:root[data-theme-resolved="dark"] .record-detail-fact span,
:root[data-theme-resolved="dark"] .record-detail-section > span,
:root[data-theme-resolved="dark"] .trip-detail-line span,
:root[data-theme-resolved="dark"] .trip-route-analysis-row,
:root[data-theme-resolved="dark"] .garage-rail-stats small {
  color: var(--app-muted);
}

:root[data-theme-resolved="dark"] .app-vehicle-select,
:root[data-theme-resolved="dark"] .garage-focus-card,
:root[data-theme-resolved="dark"] .garage-health-card,
:root[data-theme-resolved="dark"] .garage-kpi-card,
:root[data-theme-resolved="dark"] .garage-home-v2 .garage-home-listing,
:root[data-theme-resolved="dark"] .garage-activity-panel,
:root[data-theme-resolved="dark"] .module-hero,
:root[data-theme-resolved="dark"] .module-analytics-card,
:root[data-theme-resolved="dark"] .maintenance-workspace .maintenance-records-panel,
:root[data-theme-resolved="dark"] .maintenance-workspace .record-detail-panel,
:root[data-theme-resolved="dark"] .maintenance-workspace .maintenance-side-panel,
:root[data-theme-resolved="dark"] .trips-workspace .trip-calendar-panel,
:root[data-theme-resolved="dark"] .trips-workspace .trip-day-panel,
:root[data-theme-resolved="dark"] .trips-workspace .trip-detail,
:root[data-theme-resolved="dark"] .trips-workspace .trip-scroller-panel,
:root[data-theme-resolved="dark"] .trips-workspace .trip-day-list-panel,
:root[data-theme-resolved="dark"] .panel-card,
:root[data-theme-resolved="dark"] .vehicle-card,
:root[data-theme-resolved="dark"] .metric-card,
:root[data-theme-resolved="dark"] .record-card,
:root[data-theme-resolved="dark"] .maintenance-overview-surface {
  border-color: var(--app-line);
  background: var(--app-panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

:root[data-theme-resolved="dark"] .garage-home-v2 {
  --garage-card-border: var(--app-line);
  --garage-card-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

:root[data-theme-resolved="dark"] .garage-focus-card,
:root[data-theme-resolved="dark"] .module-hero {
  background: linear-gradient(120deg, #25262c 0 50%, #2d2522 100%);
}

:root[data-theme-resolved="dark"] .module-hero-fuel {
  background: linear-gradient(120deg, #25262c 0 50%, #202936 100%);
}

:root[data-theme-resolved="dark"] .module-hero-trips {
  background: linear-gradient(120deg, #25262c 0 50%, #20302b 100%);
}

:root[data-theme-resolved="dark"] .garage-service-progress,
:root[data-theme-resolved="dark"] .module-analytics-card .maintenance-filter-row,
:root[data-theme-resolved="dark"] .maintenance-chart-card,
:root[data-theme-resolved="dark"] .maintenance-workspace .record-card,
:root[data-theme-resolved="dark"] .maintenance-workspace .record-detail-fact,
:root[data-theme-resolved="dark"] .trips-workspace .trip-scroller-card,
:root[data-theme-resolved="dark"] .trip-insight,
:root[data-theme-resolved="dark"] .garage-home-v2 .garage-rail-card,
:root[data-theme-resolved="dark"] .garage-rail-stats > span,
:root[data-theme-resolved="dark"] .trip-day-list-card,
:root[data-theme-resolved="dark"] .trips-workspace .maintenance-vehicle-card .car-visual.card {
  border-color: var(--app-line);
  background: #292a30;
}

:root[data-theme-resolved="dark"] .trip-day-list-card:hover,
:root[data-theme-resolved="dark"] .trip-day-list-card.is-active {
  border-color: rgba(255, 138, 88, 0.55);
  background: #382821;
}

:root[data-theme-resolved="dark"] .trip-day-list-head strong {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .trip-endpoint-map,
:root[data-theme-resolved="dark"] .trip-endpoint-map-loading {
  background: #202126;
}

:root[data-theme-resolved="dark"] .maintenance-search input,
:root[data-theme-resolved="dark"] .maintenance-chip-button,
:root[data-theme-resolved="dark"] .segmented-button {
  border-color: #46484f;
  background: #292a30;
  color: #d0d2d7;
}

:root[data-theme-resolved="dark"] .module-hero-stat {
  border-color: #46484f;
  background: rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-success {
  border-color: rgba(83, 195, 160, 0.34);
  background: rgba(45, 117, 96, 0.28);
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-success strong {
  color: #78d5b6;
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-warning {
  border-color: rgba(255, 196, 72, 0.36);
  background: rgba(143, 99, 16, 0.28);
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-warning strong {
  color: #ffd36f;
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-danger {
  border-color: rgba(255, 125, 115, 0.35);
  background: rgba(143, 54, 49, 0.3);
}

:root[data-theme-resolved="dark"] .module-hero-stat.is-danger strong {
  color: #ff9d96;
}

:root[data-theme-resolved="dark"] .module-hero-stat > span,
:root[data-theme-resolved="dark"] .module-hero-stat > em {
  color: #aeb1b7;
}

:root[data-theme-resolved="dark"] .trips-workspace .maintenance-status-card {
  border-color: var(--app-line);
}

:root[data-theme-resolved="dark"] .trips-workspace .maintenance-status-line {
  border-color: var(--app-line);
  background: #292a30;
}

:root[data-theme-resolved="dark"] .trips-workspace .maintenance-status-line span {
  color: #aeb1b7;
}

:root[data-theme-resolved="dark"] .trips-workspace .maintenance-status-line strong {
  color: #f3f4f6;
}

:root[data-theme-resolved="dark"] body.is-authenticated .trips-workspace .trip-detail.trip-detail-ios {
  border-color: var(--app-line);
  background: #202126;
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-detail-head {
  border-bottom-color: var(--app-line);
  background: #28292f;
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-detail-title,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-ios-row-label,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-address-copy strong,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-section-head h4,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-title strong,
:root[data-theme-resolved="dark"] .trip-profile-head h5,
:root[data-theme-resolved="dark"] .trip-used-roads-head h5,
:root[data-theme-resolved="dark"] .trip-distribution-total strong,
:root[data-theme-resolved="dark"] .trip-distribution-row > strong,
:root[data-theme-resolved="dark"] .trip-distribution-row b,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-used-roads-list strong,
:root[data-theme-resolved="dark"] .trip-profile-legend strong {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .trip-detail-date {
  border-color: #484a52;
  background: #303137;
  color: #d1d3d8;
}

:root[data-theme-resolved="dark"] .trip-detail-content {
  background: #202126;
}

:root[data-theme-resolved="dark"] .trip-ios-card,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-analysis,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-used-roads {
  border-color: var(--app-line);
  background: #292a30;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card.is-active {
  border-color: rgba(98, 158, 226, 0.56);
  background: linear-gradient(145deg, #292a30 35%, #243142 100%);
  box-shadow: 0 0 0 3px rgba(61, 133, 219, 0.11);
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-ios-row,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-address-card-row,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-row,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-used-roads-list > div {
  border-color: var(--app-line);
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-ios-row-icon,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-icon,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-chevron {
  background: #35363d;
  color: #d9dbe0;
}

:root[data-theme-resolved="dark"] .trip-detail-ios .trip-ios-row-value.is-muted,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-address-copy > span,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-section-head > span,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-title small,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-route-card-row,
:root[data-theme-resolved="dark"] .trip-profile-legend,
:root[data-theme-resolved="dark"] .trip-distribution-total,
:root[data-theme-resolved="dark"] .trip-distribution-row,
:root[data-theme-resolved="dark"] .trip-detail-ios .trip-used-roads-list > div {
  color: var(--app-muted);
}

:root[data-theme-resolved="dark"] .trip-profile-panel {
  border-color: rgba(98, 158, 226, 0.34);
  background: linear-gradient(155deg, #292a30 30%, #222a35 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

:root[data-theme-resolved="dark"] .trip-profile-segmented,
:root[data-theme-resolved="dark"] .trip-profile-close {
  background: #1f2025;
  color: #b6b9bf;
}

:root[data-theme-resolved="dark"] .trip-profile-segmented button.is-active {
  background: #3a3c43;
  color: #f3f4f6;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

:root[data-theme-resolved="dark"] .trip-profile-chart-wrap,
:root[data-theme-resolved="dark"] .trip-profile-metric {
  border-color: var(--app-line);
  background: rgba(255, 255, 255, 0.045);
}

:root[data-theme-resolved="dark"] .trip-profile-grid line {
  stroke: #454850;
}

:root[data-theme-resolved="dark"] .trip-profile-line-underlay {
  stroke: rgba(16, 17, 20, 0.85);
}

:root[data-theme-resolved="dark"] .trip-distribution-stack,
:root[data-theme-resolved="dark"] .trip-distribution-row > div {
  background: #3b3d44;
}

:root[data-theme-resolved="dark"] .route-map-loading,
:root[data-theme-resolved="dark"] .google-map-error {
  background: linear-gradient(135deg, #292a30, #222329);
  color: var(--app-muted);
}

:root[data-theme-resolved="dark"] .google-map-error strong {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .maintenance-workspace .selectable-record.is-active,
:root[data-theme-resolved="dark"] .garage-home-v2 .garage-rail-card.is-active {
  border-color: rgba(255, 138, 88, 0.55);
  background: #382821;
}

:root[data-theme-resolved="dark"] .fuel-workspace .selectable-record.is-active {
  border-color: rgba(98, 158, 226, 0.52);
  background: #202d3d;
}

:root[data-theme-resolved="dark"] .garage-count-badge,
:root[data-theme-resolved="dark"] .garage-readonly-pill {
  background: #303137;
  color: #c0c2c8;
}

:root[data-theme-resolved="dark"] .garage-kpi-marker {
  background: #47291e;
}

:root[data-theme-resolved="dark"] .garage-kpi-blue .garage-kpi-marker {
  background: #1c314b;
}

:root[data-theme-resolved="dark"] .garage-kpi-green .garage-kpi-marker {
  background: #173d34;
}

:root[data-theme-resolved="dark"] .garage-kpi-slate .garage-kpi-marker {
  background: #33353b;
}

:root[data-theme-resolved="dark"] .brand-logo-shell,
:root[data-theme-resolved="dark"] .garage-focus-card .brand-logo-shell {
  background: transparent;
}

:root[data-theme-resolved="dark"] .app-mobile-nav {
  border-color: var(--app-line);
  background: rgba(30, 31, 36, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
}

:root[data-theme-resolved="dark"] .app-mobile-nav .app-nav-button {
  color: var(--app-muted);
}

:root[data-theme-resolved="dark"] .app-mobile-nav .app-nav-button.is-active {
  background: #47291e;
  color: #ff9b70;
}

:root[data-theme-resolved="dark"] .route-endpoint-label,
:root[data-theme-resolved="dark"] .route-scrub-marker-label {
  background: rgba(31, 32, 37, 0.96);
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

:root[data-theme-resolved="dark"] .route-scrub-marker-label::after {
  border-top-color: rgba(31, 32, 37, 0.96);
}

:root[data-theme-resolved="dark"] .report-inspection-summary,
:root[data-theme-resolved="dark"] .report-section-tab.is-active {
  border-color: var(--app-line);
  background: #292a30;
}

:root[data-theme-resolved="dark"] .report-download-button {
  border-color: rgba(255, 138, 88, 0.3);
  background: #47291e;
  color: #ff9b70;
}

:root[data-theme-resolved="dark"] .report-download-button:hover {
  border-color: #ff8a58;
  background: #533023;
}

:root[data-theme-resolved="dark"] .report-download-button.is-premium-locked {
  border-color: rgba(255, 138, 88, 0.34);
  background: linear-gradient(135deg, #40271f, #4d2c20);
}

:root[data-theme-resolved="dark"] .premium-lock-overlay {
  background: linear-gradient(145deg, rgba(31, 32, 37, 0.48), rgba(52, 37, 31, 0.78));
}

:root[data-theme-resolved="dark"] .premium-lock-icon {
  border-color: rgba(255, 138, 88, 0.24);
  background: #47291e;
  color: #ff9b70;
}

:root[data-theme-resolved="dark"] .premium-lock-shell.is-inline .premium-lock-overlay {
  background: rgba(48, 38, 34, 0.72);
}

:root[data-theme-resolved="dark"] .premium-lock-shell.is-trip-detail {
  border-color: rgba(255, 138, 88, 0.16);
  background: #25252a;
}

:root[data-theme-resolved="dark"] .report-section-tabs,
:root[data-theme-resolved="dark"] .report-record-parts i {
  background: #24252a;
}

:root[data-theme-resolved="dark"] .report-record-copy > span,
:root[data-theme-resolved="dark"] .report-schema-note,
:root[data-theme-resolved="dark"] .report-schema-legend,
:root[data-theme-resolved="dark"] .report-inspection-stat {
  color: var(--app-muted);
}

:root[data-theme-resolved="dark"] .report-record-copy > strong,
:root[data-theme-resolved="dark"] .report-record-meta > strong,
:root[data-theme-resolved="dark"] .report-inspection-summary h3,
:root[data-theme-resolved="dark"] .report-inspection-stat strong,
:root[data-theme-resolved="dark"] .report-records-head h2 {
  color: var(--app-ink);
}

:root[data-theme-resolved="dark"] .app-loading {
  background:
    radial-gradient(circle at 50% 44%, rgba(237, 110, 56, 0.14) 0, rgba(237, 110, 56, 0.05) 24%, transparent 48%),
    linear-gradient(180deg, #1d1e23 0%, #17181d 100%);
}

:root[data-theme-resolved="dark"] .app-loading-progress {
  background: #35373e;
}

@media (max-width: 430px) {
  .app-theme-toggle {
    width: 34px;
    height: 34px;
  }

  .app-topbar-actions {
    gap: 4px;
  }

  .app-vehicle-select {
    width: 120px;
  }

  .app-page-heading strong {
    max-width: 80px;
  }

  .premium-lock-shell.is-trip-detail {
    min-height: 480px;
  }

  .premium-lock-overlay {
    padding: 18px;
  }

  .report-download-button.is-premium-locked b {
    display: none;
  }
}
