:root {
  --v4-brand: #e11b22;
  --v4-brand-strong: #bd1118;
  --v4-brand-text: #b20f17;
  --v4-page: #eef2f7;
  --v4-shell: #ffffff;
  --v4-sidebar: #ffffff;
  --v4-card: #ffffff;
  --v4-card-soft: #f7f9fc;
  --v4-text: #17212d;
  --v4-muted: #5f6b7a;
  --v4-a2b-summary-label: #5f6b7a;
  --v4-line: #e0e6ee;
  --v4-green: #159269;
  --v4-green-text: #0b6f4f;
  --v4-green-soft: #e8f8f2;
  --v4-amber: #ad7200;
  --v4-amber-text: #704800;
  --v4-amber-soft: #fff5df;
  --v4-blue: #3978c5;
  --v4-blue-text: #285f9e;
  --v4-blue-soft: #eaf3fe;
  --v4-red-soft: #fff0f1;
  --v4-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --v4-font-body: 15px;
  --v4-font-secondary: 13px;
  --v4-font-meta: 12px;
  --v4-font-eyebrow: 11px;
}

.v4-fleet-governance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v4-fleet-action-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 6px;
  width: min(100%, 620px);
}

.v4-fleet-governance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v4-fleet-governance-summary > a {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card);
  color: inherit;
  text-decoration: none;
}

.v4-fleet-governance-summary strong { font-size: 1.45rem; }
.v4-fleet-governance-summary span { color: var(--v4-muted); }

.fleet-expiry-workspace .fleet-expiry-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}

.fleet-expiry-workspace .fleet-expiry-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--v4-line);
  border-radius: 11px;
  background: var(--v4-card-soft);
}

.fleet-expiry-workspace .fleet-expiry-metric.danger { border-color: var(--v4-brand); }
.fleet-expiry-workspace .fleet-expiry-metric span { color: var(--v4-muted); font-size: var(--v4-font-eyebrow); font-weight: 800; letter-spacing: .04em; }
.fleet-expiry-workspace .fleet-expiry-metric strong { color: var(--v4-text); font-size: 1.75rem; line-height: 1.1; }
.fleet-expiry-workspace .fleet-expiry-metric.danger strong { color: var(--v4-brand-text); }
.fleet-expiry-workspace .fleet-expiry-metric small { color: var(--v4-muted); font-size: var(--v4-font-meta); }

.fleet-expiry-workspace .fleet-expiry-rule,
.fleet-expiry-workspace .fleet-expiry-explainer {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card-soft);
}

.fleet-expiry-workspace .fleet-expiry-explainer h3,
.fleet-expiry-workspace .fleet-expiry-explainer p { margin: 0; }
.fleet-expiry-workspace .fleet-expiry-explainer p { margin-top: 4px; color: var(--v4-muted); }

.fleet-expiry-workspace .fleet-expiry-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(130px, .8fr)) auto;
  gap: 8px;
  align-items: end;
  margin: 12px 0;
}

.fleet-expiry-workspace .fleet-expiry-filters .field { min-width: 0; }
.fleet-expiry-workspace .fleet-expiry-filters .actions { align-self: end; margin: 0; }
.fleet-expiry-workspace .fleet-expiry-table { margin-top: 8px; }
.fleet-expiry-workspace .fleet-expiry-table table { min-width: 820px; }
.fleet-expiry-workspace .fleet-expiry-cards { display: none; }
.fleet-expiry-workspace .fleet-expiry-card { display: none; }

.fleet-expiry-workspace .compliance-navigation {
  margin-bottom: 14px;
}
.fleet-expiry-workspace .compliance-primary-tabs {
  margin-bottom: 0;
}
.fleet-expiry-workspace .compliance-safety-subnav {
  padding: 10px 12px 0;
  border: 1px solid var(--v4-line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--v4-card-soft);
}
.fleet-expiry-workspace .compliance-safety-subnav > span {
  display: block;
  margin-bottom: 4px;
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.fleet-expiry-workspace .compliance-safety-subnav .page-tabs {
  margin-bottom: 0;
  border-bottom: 0;
}

.fleet-expiry-workspace .fleet-preview-form { margin-top: 12px; }
.fleet-expiry-workspace .fleet-preview-source-details {
  border: 1px solid var(--v4-line);
  border-radius: 9px;
  background: var(--v4-card-soft);
}
.fleet-expiry-workspace .fleet-preview-source-details > summary {
  padding: 11px 12px;
  color: var(--v4-text);
  font-weight: 800;
  cursor: pointer;
}
.fleet-expiry-workspace .fleet-preview-source-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--v4-line);
}
.fleet-expiry-workspace .fleet-preview-result { margin-top: 16px; }
.fleet-expiry-workspace .fleet-preview-result > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.fleet-expiry-workspace .fleet-preview-result h3,
.fleet-expiry-workspace .fleet-preview-result p { margin: 0; }
.fleet-expiry-workspace .fleet-preview-result code { max-width: 48%; overflow-wrap: anywhere; color: var(--v4-muted); }
.fleet-expiry-workspace .fleet-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.fleet-expiry-workspace .fleet-preview-grid > article {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--v4-line);
  border-radius: 9px;
  background: var(--v4-card-soft);
}
.fleet-expiry-workspace .fleet-preview-grid span { color: var(--v4-muted); font-size: var(--v4-font-meta); }

/* Fleet Registry preview */
.v4-content .fleet-registry-tabs {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: hidden;
}

.fleet-expiry-workspace .fleet-preview-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  margin: 12px 0;
  border-bottom: 1px solid var(--v4-line);
}

.fleet-expiry-workspace .fleet-preview-section-table {
  display: block;
  max-width: 100%;
}

.fleet-expiry-workspace .fleet-preview-section-table td,
.fleet-expiry-workspace .fleet-preview-section-table code,
.fleet-expiry-workspace .fleet-preview-section-card,
.fleet-expiry-workspace .fleet-preview-section-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fleet-expiry-workspace .fleet-preview-section-card { display: none; }

.fleet-expiry-workspace .fleet-preview-confidence {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  color: var(--v4-blue-text);
  border: 1px solid var(--v4-blue);
  border-radius: 999px;
  background: var(--v4-blue-soft);
  font-size: var(--v4-font-meta);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fleet-expiry-workspace .fleet-preview-confidence.is-provisional {
  color: var(--v4-amber-text);
  border-color: var(--v4-amber);
  background: var(--v4-amber-soft);
}

.fleet-expiry-workspace .fleet-preview-confidence.is-needs-review {
  color: var(--v4-brand-text);
  border-color: var(--v4-brand);
  background: var(--v4-red-soft);
}

.fleet-expiry-workspace .fleet-preview-comparison {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 8px;
  color: var(--v4-blue-text);
  border: 1px solid var(--v4-blue);
  border-radius: 999px;
  background: var(--v4-blue-soft);
  font-size: var(--v4-font-meta);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fleet-expiry-workspace .fleet-preview-neutral-pill {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 8px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 999px;
  background: var(--v4-card-soft);
  font-size: var(--v4-font-meta);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fleet-expiry-workspace .fleet-observation-status {
  display: inline-flex;
  margin-top: 5px;
  color: #b9dcff;
  background: #173a59;
  border: 1px solid #3a719f;
}

html[data-theme="light"] .fleet-expiry-workspace .fleet-observation-status {
  color: #174f7a;
  background: #e8f3ff;
  border-color: #8ebbe0;
}

.fleet-expiry-workspace .fleet-expiry-neutral-status {
  color: var(--v4-text);
  background: var(--v4-card-soft);
  border: 1px solid var(--v4-line);
}

.fleet-expiry-workspace .fleet-preview-fixed-pair {
  border-left: 4px solid var(--v4-blue);
  background: var(--v4-blue-soft);
  font-weight: 800;
}
/* End Fleet Registry preview */

@media (max-width: 720px) {
  .v4-fleet-action-form,
  .v4-fleet-governance-summary { grid-template-columns: 1fr; }
  .v4-fleet-action-form button,
  .v4-fleet-action-form input,
  .v4-fleet-action-form select { min-height: 48px; }
}

/* Batch 1 operator forms: shared server/JS validation and focused refresh. */
.v4-content .required-marker { color: var(--v4-brand); font-weight: 900; }
.v4-content .required-legend { margin: 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-content .operator-validation-summary {
  position: sticky;
  top: 8px;
  z-index: 8;
  grid-column: 1 / -1;
  padding: 12px 14px;
  color: var(--v4-brand-text);
  border: 2px solid var(--v4-brand);
  border-radius: 8px;
  background: var(--v4-red-soft);
  box-shadow: var(--v4-shadow);
}
.v4-content .operator-validation-summary p { margin: 5px 0; }
.v4-content .operator-validation-summary ul { margin: 6px 0 0; padding-left: 20px; }
.v4-content .operator-validation-summary a { color: inherit; font-weight: 800; }
.v4-content .operator-field-error { display: block; color: var(--v4-brand-text); font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-content [aria-invalid="true"] { border-color: var(--v4-brand) !important; box-shadow: 0 0 0 2px var(--v4-red-soft); }
.v4-content [aria-busy="true"] { cursor: progress; }
#operator-live-region:empty { display: none; }
#operator-live-region .operator-response { margin-bottom: 12px; }
#operator-live-region .alert.bad {
  color: var(--v4-brand-text);
  border-color: var(--v4-brand);
  background: var(--v4-red-soft);
}
#operator-live-region .alert.ok,
#operator-live-region .alert.good {
  color: var(--v4-green-text);
  border-color: var(--v4-green);
  background: var(--v4-green-soft);
}

/* Card Master preview: dense operational tables with bounded mobile overflow. */
.card-master-panel,
.card-master-intro,
.card-master-section {
  min-width: 0;
}

.card-master-intro {
  margin-bottom: 14px;
}

.card-master-form {
  padding: 14px;
  border-top: 1px solid var(--v4-line);
}

.card-master-intro p {
  max-width: 78ch;
  margin: 4px 0 0;
  color: var(--v4-muted);
}

.card-master-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin: 14px 0;
}

.card-master-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.card-master-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.card-master-table-wrap table {
  min-width: 760px;
}

.card-master-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  white-space: nowrap;
}

.card-master-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--v4-line);
}

html[data-v4-theme="dark"] {
  --v4-page: #0b121c;
  --v4-shell: #0e1621;
  --v4-sidebar: #0c131d;
  --v4-card: #172231;
  --v4-card-soft: #1b2939;
  --v4-text: #f2f5f8;
  --v4-muted: #94a4b7;
  --v4-a2b-summary-label: #94a4b7;
  --v4-line: #29384b;
  --v4-brand-text: #ff8f93;
  --v4-green: #43c996;
  --v4-green-text: #70e0b7;
  --v4-green-soft: #15392f;
  --v4-amber: #f2b94b;
  --v4-amber-text: #ffd27a;
  --v4-amber-soft: #3a2d17;
  --v4-blue: #69a7ed;
  --v4-blue-text: #9bc8ff;
  --v4-blue-soft: #172f4c;
  --v4-red-soft: #351b22;
  --v4-form-label: #c8d4e2;
  --v4-form-helper: #aebed0;
  --v4-form-placeholder: #96a8bd;
  --v4-shadow: 0 1px 0 rgba(255, 255, 255, .025);
  color-scheme: dark;
}

* { box-sizing: border-box; }

.v4-body {
  margin: 0;
  overflow-x: hidden;
  color: var(--v4-text);
  background: var(--v4-page);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--v4-font-body);
  line-height: 1.5;
}

.v4-body a { color: var(--v4-brand); }
.v4-body button, .v4-body input, .v4-body select, .v4-body textarea { font: inherit; }

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

.v4-sidebar {
  min-height: 100vh;
  padding: 18px 14px 24px;
  border-right: 1px solid var(--v4-line);
  background: var(--v4-sidebar);
}

.v4-brand { padding: 2px 10px 18px; }
.v4-brand img { display: block; width: 172px; max-width: 100%; }
html[data-v4-theme="dark"] .v4-brand img { content: url("fukuyama-logo-white.png"); }
.v4-brand-copy { display: block; margin-top: 8px; color: var(--v4-muted); font-size: var(--v4-font-eyebrow); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.v4-nav-section { margin-top: 9px; }
.v4-nav-label { margin: 0; padding: 9px 12px 6px; color: var(--v4-muted); font-size: var(--v4-font-eyebrow); font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.v4-nav-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 8px 12px;
  color: var(--v4-muted) !important;
  border-radius: 10px;
  font-size: var(--v4-font-body);
  font-weight: 700;
  text-decoration: none;
}
.v4-nav-link:hover { color: var(--v4-text) !important; background: var(--v4-card-soft); }
.v4-nav-link.is-active { color: #fff !important; background: linear-gradient(135deg, var(--v4-brand), #ff4c52); box-shadow: 0 10px 24px rgba(225, 27, 34, .2); }
.v4-nav-icon { width: 18px; flex: 0 0 18px; text-align: center; font-size: 15px; }

.v4-main { min-width: 0; }
.v4-topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--v4-line);
  background: var(--v4-shell);
}
.v4-page-heading { min-width: 210px; }
.v4-page-heading h1 { margin: 0; color: var(--v4-text); font-size: 20px; letter-spacing: -.025em; }
.v4-page-heading > p:last-child { margin: 2px 0 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-eyebrow { margin: 0 0 2px; color: var(--v4-brand); font-size: var(--v4-font-eyebrow); font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.v4-search { flex: 1; max-width: 430px; display: flex; }
.v4-search input { min-width: 0; flex: 1; min-height: 38px; padding: 8px 11px; color: var(--v4-text); border: 1px solid var(--v4-line); border-right: 0; border-radius: 9px 0 0 9px; background: var(--v4-card-soft); }
.v4-search button { min-height: 38px; padding: 8px 11px; color: var(--v4-text); border: 1px solid var(--v4-line); border-radius: 0 9px 9px 0; background: var(--v4-card); font-weight: 800; }
.v4-search-spacer { flex: 1; }
.v4-top-actions { display: flex; align-items: center; gap: 9px; }
.v4-theme-toggle { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 11px; color: var(--v4-text); border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-card-soft); font-size: var(--v4-font-secondary); font-weight: 800; cursor: pointer; }
.v4-theme-toggle:focus-visible, .v4-body a:focus-visible, .v4-body button:focus-visible, .v4-body input:focus-visible, .v4-body select:focus-visible, .v4-body textarea:focus-visible { outline: 3px solid rgba(225, 27, 34, .25); outline-offset: 2px; }
.v4-user { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.v4-user > div { display: grid; text-align: right; }
.v4-user strong { font-size: var(--v4-font-secondary); }
.v4-user span { color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-user i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--v4-brand), #ff5157); font-size: var(--v4-font-meta); font-style: normal; font-weight: 900; }

.v4-content {
  --ink: var(--v4-text);
  --muted: var(--v4-muted);
  --line: var(--v4-line);
  --brand: var(--v4-brand);
  --ok: var(--v4-green);
  --warn: var(--v4-amber);
  --bad: var(--v4-brand);
  min-width: 0;
  padding: 22px;
}
.v4-pilot-preview {
  margin: 0 0 16px;
  padding: 12px 14px;
  color: var(--v4-text);
  border: 1px solid color-mix(in srgb, var(--v4-amber) 45%, var(--v4-line));
  border-left: 5px solid var(--v4-amber);
  border-radius: 10px;
  background: var(--v4-amber-soft);
  overflow-wrap: anywhere;
}
.v4-pilot-preview strong { display: block; color: var(--v4-amber-text); font-size: 14px; }
.v4-pilot-preview p { margin: 3px 0 0; color: var(--v4-text); font-size: var(--v4-font-secondary); }
.v4-content .alert, .v4-alert { margin-bottom: 14px; padding: 10px 12px; color: var(--v4-green-text); border: 1px solid color-mix(in srgb, var(--v4-green-text) 35%, var(--v4-line)); border-radius: 9px; background: var(--v4-green-soft); }
.v4-content .alert.warn { color: var(--v4-amber-text); border-color: color-mix(in srgb, var(--v4-amber) 45%, var(--v4-line)); background: var(--v4-amber-soft); }
.v4-content .alert.bad, .v4-alert-bad { color: var(--v4-brand-text); border-color: color-mix(in srgb, var(--v4-brand-text) 35%, var(--v4-line)); background: var(--v4-red-soft); }

.v4-page-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.v4-page-actions h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.v4-page-actions p { margin: 4px 0 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-primary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; color: #fff !important; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--v4-brand), #ff4c52); box-shadow: 0 9px 20px rgba(225, 27, 34, .18); font-weight: 850; text-decoration: none; }

.v4-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.v4-kpi, .v4-kpi-card { min-width: 0; display: grid; gap: 4px; padding: 16px; color: var(--v4-text) !important; border: 1px solid var(--v4-line); border-radius: 14px; background: var(--v4-card); box-shadow: var(--v4-shadow); text-decoration: none; }
.v4-kpi:hover, .v4-kpi-card:hover { border-color: color-mix(in srgb, var(--v4-brand) 30%, var(--v4-line)); transform: translateY(-1px); }
.v4-kpi-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--v4-blue) 55%, transparent); outline-offset: 2px; }
.v4-kpi-card > span { color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 750; }
.v4-kpi-card > strong { color: var(--v4-text); font-size: 25px; letter-spacing: -.035em; }
.v4-kpi-card > small { color: var(--v4-muted); font-size: var(--v4-font-secondary); overflow-wrap: anywhere; }
.v4-kpi-label { color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 750; }
.v4-kpi strong { font-size: 25px; letter-spacing: -.035em; }
.v4-kpi small { color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-kpi.v4-tone-ok strong, .v4-tone-ok { color: var(--v4-green); }
.v4-kpi.v4-tone-warn strong, .v4-tone-warn { color: var(--v4-amber); }
.v4-kpi.v4-tone-bad strong, .v4-tone-bad { color: var(--v4-brand); }
.v4-kpi.v4-tone-info strong, .v4-tone-info { color: var(--v4-blue); }

.v4-expense-donut { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); align-items: center; gap: 20px; padding: 18px; }
.v4-expense-donut svg { display: block; width: min(100%, 240px); height: auto; margin-inline: auto; overflow: visible; }
.v4-expense-donut svg circle { pointer-events: bounding-box; }
.v4-expense-donut svg text { fill: var(--v4-text); pointer-events: none; }
.v4-expense-donut .v4-donut-total { fill: var(--v4-muted); font-size: 3px; font-weight: 800; letter-spacing: .04em; }
.v4-expense-donut .v4-donut-value { font-size: 4px; font-weight: 900; }
.v4-expense-donut ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.v4-expense-donut li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-expense-donut li span { width: 11px; height: 11px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 50%; }
.v4-expense-donut li strong { min-width: 0; color: var(--v4-text); overflow-wrap: anywhere; }

.v4-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 14px; margin-bottom: 14px; }
.v4-panel { min-width: 0; overflow: hidden; border: 1px solid var(--v4-line); border-radius: 14px; background: var(--v4-card); box-shadow: var(--v4-shadow); }
.v4-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--v4-line); }
.v4-panel-head h2 { margin: 0; color: var(--v4-text); font-size: 15px; }
.v4-panel-head p { margin: 3px 0 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-panel-body { padding: 15px 16px; }
.v4-panel-wide { grid-column: 1 / -1; }

.v4-chip { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: var(--v4-font-meta); font-weight: 850; }
.v4-chip-ok { color: var(--v4-green-text); background: var(--v4-green-soft); }
.v4-chip-warn { color: var(--v4-amber-text); background: var(--v4-amber-soft); }
.v4-chip-bad { color: var(--v4-brand-text); background: var(--v4-red-soft); }
.v4-chip-info { color: var(--v4-blue-text); background: var(--v4-blue-soft); }
.v4-chip-neutral { color: var(--v4-text); background: var(--v4-card-soft); }
.v4-chip-muted { color: var(--v4-muted); background: var(--v4-card-soft); }

.v4-throughput { height: 220px; display: flex; align-items: end; justify-content: space-around; gap: 10px; padding: 20px 4px 24px; border-bottom: 1px solid var(--v4-line); background: repeating-linear-gradient(to bottom, transparent 0 43px, color-mix(in srgb, var(--v4-line) 75%, transparent) 44px 45px); }
.v4-bar-group { position: relative; flex: 1; height: 100%; display: flex; align-items: end; justify-content: center; gap: 5px; }
.v4-bar-group i { width: min(18px, 35%); min-height: 4px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--v4-brand) 16%, var(--v4-card)); border: 1px solid color-mix(in srgb, var(--v4-brand) 20%, transparent); }
.v4-bar-group i:last-of-type { background: linear-gradient(to top, var(--v4-brand), #ff5a60); border: 0; }
.v4-bar-group span { position: absolute; bottom: -20px; color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-chart-legend { display: flex; justify-content: center; gap: 18px; margin-top: 12px; color: var(--v4-muted); font-size: var(--v4-font-meta); }

.v4-flow { display: grid; gap: 10px; }
.v4-flow-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 38px; align-items: center; gap: 9px; font-size: var(--v4-font-secondary); }
.v4-flow-row span { color: var(--v4-muted); }
.v4-flow-track { height: 11px; overflow: hidden; border-radius: 999px; background: var(--v4-card-soft); }
.v4-flow-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--v4-brand), #ff5a60); }
.v4-flow-row:nth-child(2) i { background: var(--v4-blue); }
.v4-flow-row:nth-child(3) i { background: var(--v4-green); }
.v4-flow-row:nth-child(4) i { background: var(--v4-amber); }
.v4-flow-row:nth-child(5) i { background: #8064d9; }
.v4-flow-row:nth-child(6) i { background: #60738a; }

.v4-attention { margin: 0; padding: 0; list-style: none; }
.v4-attention li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--v4-line); }
.v4-attention li:last-child { border-bottom: 0; }
.v4-attention-count { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--v4-card-soft); font-weight: 900; }
.v4-attention strong, .v4-attention small { display: block; }
.v4-attention small { margin-top: 2px; color: var(--v4-muted); }
.v4-attention a { font-size: var(--v4-font-secondary); font-weight: 850; text-decoration: none; }

.v4-dispatch-preview { width: 100%; border-collapse: collapse; font-size: var(--v4-font-body); }
.v4-dispatch-preview th { padding: 8px 6px; color: var(--v4-muted); background: var(--v4-card-soft); text-align: left; font-size: var(--v4-font-meta); letter-spacing: .05em; text-transform: uppercase; }
.v4-dispatch-preview td { padding: 9px 6px; color: var(--v4-text); border-bottom: 1px solid var(--v4-line); }
.v4-dispatch-preview tr:last-child td { border-bottom: 0; }
.v4-empty { padding: 20px; color: var(--v4-muted); text-align: center; }

/* Governed quotation and Job Order workflows. */
.v4-action-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
}
.v4-action-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  padding: 8px 12px;
  color: var(--v4-muted) !important;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: var(--v4-font-secondary);
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.v4-action-tab:hover { color: var(--v4-text) !important; background: var(--v4-card-soft); }
.v4-action-tab.is-active,
.v4-action-tab[aria-current="page"] { color: var(--v4-brand-text) !important; border-color: color-mix(in srgb, var(--v4-brand) 30%, var(--v4-line)); background: var(--v4-red-soft); }

.v4-maintenance-tabs { max-width: 620px; }
.v4-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.v4-maintenance-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 14px;
  background: var(--v4-card);
}
.v4-maintenance-card h3,
.v4-maintenance-card p { margin: 0; }
.v4-danger-zone {
  border-color: color-mix(in srgb, var(--v4-brand) 35%, var(--v4-line));
  background: var(--v4-red-soft);
}
.v4-maintenance-confirmation {
  display: grid;
  gap: 6px;
  color: var(--v4-text);
  font-size: var(--v4-font-secondary);
  font-weight: 800;
}
.v4-maintenance-confirmation code { overflow-wrap: anywhere; }
.v4-maintenance-confirmation input {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 9px;
  background: var(--v4-card-soft);
}
.v4-maintenance-card select { width: 100%; min-height: 44px; }

.v4-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(130px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
}
.v4-filter-bar.is-compact { grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(130px, 1fr)) auto; }
.v4-filter-bar label { min-width: 0; display: grid; gap: 5px; color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-filter-bar input,
.v4-filter-bar select { width: 100%; min-height: 40px; }
.v4-filter-bar > div,
.v4-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.v4-filter-bar button { min-height: 40px; padding: 8px 13px; }

.v4-table-wrap {
  width: 100%;
  max-width: 100%;
  contain: inline-size layout paint;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.v4-table-wrap:focus-visible { outline: 3px solid color-mix(in srgb, var(--v4-brand) 25%, transparent); outline-offset: -3px; }
.v4-data-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  background: var(--v4-card);
  font-size: var(--v4-font-body);
}
.v4-data-table caption { color: var(--v4-muted); }
.v4-data-table th { padding: 10px 12px; color: var(--v4-muted); border-bottom: 1px solid var(--v4-line); background: var(--v4-card-soft); font-size: var(--v4-font-meta); letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.v4-data-table td { padding: 12px; color: var(--v4-text); border-bottom: 1px solid var(--v4-line); vertical-align: top; }
.v4-data-table tbody tr:last-child td { border-bottom: 0; }
.v4-data-table tbody tr:hover td { background: color-mix(in srgb, var(--v4-brand) 4%, var(--v4-card)); }
.v4-cell-sub { display: block; margin-top: 3px; color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 500; line-height: 1.45; }
.v4-row-action,
.v4-secondary-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  color: var(--v4-text) !important;
  border: 1px solid var(--v4-line);
  border-radius: 8px;
  background: var(--v4-card);
  font-size: var(--v4-font-secondary);
  font-weight: 850;
  text-decoration: none;
}
.v4-row-action:hover,
.v4-secondary-action:hover { color: var(--v4-brand-text) !important; border-color: color-mix(in srgb, var(--v4-brand) 35%, var(--v4-line)); background: var(--v4-red-soft); }
.v4-row-action + .v4-row-action,
.v4-row-action + .v4-primary-action,
.v4-secondary-action + .v4-primary-action { margin-left: 7px; }
.v4-empty { min-height: 92px; display: grid; place-content: center; gap: 3px; background: var(--v4-card-soft); }
.v4-empty strong { color: var(--v4-text); }

.v4-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--v4-line);
  border-radius: 14px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
}
.v4-record-head p { margin: 5px 0 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-record-head-actions,
.v4-record-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.v4-record-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--v4-text); font-size: 21px; font-weight: 900; letter-spacing: -.03em; }

.v4-lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  gap: 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.v4-lifecycle-step { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 6px; color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-lifecycle-step::after { position: absolute; z-index: 0; top: 8px; right: 0; left: 18px; height: 2px; content: ""; background: var(--v4-line); }
.v4-lifecycle-step:last-child::after { display: none; }
.v4-lifecycle-step i { position: relative; z-index: 1; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid var(--v4-line); border-radius: 50%; background: var(--v4-card); }
.v4-lifecycle-step.is-done { color: var(--v4-green); }
.v4-lifecycle-step.is-done::after { background: var(--v4-green); }
.v4-lifecycle-step.is-done i { border-color: var(--v4-green); background: var(--v4-green-soft); }
.v4-lifecycle-step.is-active,
.v4-lifecycle-step[aria-current="step"] { color: var(--v4-brand-text); }
.v4-lifecycle-step.is-active i,
.v4-lifecycle-step[aria-current="step"] i { border-color: var(--v4-brand); background: var(--v4-red-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v4-brand) 12%, transparent); }

.v4-record-tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--v4-line); scrollbar-width: thin; }
.v4-record-tab { min-height: 40px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 12px; color: var(--v4-muted) !important; border-bottom: 3px solid transparent; font-size: var(--v4-font-secondary); font-weight: 850; text-decoration: none; white-space: nowrap; }
.v4-record-tab:hover { color: var(--v4-text) !important; }
.v4-record-tab.is-active,
.v4-record-tab[aria-current="page"] { color: var(--v4-brand-text) !important; border-bottom-color: var(--v4-brand); }

.v4-record-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); align-items: start; gap: 14px; }
.v4-detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); align-items: start; gap: 14px; }
.v4-record-main,
.v4-side-stack { min-width: 0; display: grid; gap: 14px; }
.v4-action-rail { min-width: 0; display: grid; gap: 12px; position: sticky; top: 12px; }
.v4-rail-actions { display: grid; gap: 8px; padding: 14px 16px; }
.v4-rail-actions > * { width: 100%; }

.v4-detail-grid {
  display: grid;
  grid-template-columns: minmax(130px, .38fr) minmax(0, 1fr);
  margin: 0;
  padding: 4px 16px 16px;
}
.v4-detail-grid dt,
.v4-detail-grid dd { min-width: 0; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--v4-line); overflow-wrap: anywhere; }
.v4-detail-grid dt { padding-right: 12px; color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-detail-grid dd { color: var(--v4-text); font-size: var(--v4-font-body); }
.v4-detail-grid dt:nth-last-of-type(1),
.v4-detail-grid dd:last-child { border-bottom: 0; }

.v4-quotation-terms {
  margin: 0 16px 16px;
  overflow: hidden;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card);
}
.v4-quotation-terms > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--v4-text);
  font-weight: 850;
}
.v4-quotation-terms > summary span,
.v4-quotation-terms > summary small { min-width: 0; overflow-wrap: anywhere; }
.v4-quotation-terms > summary small { color: var(--v4-muted); text-align: right; }
.v4-quotation-terms-body { min-width: 0; padding: 0 14px 14px; overflow-wrap: anywhere; }
.v4-quotation-terms-body .terms-list { min-width: 0; }

@media (max-width: 520px) {
  .v4-quotation-terms > summary { align-items: flex-start; flex-direction: column; }
  .v4-quotation-terms > summary small { text-align: left; }
}

.v4-summary-strip,
.v4-workflow-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--v4-line);
  border-radius: 14px;
  background: var(--v4-line);
  box-shadow: var(--v4-shadow);
}
.v4-summary-strip > div,
.v4-workflow-banner > div { min-width: 0; padding: 13px 15px; background: var(--v4-card); }
.v4-summary-strip span,
.v4-workflow-banner span { display: block; margin-bottom: 4px; color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.v4-summary-strip strong,
.v4-workflow-banner strong { display: block; color: var(--v4-text); font-size: 14px; overflow-wrap: anywhere; }
.v4-workflow-banner { grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(130px, 1fr)); }
.v4-workflow-banner p { margin: 4px 0 0; color: var(--v4-muted); font-size: var(--v4-font-meta); }

.v4-embedded-content { min-width: 0; }
.v4-embedded-content > h3 { margin: 0; padding: 14px 16px 8px; color: var(--v4-text); font-size: 13px; }
.v4-embedded-content > .panel:last-child,
.v4-embedded-content > section:last-child { margin-bottom: 0; }
.v4-evidence-grid,
.v4-send-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.v4-evidence-grid > :last-child,
.v4-send-grid > :last-child { grid-column: 1 / -1; }
.v4-customer-output { display: grid; gap: 12px; }
.v4-output-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.v4-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px 16px;
}
.v4-form-grid label { min-width: 0; display: grid; gap: 5px; color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-form-grid input,
.v4-form-grid select,
.v4-form-grid textarea { width: 100%; min-height: 42px; }
.v4-form-grid .checkline { display: flex; align-items: center; gap: 10px; color: var(--v4-text); }
.v4-form-grid .checkline input[type="checkbox"] { flex: 0 0 auto; width: 20px; min-height: 20px; height: 20px; margin: 0; accent-color: var(--v4-brand); }
.v4-form-grid .checkline span { min-width: 0; }
.v4-form-wide { grid-column: 1 / -1; }
.v4-form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.operator-error-dialog { width: min(92vw, 520px); max-height: min(82vh, 620px); margin: auto; padding: 0; overflow: auto; color: var(--v4-text); border: 1px solid var(--v4-line); border-radius: 14px; background: var(--v4-card); box-shadow: 0 22px 70px rgba(0, 0, 0, .38); }
.operator-error-dialog::backdrop { background: rgba(4, 10, 18, .68); backdrop-filter: blur(2px); }
.operator-error-dialog-card { display: grid; gap: 12px; padding: 22px; }
.operator-error-dialog-card .eyebrow { margin: 0; color: var(--v4-brand-text); }
.operator-error-dialog-card h2 { margin: 0; color: var(--v4-text); font-size: 20px; }
.operator-error-dialog-card [data-operator-error-message] { color: var(--v4-muted); line-height: 1.55; white-space: pre-line; }
.operator-error-dialog-card .v4-form-actions { margin-top: 4px; }
.v4-internal-workspace { display: grid; gap: 18px; }
.v4-workflow-nav { display: flex; gap: 8px; margin: 0; padding: 4px 0 2px; overflow-x: auto; scrollbar-width: thin; }
.v4-workflow-nav a { min-height: 40px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 12px; color: var(--v4-muted) !important; border: 1px solid var(--v4-line); border-radius: 999px; background: var(--v4-card); font-size: var(--v4-font-secondary); font-weight: 850; text-decoration: none; }
.v4-workflow-nav a:hover, .v4-workflow-nav a:focus-visible { color: var(--v4-brand-text) !important; border-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-workflow-section { min-width: 0; scroll-margin-top: 16px; }
.v4-workflow-section > .v4-panel { margin: 0; }
.v4-table-wrap[tabindex]:focus-visible { outline: 3px solid var(--v4-brand); outline-offset: 3px; }
.v4-workflow-panel-body { display: grid; gap: 14px; padding: 16px; }
.v4-workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.v4-workflow-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.v4-workflow-help-item { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-card-soft); }
.v4-workflow-help-item strong { color: var(--v4-text); }
.v4-workflow-help-item span { color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-secondary-history { min-width: 0; overflow: hidden; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card); }
.v4-secondary-history > summary { padding: 14px 16px; color: var(--v4-text); cursor: pointer; font-weight: 850; }
.v4-secondary-history[open] > summary { border-bottom: 1px solid var(--v4-line); }
.v4-secondary-history-body { display: grid; gap: 14px; padding: 16px; }
.v4-cancel-action { min-width: min(100%, 280px); }
.v4-cancel-action > summary { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 12px; color: var(--v4-muted); border: 1px solid var(--v4-line); border-radius: 8px; background: var(--v4-card-soft); cursor: pointer; font-weight: 800; }
.v4-cancel-action[open] > summary { margin-bottom: 10px; }
.v4-cancel-action .inline-form { align-items: end; }
.v4-inline-handoff { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; width: 100%; }
.v4-inline-handoff label { display: grid; flex: 1 1 240px; gap: 5px; }
.v4-inline-handoff label span { color: var(--v4-muted); font-size: .8rem; font-weight: 700; }
.v4-inline-handoff input { width: 100%; }
.v4-commercial-stack { display: grid; gap: 16px; }
.v4-commercial-panel-body { min-width: 0; display: grid; gap: 14px; padding: 0 16px 16px; }
.v4-commercial-panel-body > .v4-summary-strip { margin-bottom: 0; }
.v4-commercial-panel-body > .v4-embedded-content,
.v4-commercial-panel-body > .v4-trace-details { min-width: 0; }
.v4-commercial-panel-body > .v4-form-actions { margin: 0; }
.v4-lock-notice { margin-bottom: 12px; padding: 11px 13px; color: var(--v4-blue); border: 1px solid color-mix(in srgb, var(--v4-blue) 35%, var(--v4-line)); border-radius: 10px; background: var(--v4-blue-soft); font-size: var(--v4-font-secondary); font-weight: 750; }
.v4-lock-notice-warn { color: var(--v4-amber); border-color: color-mix(in srgb, var(--v4-amber) 35%, var(--v4-line)); background: var(--v4-amber-soft); }
.v4-panel.v4-lock-action,
details.v4-lock-action { display: grid; border-color: color-mix(in srgb, var(--v4-amber) 35%, var(--v4-line)); }
details.v4-lock-action > summary { padding: 14px 16px; color: var(--v4-brand-text); background: var(--v4-red-soft); cursor: pointer; font-weight: 850; }
button.v4-lock-action { min-height: 40px; padding: 8px 12px; color: var(--v4-amber) !important; border: 1px solid var(--v4-amber) !important; border-radius: 8px; background: var(--v4-amber-soft) !important; font-weight: 850; cursor: pointer; }
button.v4-lock-action.danger { color: var(--v4-brand-text) !important; border-color: var(--v4-brand) !important; background: var(--v4-red-soft) !important; }
.v4-jo-direction-form { display: flex; align-items: center; gap: 6px; }
.v4-jo-direction-form select { min-width: 112px; min-height: 36px; }

/* Existing server workbenches rendered inside V4. Everything stays scoped. */
.v4-content .panel,
.v4-content .summary-card,
.v4-content details.collapsible-panel {
  border: 1px solid var(--v4-line);
  border-radius: 14px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
}
.v4-content .cockpit-kpi,
.v4-content .operation-cockpit-hero { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); box-shadow: var(--v4-shadow); }
.v4-content .panel { margin-bottom: 14px; }
.v4-content .panel-header,
.v4-content .section-header { border-bottom-color: var(--v4-line); }
.v4-content .panel-header h2,
.v4-content .panel-header h3,
.v4-content .section-header h2,
.v4-content .section-header h3 { color: var(--v4-text); }
.v4-content .muted { color: var(--v4-muted) !important; }
.v4-content .page-tab { color: var(--v4-muted); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .page-tab.active { color: var(--v4-text); border-color: var(--v4-brand); background: var(--v4-card); }
.v4-content .period-pill { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .period-pill.active { color: #fff; border-color: var(--v4-brand-strong); background: var(--v4-brand); }
.v4-content .period-custom-form { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); }
.v4-content .contract-summary,
.v4-content .linkage-card,
.v4-content .department-grid > div,
.v4-content .line-card,
.v4-content .quote-preview,
.v4-content .warning-list,
.v4-content .rate-guide-panel,
.v4-content .evidence-group,
.v4-content .document-upload,
.v4-content .master-assist-grid,
.v4-content .pod-upload-form,
.v4-content .cockpit-dispatch-row,
.v4-content .timeline-item,
.v4-content .metric-row,
.v4-content .module-card,
.v4-content .system-hero,
.v4-content .screen-watermark,
.v4-content .commercial-lock { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); }
.v4-content .dashboard-ready-strip > div,
.v4-content .audit-strip > div,
.v4-content .evidence-inline-upload,
.v4-content .quote-output-mode,
.v4-content .rate-guide-grid article,
.v4-content .rate-guide-note,
.v4-content .suggestion-strip,
.v4-content .price-reference-grid > div,
.v4-content .choice,
.v4-content .icon-btn,
.v4-content .attach-pop > summary { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .charge-line-total span { color: var(--v4-muted); }
.v4-content .charge-line-total strong { color: var(--v4-text); }
.v4-content .charge-card-heading { color: var(--v4-text); }
.v4-content .jo-create-selling .line-card { margin-top: 12px; }
.v4-content .jo-create-selling-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; padding: 14px 0 0; border-top: 1px solid var(--v4-line); }
.v4-content .jo-create-selling-total strong { color: var(--v4-text); }
.v4-content .jo-create-selling [data-create-source] { display: inline-flex; align-items: center; }
.v4-content .charge-advanced { border-color: var(--v4-line); }
.v4-content .charge-advanced > summary { color: var(--v4-brand-text); }
.v4-content .charge-advanced > summary:focus-visible { outline-color: color-mix(in srgb, var(--v4-brand) 28%, transparent); }
.v4-content .pricing-reference-details,
.v4-content .rate-guide-reference-details,
.v4-content .internal-costing-details { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .pricing-reference-details > summary,
.v4-content .rate-guide-reference-details > summary,
.v4-content .internal-costing-details > summary { color: var(--v4-text); }
.v4-content .pricing-reference-details > summary:focus-visible,
.v4-content .rate-guide-reference-details > summary:focus-visible,
.v4-content .internal-costing-details > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--v4-brand) 28%, transparent); outline-offset: -3px; }
.v4-content .pricing-reference-details[open] > summary,
.v4-content .rate-guide-reference-details[open] > summary,
.v4-content .internal-costing-details[open] > summary { border-bottom-color: var(--v4-line); background: var(--v4-card); }
.v4-content .pricing-disclosure-body { background: var(--v4-card); }
.v4-content .sticky-actions { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); box-shadow: 0 -8px 20px color-mix(in srgb, var(--v4-page) 70%, transparent); }
.v4-content .quotation-flex-app .sticky-actions { margin-right: 0; margin-left: 0; }
.v4-content .variance-reason-block { color: var(--v4-amber); border-color: color-mix(in srgb, var(--v4-amber) 35%, var(--v4-line)); background: var(--v4-amber-soft); }
.v4-content .status.ok { color: var(--v4-green-text); border-color: color-mix(in srgb, var(--v4-green-text) 32%, var(--v4-line)); background: var(--v4-green-soft); }
.v4-content .status.warn { color: var(--v4-amber-text); border-color: color-mix(in srgb, var(--v4-amber-text) 32%, var(--v4-line)); background: var(--v4-amber-soft); }
.v4-content .status.bad { color: var(--v4-brand-text); border-color: color-mix(in srgb, var(--v4-brand-text) 32%, var(--v4-line)); background: var(--v4-red-soft); }
.v4-content .check-list li { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .check-list li.is-missing { color: var(--v4-brand); border-color: color-mix(in srgb, var(--v4-brand) 32%, var(--v4-line)); background: var(--v4-red-soft); }
.v4-content .check-list li.is-ok { color: var(--v4-green); border-color: color-mix(in srgb, var(--v4-green) 32%, var(--v4-line)); background: var(--v4-green-soft); }
.v4-content .list-filter-bar,
.v4-content .filter-bar,
.v4-content .toolbar { border-color: var(--v4-line); border-radius: 10px; background: var(--v4-card-soft); }
.v4-content input,
.v4-content select,
.v4-content textarea { color: var(--v4-text); border-color: var(--v4-line); border-radius: 8px; background: var(--v4-card); }
@media screen {
  html[data-v4-theme="dark"] .v4-content label,
  html[data-v4-theme="dark"] .v4-content legend,
  html[data-v4-theme="dark"] .v4-content .ft-dd-label,
  html[data-v4-theme="dark"] .v4-content .fuel-toll-filter-grid label {
    color: var(--v4-form-label);
  }
  html[data-v4-theme="dark"] .v4-content .field-hint,
  html[data-v4-theme="dark"] .v4-content .driver-checklist-item legend small {
    color: var(--v4-form-helper);
  }
  html[data-v4-theme="dark"] .v4-content input::placeholder,
  html[data-v4-theme="dark"] .v4-content textarea::placeholder {
    color: var(--v4-form-placeholder);
    opacity: 1;
  }
}

/* Missing Tolls Phase 2: Admin-only, read-only parent/child preview. */
.v4-content .tng-missing-queue {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.v4-content .tng-missing-queue > *,
.v4-content .tng-missing-runs,
.v4-content .tng-missing-run {
  min-width: 0;
  max-width: 100%;
}

.v4-content .tng-missing-filters select[multiple] {
  min-height: 9rem;
}

.v4-content .tng-missing-runs {
  display: grid;
  gap: 10px;
}

.v4-content .tng-missing-run {
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
  overflow: hidden;
}

.v4-content .tng-missing-run > summary {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(150px, 1fr) minmax(190px, 1.3fr);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  cursor: pointer;
}

.v4-content .tng-missing-run > summary:focus-visible {
  outline: 3px solid var(--v4-blue);
  outline-offset: -3px;
}

.v4-content .tng-missing-card,
.v4-content .tng-missing-window {
  font-weight: 700;
}

.v4-content .tng-missing-child-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--v4-line);
}

.v4-content .tng-missing-children {
  min-width: 720px;
  margin: 0;
}

.v4-content .tng-missing-state {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--v4-line);
  border-radius: 999px;
  background: var(--v4-card);
  overflow-wrap: anywhere;
}

.v4-content .tng-missing-empty {
  margin: 0;
  padding: 18px 4px;
}

@media (max-width: 720px) {
  .v4-content .tng-missing-run > summary {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .v4-content .tng-missing-child-wrap {
    overflow: visible;
  }

  .v4-content .tng-missing-children,
  .v4-content .tng-missing-children tbody,
  .v4-content .tng-missing-children tr,
  .v4-content .tng-missing-children td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .v4-content .tng-missing-children thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .v4-content .tng-missing-children tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--v4-line);
  }

  .v4-content .tng-missing-children td {
    display: grid;
    grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
    gap: 8px;
    border: 0;
  }

  .v4-content .tng-missing-children td::before {
    content: attr(data-label);
    color: var(--v4-muted);
    font-weight: 600;
  }

  .v4-content .tng-missing-evidence-facts,
  .v4-content .tng-missing-metric-grid {
    grid-template-columns: 1fr;
  }

  .v4-content .tng-missing-map-canvas {
    height: 180px;
  }
}

.v4-content .tng-missing-evidence {
  display: grid;
  gap: 10px;
  margin: 4px 0 10px;
  padding: 12px 14px;
  border: 1px solid var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card);
}

.v4-content .tng-missing-evidence-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v4-content .tng-missing-evidence-header h4 {
  margin: 0;
}

.v4-content .tng-missing-evidence-reason {
  margin: 0;
}

.v4-content .tng-missing-evidence-facts,
.v4-content .tng-missing-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.v4-content .tng-missing-evidence-facts dt,
.v4-content .tng-missing-metric-grid dt {
  color: var(--v4-muted);
  font-size: .82rem;
  font-weight: 600;
}

.v4-content .tng-missing-evidence-facts dd,
.v4-content .tng-missing-metric-grid dd {
  margin: 0;
  word-break: break-word;
}

.v4-content .tng-missing-map {
  min-width: 0;
}

.v4-content .tng-missing-map-canvas {
  height: 0;
  border-radius: 8px;
}

.v4-content .tng-missing-map.has-map .tng-missing-map-canvas {
  height: 240px;
  border: 1px solid var(--v4-line);
}

.v4-content .tng-missing-point-list {
  margin: 6px 0 0;
  padding-left: 18px;
  max-height: 190px;
  overflow-y: auto;
  font-size: .86rem;
}

.v4-content .tng-missing-rate {
  padding: 10px 12px;
  border: 1px dashed var(--v4-line);
  border-radius: 8px;
  background: var(--v4-card-soft);
}

.v4-content .tng-missing-rate h4 {
  margin: 0 0 4px;
}

.v4-content .tng-missing-gate-list {
  display: grid;
  gap: 6px;
  margin: 6px 0 10px;
  padding-left: 0;
  list-style: none;
}
.v4-content input:focus,
.v4-content select:focus,
.v4-content textarea:focus { border-color: var(--v4-brand); box-shadow: 0 0 0 3px rgba(225, 27, 34, .1); outline: 0; }
.v4-content button,
.v4-content .button { border-radius: 8px; }
.v4-content button[type="submit"]:not(.secondary):not(.danger),
.v4-content .button:not(.secondary):not(.danger) { color: #fff !important; border-color: var(--v4-brand); background: var(--v4-brand); }
.v4-content button.secondary,
.v4-content .button.secondary { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .quote-step,
.v4-content .jo-step { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .quote-step.is-active,
.v4-content .jo-step.is-active { color: #fff; border-color: var(--v4-brand-strong); background: var(--v4-brand); }
.v4-content details.collapse-form > summary,
.v4-content details.trip-update-details > summary { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); box-shadow: var(--v4-shadow); }
.v4-content .trip-update-pop { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card); }
.v4-content .table-wrap,
.v4-content .v2-table-wrap { max-width: 100%; overflow-x: auto; border-color: var(--v4-line); }
.v4-content table { background: var(--v4-card); }
.v4-content table th { color: var(--v4-muted); background: var(--v4-card-soft); }
.v4-content table td { color: var(--v4-text); border-bottom-color: var(--v4-line); }
.v4-content table tbody tr:hover td { background: color-mix(in srgb, var(--v4-brand) 4%, var(--v4-card)); }
.v4-content .status { border-radius: 999px; }
.v4-content .pagination-bar { border-top-color: var(--v4-line); }
.v4-content .empty-state { border-color: var(--v4-line); background: var(--v4-card-soft); }
.v4-content .page-tabs,
.v4-content .actions { scrollbar-width: thin; }
.v4-content .leaflet-container { color: #17212d; }

.v4-login-body { min-height: 100vh; }
.v4-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.08fr) minmax(440px, .92fr); }
.v4-login-brand { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(38px, 7vw, 86px); color: #fff; background: linear-gradient(145deg, #b70f16 0%, #e11b22 58%, #ff555b 100%); }
.v4-login-brand img { width: min(300px, 72%); }
.v4-login-brand h1 { max-width: 650px; margin: 10px 0 14px; color: #fff; font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -.045em; }
.v4-login-brand p:not(.v4-eyebrow) { max-width: 570px; color: #ffe6e7; font-size: 16px; }
.v4-login-brand .v4-eyebrow { color: #fff; }
.v4-login-signals { display: flex; flex-wrap: wrap; gap: 8px; }
.v4-login-signals span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.v4-login-panel { display: grid; place-items: center; padding: 32px; background: var(--v4-page); }
.v4-login-card { width: min(460px, 100%); padding: 26px; border: 1px solid var(--v4-line); border-radius: 18px; background: var(--v4-card); box-shadow: 0 24px 70px rgba(15,23,42,.14); }
.v4-login-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v4-login-card h2 { margin: 4px 0 0; color: var(--v4-text); font-size: 29px; }
.v4-login-card p { color: var(--v4-muted); }
.v4-login-form { display: grid; gap: 14px; margin-top: 22px; }
.v4-login-form label { display: grid; gap: 6px; color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-login-form input { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--v4-text); border: 1px solid var(--v4-line); border-radius: 9px; background: var(--v4-card-soft); }
.v4-login-form button { min-height: 48px; color: #fff; border: 0; border-radius: 9px; background: linear-gradient(135deg, var(--v4-brand), #ff4c52); font-weight: 900; cursor: pointer; }
.v4-login-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 20px; font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-login-links a { color: var(--v4-brand-text); }
.portal-release-version { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 700; letter-spacing: .03em; }
.v4-login-links .portal-release-version { margin-left: auto; }
.v4-release-footer { padding: 8px 22px 14px; text-align: right; }

@media (max-width: 1024px) {
  .v4-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .v4-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-dashboard-grid { grid-template-columns: 1fr; }
  .v4-panel-wide { grid-column: auto; }
  .v4-search { max-width: 320px; }
  .v4-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-filter-bar.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-filter-bar > div, .v4-filter-actions { justify-content: flex-start; }
  .v4-record-layout { grid-template-columns: 1fr; }
  .v4-detail-columns { grid-template-columns: 1fr; }
  .v4-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-workflow-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-action-rail { position: static; }
  .v4-lifecycle { min-width: 660px; }
  .v4-record-head > div:first-child { width: 100%; min-width: 0; overflow-x: auto; }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .v4-topbar { align-items: flex-start; flex-wrap: wrap; }
  .v4-page-heading { min-width: 0; flex: 1 1 210px; }
  .v4-search { min-width: 0; flex: 1 1 100%; max-width: none; order: 3; }
  .v4-top-actions { flex: 0 0 auto; margin-left: auto; }
}

@media (max-width: 760px) {
  .v4-content .operator-validation-summary { position: static; max-height: none; }
  .v4-shell { display: block; }
  .v4-sidebar { min-height: auto; padding: 10px; overflow: hidden; }
  .v4-brand { display: flex; align-items: center; padding: 0 4px 9px; }
  .v4-brand img { width: 150px; }
  .v4-sidebar nav { display: flex; gap: 6px; max-width: calc(100vw - 20px); overflow-x: auto; padding-bottom: 3px; }
  .v4-nav-section { display: contents; }
  .v4-nav-label, .v4-brand-copy { display: none; }
  .v4-nav-link { flex: 0 0 auto; min-height: 36px; padding: 7px 9px; white-space: nowrap; }
  .v4-nav-link.is-active { order: -1; }
  .v4-topbar { align-items: stretch; flex-direction: column; padding: 12px 15px; }
  .v4-search { order: 3; width: 100%; max-width: none; }
  .v4-search-spacer { display: none; }
  .v4-top-actions { justify-content: space-between; }
  .v4-release-footer { padding: 8px 15px 12px; text-align: center; }
  .v4-content { padding: 15px; }
  .v4-page-actions { align-items: stretch; flex-direction: column; }
  .v4-page-actions > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .v4-page-actions .v4-row-action + .v4-primary-action { margin-left: 0; }
  .v4-action-tabs { max-width: 100%; overflow-x: auto; scroll-snap-type: x proximity; }
  .v4-action-tab { min-height: 44px; flex: 0 0 auto; scroll-snap-align: start; }
  .v4-maintenance-grid { grid-template-columns: 1fr; }
  .v4-maintenance-card button { min-height: 44px; }
  .v4-filter-bar { grid-template-columns: 1fr; }
  .v4-filter-bar.is-compact { grid-template-columns: 1fr; }
  .v4-filter-bar input,
  .v4-filter-bar select,
  .v4-filter-bar button { min-height: 44px; }
  .v4-filter-bar > div, .v4-filter-actions { justify-content: stretch; }
  .v4-filter-bar > div > *, .v4-filter-actions > * { flex: 1 1 auto; }
  .v4-record-head { align-items: stretch; flex-direction: column; }
  .v4-record-head-actions, .v4-record-actions { align-items: stretch; flex-direction: column; }
  .v4-record-head-actions > *, .v4-record-actions > * { width: 100%; }
  .v4-lifecycle { min-width: 620px; }
  .v4-record-layout { grid-template-columns: 1fr; }
  .v4-detail-columns { grid-template-columns: 1fr; }
  .v4-detail-grid { grid-template-columns: 1fr; }
  .v4-detail-grid dt { padding: 10px 0 3px; border-bottom: 0; }
  .v4-detail-grid dd { padding: 0 0 10px; }
  .v4-summary-strip { grid-template-columns: 1fr; }
  .v4-workflow-banner { grid-template-columns: 1fr; }
  .v4-form-grid { grid-template-columns: 1fr; }
  .v4-form-grid input,
  .v4-form-grid select,
  .v4-form-grid textarea,
  .v4-form-grid button { min-height: 44px; }
  .v4-form-wide { grid-column: auto; }
  .v4-content .quote-panel[data-panel="pricing"] > .panel-header.compact { flex-direction: column; align-items: stretch; }
  .v4-content .quote-panel[data-panel="pricing"] > .panel-header.compact > button { width: 100%; }
  .v4-form-actions, .v4-output-actions { align-items: stretch; flex-direction: column; }
  .v4-form-actions > *, .v4-output-actions > * { width: 100%; }
  .v4-workflow-help-grid { grid-template-columns: 1fr; }
  .v4-workflow-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .v4-workflow-nav a { width: 100%; min-height: 44px; justify-content: center; white-space: normal; text-align: center; }
  .v4-workflow-nav a:last-child { grid-column: 1 / -1; }
  .v4-workflow-panel-body, .v4-secondary-history-body { padding: 12px; }
  .operator-error-dialog-card { padding: 18px; }
  .v4-inline-handoff, .v4-inline-handoff button, .v4-inline-handoff .v4-secondary-action { width: 100%; }
  .v4-commercial-panel-body { padding: 0 12px 12px; }
  .v4-evidence-grid, .v4-send-grid { grid-template-columns: 1fr; }
  .v4-evidence-grid > :last-child, .v4-send-grid > :last-child { grid-column: auto; }
  .v4-lock-action { grid-template-columns: 1fr; }
  button.v4-lock-action { min-height: 44px; }
  .v4-action-tab,
  .v4-record-tab,
  .v4-primary-action,
  .v4-secondary-action,
  .v4-row-action { min-height: 44px; }
  .v4-row-action + .v4-row-action,
  .v4-row-action + .v4-primary-action,
  .v4-secondary-action + .v4-primary-action { margin-left: 0; }
  .v4-jo-direction-form { align-items: stretch; flex-direction: column; }
  .v4-jo-direction-form select { width: 100%; min-height: 44px; }
  .v4-kpi-grid { grid-template-columns: 1fr; }
  .v4-flow-row { grid-template-columns: 86px minmax(0, 1fr) 30px; }
  .v4-attention li { grid-template-columns: 32px minmax(0, 1fr); }
  .v4-attention li a { grid-column: 2; }
  .v4-login-shell { grid-template-columns: 1fr; }
  .v4-login-brand { min-height: 230px; padding: 28px 24px; }
  .v4-login-brand h1 { font-size: 34px; }
  .v4-login-brand p:not(.v4-eyebrow), .v4-login-signals { display: none; }
  .v4-login-panel { padding: 24px 18px 36px; }
  .v4-login-card { padding: 21px; }
  .v4-login-card-top { flex-direction: column; }
  .fleet-expiry-workspace .fleet-expiry-metrics { grid-template-columns: 1fr 1fr; }
  .fleet-expiry-workspace .fleet-expiry-metric:last-child { grid-column: 1 / -1; }
  .fleet-expiry-workspace .fleet-expiry-filters { grid-template-columns: 1fr 1fr; }
  .fleet-expiry-workspace .fleet-expiry-filters .field:first-of-type { grid-column: 1 / -1; }
  .fleet-expiry-workspace .fleet-expiry-filters .actions { grid-column: 1 / -1; }
  .fleet-expiry-workspace .fleet-expiry-table { display: none; }
  .fleet-expiry-workspace .fleet-expiry-cards { display: grid; gap: 10px; }
  .fleet-expiry-workspace .fleet-expiry-card {
    display: block;
    padding: 12px;
    border: 1px solid var(--v4-line);
    border-left: 4px solid var(--v4-brand);
    border-radius: 10px;
    background: var(--v4-card-soft);
  }
  .fleet-expiry-workspace .fleet-expiry-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .fleet-expiry-workspace .fleet-expiry-card header div { display: grid; gap: 2px; }
  .fleet-expiry-workspace .fleet-expiry-card header span:not(.status) { color: var(--v4-muted); font-size: var(--v4-font-meta); }
  .fleet-expiry-workspace .fleet-expiry-card p { margin: 9px 0 0; }
  .fleet-expiry-workspace .fleet-expiry-card footer { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--v4-line); }
  .fleet-expiry-workspace .fleet-expiry-card .button { min-height: 44px; }
  .fleet-expiry-workspace .fleet-preview-result > header { display: block; }
  .fleet-expiry-workspace .fleet-preview-result code { display: block; max-width: none; margin-top: 6px; }
  .v4-content .fleet-registry-tabs a,
  .fleet-expiry-workspace .fleet-preview-section-nav button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .fleet-expiry-workspace .fleet-preview-section-nav {
    align-items: stretch;
    flex-wrap: wrap;
  }
  .fleet-expiry-workspace .fleet-preview-section-table { display: none; }
  .fleet-expiry-workspace .fleet-preview-section-card {
    display: block;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-card-soft);
  }
  .fleet-expiry-workspace .fleet-preview-section-card.fleet-preview-fixed-pair {
    border-left: 4px solid var(--v4-blue);
    background: var(--v4-blue-soft);
  }
  .fleet-expiry-workspace .fleet-preview-section-card > div {
    display: grid;
    grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr);
    gap: 8px;
    padding: 7px 0;
    border-top: 1px solid var(--v4-line);
  }
  .fleet-expiry-workspace .fleet-preview-section-card > div > span {
    color: var(--v4-muted);
    font-size: var(--v4-font-meta);
  }
  .fleet-expiry-workspace .fleet-preview-section-card .button { min-height: 44px; }
  .fleet-expiry-workspace .fleet-preview-form input,
  .fleet-expiry-workspace .fleet-preview-form select,
  .fleet-expiry-workspace .fleet-preview-form button,
  .fleet-expiry-workspace .fleet-preview-form .button { min-height: 44px; }
}

@media screen {
  .v4-content table th,
  .v4-content .check-list span,
  .v4-content .attach-pop-cat,
  .v4-content .formal-office-addresses { font-size: var(--v4-font-meta); }
  .v4-content .check-list li { min-width: 0; align-items: flex-start; flex-wrap: wrap; }
  .v4-content .check-list span {
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .v4-content .check-list .is-ok,
  .v4-content .check-list li.is-ok { color: var(--v4-green-text); }
  .v4-content .check-list .is-missing,
  .v4-content .check-list li.is-missing { color: var(--v4-amber-text); }
  .v4-content .check-list .is-ok span { color: var(--v4-green-text); background: var(--v4-green-soft); }
  .v4-content .check-list .is-missing span { color: var(--v4-amber-text); background: var(--v4-amber-soft); }
  .v4-content .attach-pop-list {
    color: var(--v4-text);
    border-color: var(--v4-line);
    background: var(--v4-card);
  }
  .v4-content .attach-pop-row { color: var(--v4-text); border: 1px solid var(--v4-line); }
  .v4-content .attach-pop-row:hover,
  .v4-content .attach-pop-row:focus-visible { background: var(--v4-card-soft); }
  .v4-content .attach-pop-cat { color: var(--v4-muted); }
  .v4-content .attach-pop-row:hover .attach-pop-cat,
  .v4-content .attach-pop-row:focus-visible .attach-pop-cat { color: var(--v4-text); }
  .v4-content .formal-office-addresses strong { color: var(--v4-text); }
}

@media print {
  html[data-v4-theme] { color-scheme: light; }
  .v4-content {
    --v4-card: #fff;
    --v4-card-soft: #f6f6f6;
    --v4-text: #111;
    --v4-muted: #555;
    --v4-line: #ccc;
    --v4-green-soft: #eef8f3;
    --v4-amber-soft: #fff8e8;
    --v4-red-soft: #fff0f1;
  }
  .v4-sidebar, .v4-topbar, .v4-page-actions, .v4-theme-toggle, .v4-release-footer, .portal-release-version { display: none !important; }
  .v4-body, .v4-shell, .v4-main, .v4-content { display: block; padding: 0; background: #fff; color: #111; }
  .v4-panel, .v4-content .panel { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 700px) {
  .v4-content .jo-create-selling .form-grid.six { grid-template-columns: 1fr 1fr; }
  .v4-content .jo-create-selling .field.span-2 { grid-column: 1 / -1; }
}

/* Dedicated Monthly Report workspace. */
.v4-monthly-report { min-width: 0; color: var(--v4-text); }
.v4-report-heading { align-items: flex-start; }
.v4-report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.v4-report-actions button { cursor: pointer; }
.v4-report-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(135px, .7fr)) repeat(3, minmax(145px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
}
.v4-report-period label { min-width: 0; display: grid; gap: 5px; color: var(--v4-muted); font-size: var(--v4-font-secondary); font-weight: 800; }
.v4-report-period input, .v4-report-period select { width: 100%; min-height: 42px; }
.v4-report-or { align-self: center; color: var(--v4-muted); font-size: var(--v4-font-meta); text-align: center; }
.v4-report-section-nav { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding: 2px 0 5px; scrollbar-width: thin; }
.v4-report-section-nav a { min-height: 40px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 8px 12px; color: var(--v4-muted) !important; border: 1px solid var(--v4-line); border-radius: 999px; background: var(--v4-card); font-size: var(--v4-font-secondary); font-weight: 850; text-decoration: none; }
.v4-report-section-nav a:hover { color: var(--v4-brand-text) !important; border-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-report-empty { display: grid; gap: 3px; margin-bottom: 14px; padding: 14px 16px; color: var(--v4-blue); border: 1px solid color-mix(in srgb, var(--v4-blue) 32%, var(--v4-line)); border-radius: 12px; background: var(--v4-blue-soft); }
.v4-report-empty span { font-size: var(--v4-font-meta); }
.v4-report-group { min-width: 0; margin: 0 0 24px; scroll-margin-top: 12px; }
.v4-report-group-head { margin-bottom: 10px; }
.v4-report-group-head h2 { margin: 0; color: var(--v4-text); font-size: 18px; letter-spacing: -.02em; }
.v4-report-group-head p { margin: 3px 0 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-report-metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.v4-report-metric { min-width: 0; display: grid; gap: 4px; padding: 13px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card); box-shadow: var(--v4-shadow); }
.v4-report-metric span { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 850; text-transform: uppercase; }
.v4-report-metric strong { color: var(--v4-text); font-size: 17px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.v4-report-metric small { color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-report-metric.v4-tone-info strong { color: var(--v4-blue); }
.v4-report-metric.v4-tone-ok strong { color: var(--v4-green); }
.v4-report-metric.v4-tone-bad strong { color: var(--v4-brand-text); }
.v4-report-chart-grid, .v4-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v4-report-chart-wide, .v4-report-wide { grid-column: 1 / -1; }
.v4-report-chart-card { min-height: 220px; }
.v4-report-bars { display: grid; gap: 11px; padding: 16px; }
.v4-report-bar { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(130px, 1.5fr) minmax(110px, .7fr); align-items: center; gap: 9px; color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-report-bar > div { height: 11px; overflow: hidden; border-radius: 999px; background: var(--v4-card-soft); }
.v4-report-bar i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--v4-blue); }
.v4-report-bar i.v4-report-bar-billing { background: var(--v4-green); }
.v4-report-bar i.v4-report-bar-cost { background: var(--v4-amber); }
.v4-report-bar i.v4-report-bar-profit { background: var(--v4-brand); }
.v4-report-bar strong { color: var(--v4-text); text-align: right; overflow-wrap: anywhere; }
.v4-report-bar-compact { grid-template-columns: minmax(100px, .8fr) minmax(130px, 2fr) 45px; }
.v4-report-donut-layout { min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px; }
.v4-report-donut { width: 132px; height: 132px; display: grid; place-content: center; flex: 0 0 132px; border-radius: 50%; background: radial-gradient(circle at center, var(--v4-card) 0 47%, transparent 48%), conic-gradient(var(--v4-brand) 0 var(--v4-donut-stop), var(--v4-blue) var(--v4-donut-stop) 100%); text-align: center; }
.v4-report-donut strong { color: var(--v4-text); font-size: 23px; }
.v4-report-donut span { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-report-legend { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-report-legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 7px; }
.v4-report-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--v4-brand); }
.v4-report-legend li:nth-child(2) i { background: var(--v4-blue); }
.v4-report-table-card { min-width: 0; }
.v4-report-table-card .v4-table-wrap { max-width: 100%; overflow-x: auto; }
.v4-report-table-card .v4-data-table { min-width: 560px; }
.v4-report-table-card.v4-report-wide .v4-data-table { min-width: 760px; }
.v4-report-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v4-report-summary ul { display: grid; gap: 0; margin: 0; padding: 5px 16px 13px; list-style: none; }
.v4-report-summary li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--v4-muted); border-bottom: 1px solid var(--v4-line); font-size: var(--v4-font-meta); }
.v4-report-summary li:last-child { border-bottom: 0; }
.v4-report-summary li strong { color: var(--v4-text); }
.v4-report-summary li small { color: var(--v4-muted); }
.v4-report-action-panel { padding-bottom: 15px; }
.v4-report-action-panel .v4-report-actions { justify-content: flex-start; padding: 15px 16px 0; }

@media (max-width: 1100px) {
  .v4-report-period { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v4-report-or { display: none; }
  .v4-report-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v4-report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .v4-monthly-report { max-width: 100%; overflow: hidden; }
  .v4-report-heading, .v4-report-heading .v4-report-actions { align-items: stretch; }
  .v4-report-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .v4-report-actions > * { width: 100%; min-height: 44px; }
  .v4-report-period { grid-template-columns: 1fr; }
  .v4-report-period input, .v4-report-period select, .v4-report-period button { min-height: 44px; }
  .v4-report-section-nav { max-width: 100%; scroll-snap-type: x proximity; }
  .v4-report-section-nav a { min-height: 44px; scroll-snap-align: start; }
  .v4-report-metrics, .v4-report-chart-grid, .v4-report-grid, .v4-report-summary-grid { grid-template-columns: 1fr; }
  .v4-report-chart-wide, .v4-report-wide { grid-column: auto; }
  .v4-report-bar { grid-template-columns: 1fr 52px; }
  .v4-report-bar > div { grid-column: 1 / -1; grid-row: 2; }
  .v4-report-bar strong { grid-column: 2; grid-row: 1; }
  .v4-report-donut-layout { flex-direction: column; }
  .v4-expense-donut { grid-template-columns: 1fr; padding: 15px; }
  .v4-expense-donut svg { width: min(72vw, 220px); }
  .v4-expense-donut li { grid-template-columns: 12px minmax(0, 1fr); }
  .v4-expense-donut li strong + * { grid-column: 2; }
}

@media print {
  .v4-monthly-report { color: #111; background: #fff; }
  .v4-monthly-report .v4-report-heading { display: flex !important; margin-bottom: 12px; }
  .v4-monthly-report .v4-report-period,
  .v4-monthly-report .v4-report-section-nav,
  .v4-monthly-report .v4-report-actions { display: none !important; }
  .v4-monthly-report .v4-report-group { break-before: auto; break-inside: auto; margin-bottom: 18px; }
  .v4-monthly-report .v4-panel,
  .v4-monthly-report .v4-report-metric { color: #111; border-color: #bbb; background: #fff; box-shadow: none; break-inside: avoid; }
  .v4-monthly-report .v4-report-metric strong,
  .v4-monthly-report .v4-panel h2,
  .v4-monthly-report table td { color: #111 !important; }
  .v4-monthly-report .v4-table-wrap { overflow: visible; }
  .v4-monthly-report .v4-data-table { min-width: 0; font-size: 8pt; }
  .v4-monthly-report .v4-report-donut { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* V4 Dispatch workspace */
.v4-dispatch-tabs {
  display: flex;
  gap: 6px;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}
.v4-dispatch-tabs .v4-action-tab {
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 88px;
  font-size: var(--v4-font-secondary);
}
.v4-dispatch-tabs .v4-action-tab:focus-visible,
.v4-dispatch-card a:focus-visible,
.v4-dispatch-week-scroll:focus-visible,
.v4-dispatch-month-scroll:focus-visible,
.v4-dispatch-list-wrap:focus-visible {
  outline: 3px solid var(--v4-brand);
  outline-offset: 2px;
}

.v4-dispatch-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
}
.v4-dispatch-toolbar form {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.v4-dispatch-toolbar label,
.v4-dispatch-list-filters label {
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
  font-weight: 800;
}
.v4-dispatch-toolbar input,
.v4-dispatch-toolbar button,
.v4-dispatch-list-filters input,
.v4-dispatch-list-filters select,
.v4-dispatch-list-filters button {
  min-height: 40px;
}
.v4-dispatch-toolbar input { min-width: 150px; }
.v4-dispatch-toolbar .v4-page-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin: 0;
}
.v4-dispatch-toolbar .v4-page-actions .button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v4-dispatch-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.v4-dispatch-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.v4-dispatch-lane {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--v4-line);
  border-radius: 13px;
  background: var(--v4-card-soft);
  box-shadow: var(--v4-shadow);
}
.v4-dispatch-lane > header,
.v4-dispatch-week-day > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--v4-line);
  background: var(--v4-card);
}
.v4-dispatch-lane > header h2 { margin: 0; color: var(--v4-text); font-size: var(--v4-font-secondary); }
.v4-dispatch-lane > header span,
.v4-dispatch-week-day > header span {
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--v4-muted);
  background: var(--v4-card-soft);
  font-size: var(--v4-font-meta);
  font-weight: 900;
}
.v4-lane-assignment { border-top-color: var(--v4-amber); }
.v4-lane-ready { border-top-color: var(--v4-green); }
.v4-lane-transit { border-top-color: var(--v4-blue); }
.v4-lane-attention { border-top-color: var(--v4-brand); }
.v4-lane-cards,
.v4-dispatch-week-cards { display: grid; gap: 9px; padding: 9px; }
.v4-lane-empty {
  min-height: 90px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--v4-muted);
  border: 1px dashed var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card);
  font-size: var(--v4-font-meta);
  text-align: center;
}

.v4-dispatch-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 12px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 11px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
}
.v4-dispatch-card.v4-signal-assignment { border-left: 5px solid var(--v4-amber); }
.v4-dispatch-card.v4-signal-ready { border-left: 5px solid var(--v4-green); }
.v4-dispatch-card.v4-signal-transit { border-left: 5px solid var(--v4-blue); }
.v4-dispatch-card.v4-signal-attention { border-left: 5px solid var(--v4-brand); }
.v4-dispatch-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  color: var(--v4-muted);
  font-size: var(--v4-font-secondary);
}
.v4-dispatch-card-head strong { color: var(--v4-brand-text); font-size: var(--v4-font-secondary); }
.v4-dispatch-card h3 { margin: 0; color: var(--v4-text); font-size: var(--v4-font-body); line-height: 1.25; overflow-wrap: anywhere; }
.v4-dispatch-card > p { margin: 0; color: var(--v4-muted); font-size: var(--v4-font-meta); overflow-wrap: anywhere; }
.v4-dispatch-card dl { display: grid; gap: 6px; margin: 0; }
.v4-dispatch-card dl > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(64px, .65fr) minmax(0, 1.35fr);
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--v4-line);
}
.v4-dispatch-card dt { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-dispatch-card dd { min-width: 0; margin: 0; color: var(--v4-text); font-size: var(--v4-font-meta); overflow-wrap: anywhere; }
.v4-dispatch-card-secondary { padding-top: 2px; }
.v4-dispatch-gps { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; color: var(--v4-muted); font-size: var(--v4-font-meta); }
.v4-dispatch-attention {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-left-width: 4px;
  border-radius: 9px;
  font-size: var(--v4-font-meta);
  font-weight: 650;
  line-height: 1.45;
}
.v4-dispatch-attention strong { font-weight: 850; }
.v4-dispatch-attention.v4-tone-ok { color: var(--v4-text); border-left-color: var(--v4-green); background: var(--v4-green-soft); }
.v4-dispatch-attention.v4-tone-warn { color: var(--v4-text); border-left-color: var(--v4-amber); background: var(--v4-amber-soft); }
.v4-dispatch-attention.v4-tone-bad { color: var(--v4-text); border-left-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-dispatch-card .v4-card-actions { display: flex; align-items: stretch; flex-wrap: wrap; gap: 7px; }
.v4-dispatch-card .v4-card-actions .button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 110px;
  margin: 0;
  padding: 7px 9px;
  font-size: var(--v4-font-secondary);
}
.v4-dispatch-card-compact { gap: 7px; padding: 10px; }
.v4-dispatch-card-compact h3 { font-size: var(--v4-font-body); }
.v4-dispatch-card-compact .v4-card-actions .button { flex-basis: 100%; }

.v4-calendar-day-jumps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.v4-calendar-day-jumps a,
.v4-movement-jumps a,
.v4-movement-jumps span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  color: var(--v4-text) !important;
  border: 1px solid var(--v4-line);
  border-radius: 9px;
  background: var(--v4-card);
  font-size: var(--v4-font-secondary);
  font-weight: 800;
  text-decoration: none;
}
.v4-calendar-day-jumps small,
.v4-movement-jumps small { color: var(--v4-muted); white-space: nowrap; }
.v4-movement-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.v4-movement-jumps > * { flex: 1 1 190px; }
.v4-dispatch-toolbar ~ .v4-empty-state,
.v4-dispatch-list-wrap .v4-empty-state {
  min-height: 112px;
  display: grid;
  place-content: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 18px;
  color: var(--v4-muted);
  border: 1px dashed var(--v4-line);
  border-radius: 11px;
  background: var(--v4-card-soft);
  text-align: center;
}
.v4-dispatch-toolbar ~ .v4-empty-state strong,
.v4-dispatch-list-wrap .v4-empty-state strong { color: var(--v4-text); }

.v4-dispatch-week-scroll,
.v4-dispatch-month-scroll,
.v4-dispatch-list-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
}
.v4-dispatch-week {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(7, minmax(240px, 1fr));
  gap: 9px;
  padding: 9px;
}
.v4-dispatch-week-day {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--v4-line);
  border-radius: 11px;
  background: var(--v4-card-soft);
}
.v4-dispatch-week-day.is-empty { opacity: .68; }
.v4-dispatch-week-day.has-movement { border-left: 5px solid var(--v4-green); }
.v4-dispatch-week-day.has-assignment { border-left-color: var(--v4-amber); }
.v4-dispatch-week-day.has-transit { border-left-color: var(--v4-blue); }
.v4-dispatch-week-day.is-ready { border-left-color: var(--v4-green); }
.v4-dispatch-week-day.has-attention { border-left-color: var(--v4-brand); }
.v4-content .v4-dispatch-week-day.is-today { outline: 3px solid var(--v4-brand); outline-offset: -3px; }
.v4-dispatch-week-day > header a { color: var(--v4-text) !important; font-size: var(--v4-font-secondary); font-weight: 900; text-decoration: none; }
.v4-dispatch-week-summary {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-bottom: 1px solid var(--v4-line);
}
.v4-dispatch-week-status { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-dispatch-week-day.is-empty .v4-dispatch-week-status { color: var(--v4-text); }
.v4-dispatch-week-day.has-assignment .v4-dispatch-week-status { color: var(--v4-amber-text); }
.v4-dispatch-week-day.has-transit .v4-dispatch-week-status { color: var(--v4-blue-text); }
.v4-dispatch-week-day.is-ready .v4-dispatch-week-status { color: var(--v4-green-text); }
.v4-dispatch-week-day.has-attention .v4-dispatch-week-status { color: var(--v4-brand-text); }

.v4-dispatch-month {
  min-width: 784px;
  overflow: hidden;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card);
}
.v4-dispatch-month > header { padding: 13px 14px; border-bottom: 1px solid var(--v4-line); }
.v4-dispatch-month > header h2 { margin: 0; color: var(--v4-text); font-size: 15px; }
.v4-dispatch-month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  border-bottom: 1px solid var(--v4-line);
  background: var(--v4-card-soft);
}
.v4-dispatch-month-weekdays span { padding: 8px; color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 900; text-align: center; text-transform: uppercase; }
.v4-dispatch-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
}
.v4-dispatch-month-day {
  min-height: 102px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 9px;
  color: var(--v4-text) !important;
  border-right: 1px solid var(--v4-line);
  border-bottom: 1px solid var(--v4-line);
  background: var(--v4-card);
  font-size: var(--v4-font-meta);
  text-decoration: none;
}
.v4-dispatch-month-day:nth-child(7n) { border-right: 0; }
.v4-dispatch-month-date { font-size: 14px; font-weight: 900; }
.v4-dispatch-month-day.is-empty { opacity: .68; }
.v4-dispatch-month-day.has-movement { border-left: 5px solid var(--v4-green); }
.v4-dispatch-month-day.has-attention { border-left-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-dispatch-month-count { margin-top: 9px; color: var(--v4-text); font-size: 22px; line-height: 1; }
.v4-dispatch-month-status { color: var(--v4-muted); font-size: var(--v4-font-meta); font-weight: 800; }
.v4-dispatch-month-day.is-empty .v4-dispatch-month-status { color: var(--v4-text); }
.v4-dispatch-month-day.is-ready .v4-dispatch-month-status { color: var(--v4-green-text); }
.v4-dispatch-month-day.has-attention .v4-dispatch-month-status {
  width: fit-content;
  padding: 3px 6px;
  color: var(--v4-brand-text);
  border: 1px solid color-mix(in srgb, var(--v4-brand) 24%, var(--v4-line));
  border-radius: 6px;
  background: var(--v4-red-soft);
}
.v4-dispatch-month-day.is-outside-month { color: var(--v4-muted) !important; background: var(--v4-card-soft); opacity: .72; }
.v4-dispatch-month-day.is-outside-month.has-movement,
.v4-dispatch-month-day.is-outside-month.has-attention { opacity: 1; }
.v4-dispatch-month-day.is-outside-month.has-attention { background: var(--v4-red-soft); }
.v4-dispatch-month-day.is-today { box-shadow: inset 0 0 0 3px var(--v4-brand); }
.v4-dispatch-month-day:hover { background: var(--v4-red-soft); }

.v4-dispatch-list-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
}
.v4-dispatch-list-filters .field { min-width: 0; display: grid; gap: 5px; }
.v4-dispatch-list-filters input,
.v4-dispatch-list-filters select { width: 100%; }
.v4-dispatch-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
  padding: 10px;
}
.v4-dispatch-list-wrap + .pagination-bar {
  margin-top: 10px;
  border: 1px solid var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card);
}

html[data-v4-theme="dark"] .v4-content .v4-dispatch-tabs,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-lane,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-card,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-day,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-list-wrap + .pagination-bar {
  color: var(--v4-text);
  border-color: var(--v4-line);
  background: var(--v4-card);
}
html[data-v4-theme="dark"] .v4-content .v4-dispatch-toolbar,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-list-filters,
html[data-v4-theme="dark"] .v4-content .v4-lane-empty,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-day.is-outside-month {
  color: var(--v4-text);
  border-color: var(--v4-line);
  background: var(--v4-card-soft);
}
html[data-v4-theme="dark"] .v4-content .v4-dispatch-toolbar input,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-list-filters input,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-list-filters select {
  color: var(--v4-text);
  border-color: var(--v4-line);
  background: var(--v4-card);
}
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-scroll,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-scroll,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-list-wrap {
  color: var(--v4-text);
  border-color: var(--v4-line);
  background: var(--v4-card-soft);
}
html[data-v4-theme="dark"] .v4-content .v4-dispatch-attention { color: var(--v4-text); }
html[data-v4-theme="dark"] .v4-content .v4-dispatch-card.v4-signal-ready,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day.is-ready,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day.has-movement,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-day.has-movement { border-left-color: var(--v4-green); }
html[data-v4-theme="dark"] .v4-content .v4-dispatch-card.v4-signal-assignment,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day.has-assignment { border-left-color: var(--v4-amber); }
html[data-v4-theme="dark"] .v4-content .v4-dispatch-card.v4-signal-transit,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day.has-transit { border-left-color: var(--v4-blue); }
html[data-v4-theme="dark"] .v4-content .v4-dispatch-card.v4-signal-attention,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-week-day.has-attention,
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-day.has-attention {
  color: var(--v4-text);
  border-left-color: var(--v4-brand);
}
html[data-v4-theme="dark"] .v4-content .v4-dispatch-month-day.has-attention { background: var(--v4-red-soft); }

@media (max-width: 1100px) {
  .v4-dispatch-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-dispatch-list-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-dispatch-list-filters button { justify-self: stretch; }
}

@media (max-width: 760px) {
  .v4-dispatch-tabs { scroll-snap-type: x proximity; }
  .v4-dispatch-tabs .v4-action-tab { scroll-snap-align: start; }
  .v4-dispatch-toolbar {
    align-items: stretch;
    flex-direction: column;
    max-width: 100%;
  }
  .v4-dispatch-toolbar form,
  .v4-dispatch-list-filters { width: 100%; }
  .v4-dispatch-toolbar form { align-items: stretch; }
  .v4-dispatch-toolbar form input,
  .v4-dispatch-toolbar form button { flex: 1 1 140px; }
  .v4-dispatch-toolbar .v4-page-actions {
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }
  .v4-dispatch-toolbar .v4-page-actions .button { flex: 1 1 140px; min-height: 44px; }
  .v4-dispatch-toolbar input,
  .v4-dispatch-toolbar button,
  .v4-dispatch-toolbar .button,
  .v4-dispatch-list-filters input,
  .v4-dispatch-list-filters select,
  .v4-dispatch-list-filters button { min-height: 44px; }
  .v4-dispatch-metrics,
  .v4-dispatch-board { grid-template-columns: 1fr; }
  .v4-dispatch-list-filters { grid-template-columns: 1fr; }
  .v4-dispatch-list-filters .field,
  .v4-dispatch-list-filters button { width: 100%; }
  .v4-calendar-day-jumps { grid-template-columns: 1fr; }
  .v4-calendar-day-jumps a,
  .v4-movement-jumps a,
  .v4-movement-jumps span { min-height: 44px; }
  .v4-movement-jumps { align-items: stretch; flex-direction: column; }
  .v4-movement-jumps > * { flex-basis: auto; }
  .v4-dispatch-card { overflow-wrap: anywhere; }
  .v4-dispatch-card dl > div { grid-template-columns: minmax(72px, .6fr) minmax(0, 1.4fr); }
  .v4-dispatch-card .v4-card-actions .button { min-height: 44px; }
  .v4-dispatch-week-scroll,
  .v4-dispatch-month-scroll,
  .v4-dispatch-list-wrap { max-width: 100%; overflow-x: auto; }
  .v4-dispatch-list { grid-template-columns: minmax(0, 1fr); padding: 8px; }
}

.v4-lifecycle-step span { position: relative; z-index: 1; justify-self: start; background: var(--v4-card); padding: 0 6px 0 2px; }

.v4-content .v4-embedded-content .operation-stop-summary { padding: 0 16px 16px; }
.v4-content .v4-embedded-content .operation-stop-summary h3 { margin-top: 10px; }

.v4-content .ft-filter-bar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.v4-content .ft-field { display: grid; gap: 4px; min-width: 0; }
.v4-content .ft-field > span { font-size: var(--v4-font-meta, 12px); font-weight: 700; color: var(--v4-muted); }
.v4-content .ft-field-grow { flex: 1 1 220px; }
.v4-content .ft-field-actions { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.v4-content .ft-filter-bar .fuel-toll-filter-chips { flex-basis: 100%; }
.v4-content .ft-dd { position: relative; }
.v4-content .ft-dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-card); min-width: 150px; }
.v4-content .ft-dd > summary::-webkit-details-marker { display: none; }
.v4-content .ft-dd > summary::after { content: "\25BE"; margin-left: auto; color: var(--v4-muted); font-size: 11px; }
.v4-content .ft-dd[data-active="1"] > summary { border-color: var(--v4-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v4-brand) 15%, transparent); }
.v4-content .ft-dd-label { font-size: var(--v4-font-meta, 12px); font-weight: 700; color: var(--v4-muted); white-space: nowrap; }
.v4-content .ft-dd-value { font-size: var(--v4-font-secondary, 13px); color: var(--v4-text); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-content .ft-dd-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 280px; max-width: 82vw; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); padding: 10px; display: grid; gap: 8px; }
.v4-content .ft-dd-search { width: 100%; }
.v4-content .ft-dd-list { max-height: 260px; overflow: auto; display: grid; gap: 2px; }
.v4-content .ft-dd-opt { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: var(--v4-font-secondary, 13px); cursor: pointer; }
.v4-content .ft-dd-opt:hover { background: color-mix(in srgb, var(--v4-brand) 8%, transparent); }
.v4-content .ft-dd-opt input[type="checkbox"] { width: 15px; height: 15px; flex: 0 0 auto; }
.v4-content .ft-dd-opt.is-hidden { display: none; }
.v4-content .ft-dd-actions { display: flex; justify-content: space-between; gap: 8px; }

/* TNG Phase 0 read-only sequence and masked corridor analysis. */
.v4-content .tng-analysis-page { display: grid; gap: 14px; min-width: 0; }
.v4-content .tng-analysis-page > * { min-width: 0; }
.v4-content .tng-analysis-notice { margin: 0; }
.v4-content .tng-analysis-controls { margin-top: 12px; }
.v4-content .tng-analysis-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.v4-content .tng-analysis-kpi { min-width: 0; padding: 14px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card); display: grid; gap: 6px; }
.v4-content .tng-analysis-kpi > span { color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); font-weight: 700; }
.v4-content .tng-analysis-kpi > strong { color: var(--v4-text); overflow-wrap: anywhere; }
.v4-content .tng-analysis-kpi > small { color: var(--v4-muted); }
.v4-content .tng-analysis-kpi.is-reliable { border-color: var(--v4-green); }
.v4-content .tng-analysis-kpi.is-partial { border-color: var(--v4-amber); }
.v4-content .tng-analysis-kpi.is-unreliable { border-color: var(--v4-red); }
.v4-content .tng-analysis-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v4-content .tng-analysis-counts > div { min-width: 0; padding: 12px; border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-card-soft); }
.v4-content .tng-analysis-counts h3 { margin: 0 0 8px; color: var(--v4-text); }
.v4-content .tng-analysis-counts span { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; color: var(--v4-muted); }
.v4-content .tng-analysis-table { max-width: 100%; overflow-x: auto; }
.v4-content .tng-analysis-table table { min-width: 780px; }

@media (max-width: 900px) {
  .v4-content .tng-analysis-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .v4-content .tng-analysis-kpis,
  .v4-content .tng-analysis-counts { grid-template-columns: 1fr; }
  .v4-content .tng-analysis-controls .ft-field-actions { width: 100%; flex-wrap: wrap; }
  .v4-content .tng-analysis-controls .ft-field-actions > * { flex: 1 1 150px; min-height: 44px; }
}

/* Recon-only suspect duplicate window. Missing sequence numbers now live in
   TNG Gaps instead of being mixed into the Toll transaction ledger. */
.v4-content .toll-duplicate-risk-row td { background: var(--v4-red-soft); border-top: 1px dashed color-mix(in srgb, var(--v4-brand) 45%, transparent); border-bottom: 1px dashed color-mix(in srgb, var(--v4-brand) 45%, transparent); }

@media (max-width: 700px) {
  .v4-content .ft-filter-bar { align-items: stretch; }
  .v4-content .ft-field,
  .v4-content .ft-dd > summary { width: 100%; }
  .v4-content .ft-dd-pop { width: 100%; }
}

/* V4 unified vehicle workspace */
.v4-vehicle-intro,
.v4-vehicle-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v4-vehicle-intro p,
.v4-vehicle-detail-head p { margin: 4px 0 0; color: var(--v4-muted); }
.v4-vehicle-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; margin: 18px 0; }
.v4-vehicle-filters label,
.v4-vehicle-doc-search label,
.v4-vehicle-history-filter label { display: grid; gap: 5px; min-width: 0; color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); font-weight: 700; }
.v4-vehicle-filters input,
.v4-vehicle-filters select,
.v4-vehicle-doc-search input,
.v4-vehicle-history-filter input,
.v4-vehicle-history-filter select { width: 100%; min-width: 0; }
.v4-vehicle-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--v4-line); border-radius: 12px; }
.v4-vehicle-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.v4-vehicle-table th,
.v4-vehicle-table td { padding: 11px 12px; border-bottom: 1px solid var(--v4-line); text-align: left; vertical-align: middle; }
.v4-vehicle-table tbody tr:last-child td { border-bottom: 0; }
.v4-vehicle-id { font-weight: 800; }
.v4-vehicle-document-link { display: grid; gap: 5px; color: inherit; text-decoration: none; }
.v4-vehicle-document-summary { max-width: 260px; color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); line-height: 1.35; }
.v4-vehicle-document-link:hover .v4-vehicle-document-summary,
.v4-vehicle-document-link:focus-visible .v4-vehicle-document-summary { color: var(--v4-text); }
.v4-vehicle-tabs { display: flex; gap: 4px; max-width: 100%; margin: 18px 0 0; overflow-x: auto; border-bottom: 1px solid var(--v4-line); }
.v4-vehicle-tab { flex: 0 0 auto; padding: 10px 12px; border-bottom: 3px solid transparent; color: var(--v4-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.v4-vehicle-tab.is-active { border-bottom-color: var(--v4-brand); color: var(--v4-text); }
.v4-vehicle-detail-body { min-width: 0; padding: 20px 0; overflow-wrap: anywhere; }
.v4-vehicle-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.v4-vehicle-fact { display: grid; gap: 5px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--v4-line); }
.v4-vehicle-fact span { color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); }
.v4-vehicle-shortcuts { margin: 8px 0 20px; padding: 14px 16px; border-left: 3px solid var(--v4-amber); background: var(--v4-card-soft); }
.v4-vehicle-shortcuts h3 { margin-top: 0; }
.v4-vehicle-guidance,
.v4-vehicle-safe-notice,
.v4-empty { color: var(--v4-muted); }
.v4-vehicle-safe-notice { padding: 18px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.v4-vehicle-note { display: inline-block; margin-left: 5px; color: var(--v4-muted); font-size: 11px; font-weight: 400; }
.v4-vehicle-document-attention { margin-bottom: 18px; padding: 16px; border: 1px solid var(--v4-amber); border-radius: 12px; background: var(--v4-card-soft); }
.v4-vehicle-document-attention h3 { margin: 0; }
.v4-vehicle-document-attention > p { margin: 6px 0 14px; color: var(--v4-muted); }
.v4-vehicle-document-attention ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v4-vehicle-document-attention li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--v4-line); }
.v4-vehicle-document-attention li > div { display: grid; gap: 3px; min-width: 0; }
.v4-vehicle-document-attention li span { color: var(--v4-muted); font-size: var(--v4-font-secondary, 13px); }
.v4-vehicle-photo { max-width: 760px; margin: 0 0 18px; }
.v4-vehicle-photo img { display: block; width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.v4-vehicle-photo figcaption { margin-top: 8px; color: var(--v4-muted); font-size: var(--v4-font-secondary, 13px); }
.v4-vehicle-doc-search,
.v4-vehicle-history-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.v4-vehicle-doc-search label { flex: 1 1 260px; }
.v4-vehicle-history-filter label { flex: 1 1 210px; }
.v4-vehicle-history { display: grid; }
.v4-vehicle-history-item { display: grid; grid-template-columns: minmax(140px, .35fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--v4-line); }
.v4-vehicle-history-item time,
.v4-vehicle-history-item span { color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); }
.v4-vehicle-history-item p { margin: 4px 0; color: var(--v4-muted); }

/* Fleet Registry trailer profile. Mirrors the prime-mover profile layout so both
   asset profiles read the same on a phone, a tablet and a wide desk screen. */
.v4-trailer-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v4-trailer-detail-head p { margin: 4px 0 0; color: var(--v4-muted); }
.v4-trailer-attention-line { font-weight: 700; }
.v4-trailer-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; max-width: 100%; }
.v4-trailer-document-link { color: inherit; text-decoration: none; }
.v4-trailer-tabs { display: flex; gap: 4px; max-width: 100%; margin: 18px 0 0; overflow-x: auto; border-bottom: 1px solid var(--v4-line); }
.v4-trailer-tab { flex: 0 0 auto; padding: 10px 12px; border-bottom: 3px solid transparent; color: var(--v4-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.v4-trailer-tab.is-active { border-bottom-color: var(--v4-brand); color: var(--v4-text); }
.v4-trailer-detail-body { min-width: 0; padding: 20px 0; overflow-wrap: anywhere; }
.v4-trailer-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.v4-trailer-fact { display: grid; gap: 5px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--v4-line); }
.v4-trailer-fact span { color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); }
.v4-trailer-shortcuts { margin: 8px 0 20px; padding: 14px 16px; border-left: 3px solid var(--v4-amber); background: var(--v4-card-soft); }
.v4-trailer-shortcuts h3 { margin-top: 0; }
.v4-trailer-guidance { color: var(--v4-muted); }
.v4-trailer-safe-notice { padding: 18px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.v4-trailer-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--v4-line); border-radius: 12px; }
.v4-trailer-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.v4-trailer-table th,
.v4-trailer-table td { padding: 11px 12px; border-bottom: 1px solid var(--v4-line); text-align: left; vertical-align: middle; }
.v4-trailer-table tbody tr:last-child td { border-bottom: 0; }
.v4-trailer-document-attention { margin-bottom: 18px; padding: 16px; border: 1px solid var(--v4-amber); border-radius: 12px; background: var(--v4-card-soft); }
.v4-trailer-document-attention h3 { margin: 0; }
.v4-trailer-document-attention > p { margin: 6px 0 14px; color: var(--v4-muted); }
.v4-trailer-document-attention ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.v4-trailer-document-attention li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 8px; border-top: 1px solid var(--v4-line); }
.v4-trailer-document-attention li > div { display: grid; gap: 3px; min-width: 0; }
.v4-trailer-document-attention li span { color: var(--v4-muted); font-size: var(--v4-font-secondary, 13px); }
.v4-trailer-photo { max-width: 760px; margin: 0 0 18px; }
.v4-trailer-photo img { display: block; width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.v4-trailer-photo figcaption { margin-top: 8px; color: var(--v4-muted); font-size: var(--v4-font-secondary, 13px); }
.v4-trailer-doc-search,
.v4-trailer-history-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.v4-trailer-doc-search label,
.v4-trailer-history-filter label { display: grid; gap: 5px; min-width: 0; color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); font-weight: 700; }
.v4-trailer-doc-search label { flex: 1 1 260px; }
.v4-trailer-history-filter label { flex: 1 1 210px; }
.v4-trailer-doc-search input,
.v4-trailer-history-filter input,
.v4-trailer-history-filter select { width: 100%; min-width: 0; }
.v4-trailer-history { display: grid; }
.v4-trailer-history-item { display: grid; grid-template-columns: minmax(140px, .35fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--v4-line); }
.v4-trailer-history-item time,
.v4-trailer-history-item span { color: var(--v4-muted); font-size: var(--v4-font-meta, 12px); }
.v4-trailer-history-item p { margin: 4px 0; color: var(--v4-muted); }

@media (max-width: 900px) {
  .v4-vehicle-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-vehicle-filters button { width: 100%; }
  .v4-vehicle-facts,
  .v4-trailer-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .v4-vehicle-intro,
  .v4-vehicle-detail-head,
  .v4-trailer-detail-head { flex-direction: column; }
  .v4-trailer-chips { justify-content: flex-start; }
  .v4-vehicle-filters,
  .v4-vehicle-facts,
  .v4-trailer-facts { grid-template-columns: minmax(0, 1fr); }
  .v4-vehicle-tabs,
  .v4-trailer-tabs { margin-inline: -4px; padding-inline: 4px; }
  .v4-vehicle-history-item,
  .v4-trailer-history-item { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .v4-vehicle-doc-search,
  .v4-vehicle-history-filter,
  .v4-trailer-doc-search,
  .v4-trailer-history-filter { align-items: stretch; flex-direction: column; }
  .v4-vehicle-doc-search label,
  .v4-vehicle-history-filter label,
  .v4-trailer-doc-search label,
  .v4-trailer-history-filter label { flex-basis: auto; }
  .v4-vehicle-document-attention li,
  .v4-trailer-document-attention li { align-items: stretch; flex-direction: column; }
  .v4-vehicle-document-attention .button,
  .v4-trailer-document-attention .button { width: 100%; text-align: center; }
}
/* A2/B monthly compliance workspace */
.a2b-filter-form { margin-bottom: 16px; }
.a2b-count-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.v4-content .a2b-count-card { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.v4-content .a2b-count-card strong { color: var(--v4-text); font-size: 24px; }
.v4-content .a2b-count-card span { color: var(--v4-a2b-summary-label); font-size: 13px; }
.a2b-inline-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 3px 0; }
.a2b-inline-action input[type="text"], .a2b-inline-action input:not([type]) { min-width: 210px; }
.a2b-gap-ack { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; line-height: 1.45; }
.a2b-gap-ack input { width: 22px; height: 22px; flex: 0 0 auto; }
.a2b-finalise-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.a2b-appendix-duty { break-inside: avoid-page; }
.a2b-appendix-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.a2b-appendix-meta > div { display: grid; gap: 4px; padding: 10px; border: 1px solid #d0d5dd; border-radius: 10px; }
.a2b-appendix-meta span { color: #667085; font-size: 12px; }
.a2b-appendix-evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0; }
.a2b-appendix-evidence > div { padding: 10px; border: 1px solid #d0d5dd; border-radius: 10px; }
.a2b-appendix-evidence h3 { margin-top: 0; }
.a2b-appendix-list { margin: 0; padding-left: 18px; }
.a2b-appendix-list li + li { margin-top: 7px; }
.v4-content .status[class*="a2b-state-"] { font-weight: 800; }
.v4-content .a2b-state-pass { color: var(--v4-green-text); border-color: var(--v4-green); background: var(--v4-green-soft); }
.v4-content :is(.a2b-state-fail, .a2b-state-missing, .a2b-state-rejected) { color: var(--v4-brand-text); border-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-content :is(.a2b-state-open, .a2b-state-pending, .a2b-state-admin, .a2b-state-multiple, .a2b-state-incomplete, .a2b-state-unverified) { color: var(--v4-amber-text); border-color: var(--v4-amber); background: var(--v4-amber-soft); }
.v4-content :is(.a2b-state-no-record, .a2b-state-n-a) { color: var(--v4-blue-text); border-color: var(--v4-blue); background: var(--v4-blue-soft); }
@media (max-width: 640px) {
  .a2b-count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a2b-appendix-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a2b-inline-action { display: grid; }
}

/* Official JKKP A2/B print pack: eight fixed A4 landscape pages. */
@page fleet-a2b { size: A4 landscape; margin: 7mm; }
.fleet-a2b-print-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fleet-a2b-print { color: #000; background: #fff; font-family: Arial, "Noto Sans", sans-serif; }
.fleet-a2b-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 283mm;
  min-height: 196mm;
  margin: 0 auto 8mm;
  padding: 3.5mm;
  color: #000;
  border: .25mm solid #000;
  background: #fff;
  page: fleet-a2b;
  page-break-inside: avoid;
  break-inside: avoid-page;
  page-break-after: always;
  break-after: page;
}
.fleet-a2b-form-head { position: relative; min-height: 16mm; margin-bottom: 2mm; text-align: center; }
.fleet-a2b-form-head h1 { margin: 1.5mm 0 0; font-size: 12pt; line-height: 1.15; text-transform: uppercase; }
.fleet-a2b-company { display: grid; gap: .5mm; font-size: 8pt; line-height: 1.2; }
.fleet-a2b-form-meta { position: absolute; top: 0; right: 0; display: grid; gap: 1mm; min-width: 42mm; padding: 1.2mm; border: .2mm solid #000; font-size: 7.5pt; text-align: left; }
.fleet-a2b-day-block { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin-top: 1.5mm; }
.fleet-a2b-day-heading { display: flex; justify-content: space-between; gap: 4mm; padding: 1mm 1.5mm; border: .2mm solid #000; border-bottom: 0; font-size: 8pt; font-weight: 700; }
.fleet-a2b-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 6.6pt; line-height: 1.15; }
.fleet-a2b-grid th,
.fleet-a2b-grid td { overflow-wrap: anywhere; padding: .7mm 1mm; border: .2mm solid #000; vertical-align: middle; }
.fleet-a2b-grid th { background: #eee; font-weight: 700; text-align: center; }
.fleet-a2b-grid .a2b-question-head,
.fleet-a2b-grid tbody th { width: 76mm; text-align: left; }
.fleet-a2b-grid .a2b-result-cell,
.fleet-a2b-grid .a2b-meter-cell { text-align: center; }
.fleet-a2b-grid .a2b-category { display: block; margin-bottom: .4mm; font-size: 5.8pt; font-weight: 400; text-transform: uppercase; }
.fleet-a2b-grid .a2b-sign-row th,
.fleet-a2b-grid .a2b-sign-row td { height: 8mm; font-size: 6pt; }
.fleet-a2b-print-footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3mm; margin-top: auto; padding-top: 1.5mm; font-size: 6.5pt; }
.fleet-a2b-print-footer span:nth-child(2) { text-align: center; }
.fleet-a2b-print-footer span:last-child { text-align: right; }
.fleet-a2b-supplement { min-height: 196mm; }

.fleet-upload-status {
  min-height: 44px;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card-soft);
  overflow-wrap: anywhere;
}
.fleet-upload-status.is-working { color: var(--v4-text); }
.fleet-upload-status.is-ready { color: var(--v4-green-text); }
.fleet-upload-status.is-error { color: var(--v4-brand-text); }

/* JO-first Shipment Planning workspace. */
.shipment-planning-grid { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.shipment-planning-queue { position: static; min-width: 0; align-self: start; }
.shipment-planning-queue .v4-panel { margin: 0; }
.shipment-planning-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border-top: 1px solid var(--v4-line); border-bottom: 1px solid var(--v4-line); }
.shipment-planning-filters label:first-of-type { grid-column: 1 / -1; }
.shipment-planning-filters label, .shipment-planning-form label, .shipment-planning-request-grid label { display: grid; gap: 5px; min-width: 0; }
.shipment-planning-filters label > span, .shipment-planning-form label > span, .shipment-planning-request-grid label > span { color: var(--v4-muted); font-size: 12px; font-weight: 700; }
.shipment-planning-queue-list, .shipment-planning-movement-list, .shipment-planning-request-list { display: grid; gap: 10px; padding: 12px; }
.shipment-planning-queue-list { gap: 8px; padding: 10px; }
.shipment-planning-queue-card { display: grid; gap: 4px; padding: 10px 12px; color: inherit; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); text-decoration: none; }
.shipment-planning-queue-card:hover, .shipment-planning-queue-card.is-selected { border-color: var(--v4-brand); box-shadow: inset 3px 0 0 var(--v4-brand); }
.shipment-planning-queue-top, .shipment-planning-queue-facts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.shipment-planning-queue-card small { color: var(--v4-muted); }
.shipment-planning-reason { color: var(--v4-brand-text) !important; }
.shipment-planning-detail { display: grid; gap: 16px; min-width: 0; }
.shipment-planning-record-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--v4-line); border-radius: 14px; background: var(--v4-card); }
.shipment-planning-head-facts { display: grid; grid-template-columns: auto auto; gap: 5px 14px; align-items: baseline; }
.shipment-planning-head-facts span { color: var(--v4-muted); font-size: 12px; }
.shipment-planning-stop-grid, .shipment-planning-cargo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.shipment-planning-stop-card, .shipment-planning-cargo-card, .shipment-planning-movement-card, .shipment-planning-request-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--v4-line); border-radius: 12px; background: var(--v4-card-soft); }
.shipment-planning-stop-card header, .shipment-planning-movement-card header, .shipment-planning-movement-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; }
.shipment-planning-stop-card h3, .shipment-planning-stop-card p, .shipment-planning-cargo-card p { margin: 0; }
.shipment-planning-movement-card header > div { display: grid; gap: 5px; }
.shipment-planning-movement-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 12px; margin: 0; }
.shipment-planning-movement-card dt { color: var(--v4-muted); }
.v4-current-pod,
.v4-current-pod-empty {
  min-width: 0;
  margin-top: 5px;
}
.v4-current-pod {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.v4-current-pod span,
.v4-current-pod small {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.v4-current-pod small,
.v4-current-pod-empty {
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
}
.shipment-planning-confirm { display: grid; gap: 8px; }
.shipment-planning-confirm label { display: grid; gap: 4px; min-width: min(100%, 280px); }
.shipment-planning-confirm label span { color: var(--v4-muted); font-size: 12px; }
.shipment-planning-execution { border-top: 1px solid var(--v4-line); }
.shipment-planning-execution > summary { padding: 10px 0; cursor: pointer; font-weight: 800; }
.shipment-planning-execution form { padding-top: 6px; }
.shipment-planning-warning { margin: 0; padding: 9px 10px; color: var(--v4-brand-text); border-radius: 8px; background: var(--v4-brand-soft); }
.shipment-planning-form { scroll-margin-top: 90px; }
.shipment-planning-form > summary, .shipment-planning-request-grid summary { padding: 16px; cursor: pointer; font-weight: 800; }
.shipment-planning-form form, .shipment-planning-request-grid form { padding: 0 16px 16px; }
.shipment-planning-allocation { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--v4-line); border-radius: 10px; }
.shipment-planning-allocation-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px !important; align-items: center; }
.shipment-planning-allocation-row > span { display: grid; gap: 3px; }
.shipment-planning-allocation-row small { color: var(--v4-muted); }
.shipment-planning-request-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shipment-planning-urgent { border-color: var(--v4-brand); }
.shipment-planning-mobile-back { display: none; }

.fleet-grace-banner, .fleet-grace-control { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 16px; padding: 14px 16px; color: var(--v4-amber-text); border: 1px solid var(--v4-amber); border-radius: 12px; background: var(--v4-amber-soft); }
.fleet-grace-banner p, .fleet-grace-control p { margin: 4px 0 0; }
.fleet-grace-summary { display: grid; gap: 3px; text-align: right; }
.fleet-grace-banner a { color: inherit; font-weight: 800; }
.fleet-document-correction { display: inline-block; min-width: min(440px, 72vw); vertical-align: top; }
.fleet-document-correction > summary { list-style: none; }
.fleet-document-correction form { margin-top: 8px; padding: 12px; border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-card); }
.v4-content .fleet-version-current { color: var(--v4-green-text); border-color: var(--v4-green); background: var(--v4-green-soft); }
.v4-content .fleet-version-superseded { color: var(--v4-text); border-color: var(--v4-muted); background: var(--v4-card-soft); }
.v4-content .fleet-version-cancelled { color: var(--v4-brand-text); border-color: var(--v4-brand); background: var(--v4-red-soft); }
.v4-content .fleet-version-unknown { color: var(--v4-text); border-color: var(--v4-line); background: var(--v4-card-soft); }
.fleet-readiness-provisional { color: var(--v4-amber-text); border-color: var(--v4-amber); background: var(--v4-amber-soft); }

@media (max-width: 900px) {
  .shipment-planning-grid { grid-template-columns: minmax(0, 1fr); }
  .shipment-planning-queue { position: static; max-height: none; }
  .shipment-planning-record-head { grid-template-columns: minmax(0, 1fr); }
  .shipment-planning-mobile-back { display: inline-flex; width: fit-content; }
}

@media (max-width: 640px) {
  .shipment-planning-filters, .shipment-planning-request-grid { grid-template-columns: minmax(0, 1fr); }
  .shipment-planning-filters label:first-of-type { grid-column: auto; }
  .shipment-planning-stop-grid, .shipment-planning-cargo-grid { grid-template-columns: minmax(0, 1fr); }
  .shipment-planning-allocation-row { grid-template-columns: minmax(0, 1fr) 92px; }
  .fleet-grace-banner, .fleet-grace-control { align-items: flex-start; flex-direction: column; }
  .fleet-grace-summary { text-align: left; }
  .fleet-document-correction { min-width: 100%; }
}

@media print {
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .v4-sidebar, .v4-topbar, .v4-mobile-bar, .fleet-a2b-print-actions { display: none !important; }
  .v4-shell, .v4-main, .v4-content { display: block !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .fleet-a2b-page { overflow: hidden; width: 283mm; height: 194mm; min-height: 194mm; max-height: 194mm; margin: 0; box-shadow: none; }
}
/* TNG Phase 1 shadow pilot: contained desktop grids and touch-friendly review cards. */
.tng-shadow-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
}

.tng-shadow-grid > * {
  min-width: 0;
}

.tng-shadow-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tng-shadow-summary-card,
.tng-shadow-review-card {
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  padding: 12px;
}

.tng-shadow-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tng-shadow-review-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.tng-shadow-review-card:focus-within {
  outline: 3px solid var(--v4-blue);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .tng-shadow-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tng-shadow-review-card {
    width: 100%;
    min-height: 52px;
  }
}

/* TNG Stage A company rate study: aggregate, masked and read-only evidence. */
.v4-content .tng-rate-study-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.v4-content .tng-rate-study-page > * {
  min-width: 0;
  max-width: 100%;
}

.v4-content .tng-rate-study-page code {
  overflow-wrap: anywhere;
}

.v4-content #tng-rate-source .panel-header {
  flex-wrap: wrap;
}

.v4-content #tng-rate-source .panel-header > div {
  min-width: 0;
  flex: 1 1 260px;
}

.v4-content .tng-rate-study-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
}

.v4-content .tng-rate-study-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--v4-line);
  border-radius: 12px;
  background: var(--v4-card-soft);
}

.v4-content .tng-rate-study-summary strong,
.v4-content .tng-rate-study-summary code,
.v4-content .tng-rate-study-variant {
  overflow-wrap: anywhere;
}

.v4-content .tng-rate-study-table {
  max-width: 100%;
  overflow-x: auto;
}

.v4-content .tng-rate-study-table table {
  min-width: 880px;
}

.v4-content .tng-rate-study-variant {
  min-width: 260px;
  padding: 8px 0;
  border-bottom: 1px solid var(--v4-line);
}

.v4-content .tng-rate-study-variant:last-child {
  border-bottom: 0;
}

.v4-content .tng-study-tabs {
  margin-bottom: 16px;
}

.v4-content .tng-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.v4-content .tng-evidence-grid .panel {
  margin: 0;
}

.v4-content .tng-evidence-preview > h1 {
  margin: 0;
  font-size: 1.35rem;
}

@media (max-width: 1100px) {
  .v4-content .tng-rate-study-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .v4-content .tng-evidence-grid {
    grid-template-columns: 1fr;
  }

  .v4-content .tng-rate-study-summary {
    grid-template-columns: 1fr;
  }

  .v4-content .tng-rate-study-filters input,
  .v4-content .tng-rate-study-filters select,
  .v4-content .tng-rate-study-filters button,
  .v4-content .tng-rate-study-filters .button,
  .v4-content .tng-rate-study-page .pagination-bar .button,
  .v4-content .tng-rate-study-page .paging-size {
    min-height: 44px;
  }
}

@media screen and (max-width: 760px) {
  .card-master-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-master-filters input,
  .card-master-filters select,
  .card-master-filters button,
  .card-master-panel button,
  .card-master-panel .button {
    min-height: 44px;
  }
}

/* Unified Fleet Assets */
.v4-fleet-assets-panel,
.v4-fleet-assets-panel .v4-panel-body,
.v4-fleet-asset-table-wrap,
.v4-fleet-asset-mobile-cards,
.v4-fleet-renewal-form {
  min-width: 0;
  max-width: 100%;
}

.v4-fleet-asset-view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 100%;
  margin-bottom: 12px;
  overflow: visible;
}

.v4-fleet-asset-view-tabs .page-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--v4-line);
  border-radius: 8px;
  background: var(--v4-card-soft);
}

.v4-fleet-asset-view-tabs .page-tab span {
  flex: 0 0 auto;
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
  font-variant-numeric: tabular-nums;
}

.v4-fleet-asset-view-tabs .page-tab.active,
.v4-fleet-asset-view-tabs .page-tab[aria-current="page"] {
  color: var(--v4-brand-text);
  border-color: var(--v4-brand);
  background: var(--v4-red-soft);
}

.v4-fleet-asset-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--v4-blue);
  background: var(--v4-blue-soft);
}

.v4-fleet-asset-summary strong {
  color: var(--v4-blue-text);
  font-size: 1rem;
  white-space: nowrap;
}

.v4-fleet-asset-summary p {
  margin: 0;
  color: var(--v4-text);
  font-size: var(--v4-font-secondary);
}

.v4-fleet-asset-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(125px, 1fr)) auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--v4-line);
  border-radius: 10px;
  background: var(--v4-card-soft);
}

.v4-fleet-asset-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--v4-muted);
  font-size: var(--v4-font-secondary);
  font-weight: 800;
}

.v4-fleet-asset-filters input,
.v4-fleet-asset-filters select,
.v4-fleet-asset-filters button {
  width: 100%;
  min-height: 40px;
}

.v4-fleet-asset-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.v4-fleet-asset-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
  border-collapse: collapse;
}

.v4-fleet-asset-table th,
.v4-fleet-asset-table td {
  padding: 10px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.v4-fleet-asset-table thead th {
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
  letter-spacing: .04em;
  text-align: left;
  text-transform: uppercase;
}

.v4-fleet-asset-table thead th:nth-child(1) { width: 12%; }
.v4-fleet-asset-table thead th:nth-child(2) { width: 11%; }
.v4-fleet-asset-table thead th:nth-child(3) { width: 14%; }
.v4-fleet-asset-table thead th:nth-child(4) { width: 11%; }
.v4-fleet-asset-table thead th:nth-child(5) { width: 14%; }
.v4-fleet-asset-table thead th:nth-child(6) { width: 29%; }
.v4-fleet-asset-table thead th:nth-child(7) { width: 9%; }

.v4-fleet-asset-table tbody th > span,
.v4-fleet-asset-table td > small,
.v4-fleet-asset-permit small {
  display: block;
  margin-top: 3px;
  color: var(--v4-muted);
  font-size: var(--v4-font-meta);
  font-weight: 500;
}

.v4-fleet-asset-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 7px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 8px;
  background: var(--v4-card-soft);
  font-size: var(--v4-font-meta);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.v4-fleet-asset-type-badge.is-truck {
  color: var(--v4-blue-text);
  border-color: var(--v4-blue);
  background: var(--v4-blue-soft);
}

.v4-fleet-asset-type-badge.is-trailer {
  color: var(--v4-amber-text);
  border-color: var(--v4-amber);
  background: var(--v4-amber-soft);
}

.v4-fleet-asset-assignment,
.v4-fleet-asset-weight {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: var(--v4-font-secondary);
}

.v4-fleet-asset-assignment span,
.v4-fleet-asset-weight span {
  color: var(--v4-muted);
}

.v4-fleet-asset-assignment strong,
.v4-fleet-asset-weight strong {
  color: var(--v4-text);
}

.v4-fleet-asset-permits {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v4-fleet-asset-permit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--v4-line);
}

.v4-fleet-asset-permit > div:first-child {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.v4-fleet-asset-permit strong {
  color: var(--v4-text);
  overflow-wrap: break-word;
  word-break: normal;
}

.v4-fleet-asset-permit .v4-chip {
  max-width: 100%;
  border: 1px solid var(--v4-line);
  overflow-wrap: break-word;
  word-break: normal;
}

.v4-fleet-asset-permit .v4-chip.v4-chip-ok {
  color: var(--v4-green-text);
  border-color: var(--v4-green);
  background: var(--v4-green-soft);
}

.v4-fleet-asset-permit .v4-chip.v4-chip-warn {
  color: var(--v4-amber-text);
  border-color: var(--v4-amber);
  background: var(--v4-amber-soft);
}

.v4-fleet-asset-permit .v4-chip.v4-chip-bad {
  color: var(--v4-brand-text);
  border-color: var(--v4-brand);
  background: var(--v4-red-soft);
}

.v4-fleet-asset-permit > .button,
.v4-fleet-asset-permit > .actions .button {
  min-height: 36px;
  padding: 7px 9px;
  white-space: nowrap;
}

.v4-fleet-asset-mobile-cards {
  display: none;
}

.v4-fleet-asset-card {
  min-width: 0;
  max-width: 100%;
}

.v4-fleet-renewal-form {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--v4-line);
  border-bottom: 1px solid var(--v4-line);
}

.v4-fleet-renewal-form h3,
.v4-fleet-renewal-form .fleet-upload-status,
.v4-fleet-renewal-form .actions {
  margin: 0;
}

.v4-fleet-renewal-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.v4-fleet-renewal-form .field {
  min-width: 0;
}

.v4-fleet-renewal-form .span-2 {
  grid-column: 1 / -1;
}

@media (min-width: 761px) and (max-width: 1200px) {
  .v4-fleet-asset-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v4-fleet-asset-filters label,
  .v4-fleet-asset-filters input,
  .v4-fleet-asset-filters select,
  .v4-fleet-asset-filters button {
    min-width: 0;
    max-width: 100%;
  }

  .v4-fleet-asset-filters button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .v4-fleet-asset-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v4-fleet-asset-view-tabs .page-tab {
    min-height: 44px;
    white-space: normal;
  }

  .v4-fleet-asset-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .v4-fleet-asset-summary strong {
    white-space: normal;
  }

  .v4-fleet-asset-filters {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
  }

  .v4-fleet-asset-filters label,
  .v4-fleet-asset-filters input,
  .v4-fleet-asset-filters select,
  .v4-fleet-asset-filters button {
    min-width: 0;
    max-width: 100%;
  }

  .v4-fleet-asset-filters input,
  .v4-fleet-asset-filters select,
  .v4-fleet-asset-filters button {
    min-height: 44px;
  }

  .v4-fleet-asset-filters button {
    width: 100%;
  }

  .v4-fleet-asset-table-wrap {
    display: none;
  }

  .v4-fleet-asset-mobile-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    max-width: 100%;
  }

  .v4-fleet-asset-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--v4-line);
    border-radius: 10px;
    background: var(--v4-card);
  }

  .v4-fleet-asset-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .v4-fleet-asset-card header > div {
    min-width: 0;
  }

  .v4-fleet-asset-card h3,
  .v4-fleet-asset-card h3 a {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .v4-fleet-asset-card header > .v4-chip {
    flex: 0 0 auto;
  }

  .v4-fleet-asset-card header span:not(.v4-chip):not(.v4-fleet-asset-type-badge),
  .v4-fleet-asset-card > p,
  .v4-fleet-asset-card h4 {
    margin: 0;
    color: var(--v4-muted);
    font-size: var(--v4-font-meta);
  }

  .v4-fleet-asset-card h3 {
    margin: 2px 0 0;
  }

  .v4-fleet-asset-card section,
  .v4-fleet-asset-card footer {
    min-width: 0;
    padding-top: 9px;
    border-top: 1px solid var(--v4-line);
  }

  .v4-fleet-asset-card footer .button {
    width: 100%;
    min-height: 44px;
  }

  .v4-fleet-asset-permits {
    grid-template-columns: minmax(0, 1fr);
  }

  .v4-fleet-asset-permit {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-width: 0;
    max-width: 100%;
  }

  .v4-fleet-asset-permit > .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .v4-fleet-asset-permit > .actions .button {
    width: 100%;
    min-height: 44px;
  }

  .v4-fleet-asset-permit > .button {
    width: 100%;
    min-height: 44px;
  }

  .v4-fleet-renewal-form .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .v4-fleet-renewal-form .span-2 {
    grid-column: auto;
  }

  .v4-fleet-renewal-form input,
  .v4-fleet-renewal-form select,
  .v4-fleet-renewal-form textarea,
  .v4-fleet-renewal-form button {
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
  }

  .v4-fleet-renewal-form .actions,
  .v4-fleet-renewal-form .actions button {
    width: 100%;
  }
}
/* End Unified Fleet Assets */

/* 2026-08-06 attachment correction controls (V4 surface). Mirrors the classic
   panel so the same three actions read the same way in both presentations. */
.v4-content .doc-actions { max-width: 320px; }
.v4-content .doc-actions > summary { cursor: pointer; padding: 4px 9px; border: 1px solid var(--v4-line); border-radius: 9px; background: var(--v4-surface); font-weight: 800; font-size: .82rem; list-style: none; }
.v4-content .doc-actions > summary::-webkit-details-marker { display: none; }
.v4-content .doc-actions-body { display: grid; gap: 11px; margin-top: 8px; }
.v4-content .doc-action-form { display: grid; gap: 5px; padding: 9px; border: 1px solid var(--v4-line); border-radius: 10px; background: var(--v4-surface-2, var(--v4-surface)); }
.v4-content .doc-action-form label { font-weight: 800; font-size: .78rem; }
.v4-content .doc-action-form input, .v4-content .doc-action-form select { width: 100%; }
.v4-content .doc-action-form button { justify-self: start; }
.v4-content .doc-action-form button.danger { color: var(--v4-brand-text) !important; border-color: var(--v4-brand) !important; background: var(--v4-red-soft) !important; }

/* Missing Tolls Phase 5 governed review and immutable ledger presentation. */
.v4-content .tng-missing-staff-row > td { background: var(--v4-surface-2, #f7f9fc); padding: 1rem; }
.v4-content .tng-missing-staff-actions,
.v4-content .tng-missing-reconciliation,
.v4-content .tng-missing-cost-history { display: grid; gap: .75rem; max-width: 72rem; }
.v4-content .tng-missing-action-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; padding: .75rem; border: 1px solid var(--v4-line); border-radius: .75rem; }
.v4-content .tng-missing-global-history .table-wrap { overflow-x: auto; }
.v4-content .tng-derived-cost { border-inline-start: .3rem solid var(--v4-brand); }
@media (max-width: 720px) {
  .v4-content .tng-missing-action-form,
  .v4-content .tng-missing-action-form label,
  .v4-content .tng-missing-action-form button { width: 100%; }
}

/* Authenticated Requirements Review pilot. */
.v4-content #requirements-review-top {
  --v4-requirement-link: #bd1118;
  --v4-requirement-link-hover: #b20f17;
  min-width: 0;
}
html[data-v4-theme="dark"] .v4-content #requirements-review-top {
  --v4-requirement-link: #ff8f93;
  --v4-requirement-link-hover: #ffb3b6;
}
.v4-content #requirements-review-top a:not(.button) {
  color: var(--v4-requirement-link);
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}
.v4-content #requirements-review-top a:not(.button):hover,
.v4-content #requirements-review-top a:not(.button):focus-visible {
  color: var(--v4-requirement-link-hover);
}
.v4-content #requirements-review-top a:not(.button):focus-visible {
  outline-color: var(--v4-blue-text);
}
.v4-content .requirement-card {
  min-width: 0;
  padding: 15px 16px;
  color: var(--v4-text);
  border: 1px solid var(--v4-line);
  border-radius: 8px;
  background: var(--v4-card);
  box-shadow: var(--v4-shadow);
}
.v4-content #requirements-review-top .v4-hero-card,
.v4-content #requirements-review-top .requirement-detail-hero,
.v4-content #requirements-review-top .requirement-detail-hero-copy,
.v4-content #requirements-review-top .v4-card-heading > div,
.v4-content #requirements-review-top .document-list,
.v4-content #requirements-review-top .document-list li {
  min-width: 0;
}
.v4-content #requirements-review-top .requirement-queue-card h2,
.v4-content #requirements-review-top .requirement-queue-card h2 a,
.v4-content #requirements-review-top .requirement-queue-card p,
.v4-content #requirements-review-top .requirement-detail-title,
.v4-content #requirements-review-top .requirement-current-wording,
.v4-content #requirements-review-top .requirement-latest-reason,
.v4-content #requirements-review-top .requirement-comment > p,
.v4-content #requirements-review-top .requirement-parent-excerpt p,
.v4-content #requirements-review-top .requirement-reviewed-wording p,
.v4-content #requirements-review-top .requirement-history-item p,
.v4-content #requirements-review-top .document-list li,
.v4-content #requirements-review-top .document-list a {
  overflow-wrap: anywhere;
  word-break: normal;
}
.v4-content details.requirement-card > summary,
.v4-content .requirement-upload-form > summary {
  margin: -15px -16px 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--v4-line);
  cursor: pointer;
}
.v4-content .requirement-queue-card { border-inline-start: .3rem solid var(--v4-brand); }
.v4-content .requirement-queue-card h2 { margin: .2rem 0 .5rem; font-size: 1.08rem; }
.v4-content .requirement-current-wording { max-width: 74ch; white-space: normal; font-size: 1.02rem; line-height: 1.7; }
.v4-content .requirement-comment { border-inline-start: .25rem solid var(--v4-brand); }
.v4-content .requirement-comment.is-reply { margin-inline-start: 2rem; border-inline-start-color: var(--v4-line); }
.v4-content .requirement-comment:target { outline: 3px solid color-mix(in srgb, var(--v4-blue) 45%, transparent); outline-offset: 2px; }
.v4-content .requirement-parent-excerpt { display: grid; gap: .25rem; margin: .7rem 0; padding: .6rem .75rem; border: 1px solid var(--v4-line); border-radius: 8px; background: var(--v4-card-soft); }
.v4-content .requirement-parent-excerpt strong { color: var(--v4-text); font-size: var(--v4-font-meta); }
.v4-content .requirement-parent-excerpt p { margin: 0; color: var(--v4-muted); font-size: var(--v4-font-secondary); }
.v4-content .requirement-reviewed-wording { padding: .6rem .75rem; border: 1px solid var(--v4-line); border-radius: 8px; background: var(--v4-card-soft); }
.v4-content .requirement-reviewed-wording > summary { cursor: pointer; font-weight: 800; }
.v4-content .requirement-detail-columns { align-items: start; }
.v4-content .requirement-decision-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.v4-content .requirement-decision { display: grid; gap: .25rem; min-width: 0; padding: .75rem; border: 1px solid var(--v4-line); border-radius: 8px; background: var(--v4-card-soft); }
.v4-content .requirement-decision span { font-weight: 850; }
.v4-content .requirement-decision small { color: var(--v4-muted); overflow-wrap: anywhere; }
.v4-content .requirement-history-item { min-width: 0; padding: .75rem 0; border-bottom: 1px solid var(--v4-line); }
.v4-content .requirement-history-item:last-child { border-bottom: 0; }
.v4-content .requirement-upload-form { padding-top: .6rem; border-top: 1px solid var(--v4-line); }
.v4-content .requirement-changelog-region { overflow-x: auto; }
.v4-content .requirement-changelog-region:focus-visible { outline: 3px solid color-mix(in srgb, var(--v4-blue) 45%, transparent); outline-offset: 2px; }
.v4-content .document-list { display: grid; gap: .8rem; padding-inline-start: 1.2rem; }
.v4-content .v4-requirement-form textarea { resize: vertical; }
@media (max-width: 720px) {
  .v4-content .requirement-comment.is-reply { margin-inline-start: .75rem; }
  .v4-content .requirement-detail-columns { grid-template-columns: minmax(0, 1fr); }
  .v4-content .requirement-decision-grid { grid-template-columns: minmax(0, 1fr); }
}
