.dossier-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dossier-tile strong,
.dossier-tile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dossier-tile strong {
  color: var(--ink);
  font-size: 15px;
}

.dossier-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dossier-tile.status-tile {
  border-color: rgba(12, 116, 114, 0.30);
  background: #eef7f6;
}

.dossier-tile.is-warning {
  border-color: rgba(152, 107, 19, 0.32);
  background: #fff9ea;
}

.file-tab-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eaf0f3;
  overflow-x: auto;
  scrollbar-width: thin;
}

.file-tab-bar::-webkit-scrollbar {
  height: 4px;
}

.file-tab-bar::-webkit-scrollbar-thumb {
  background: #c9d5dc;
  border-radius: 999px;
}

.file-tab {
  display: flex;
  flex: 1 0 118px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: #314653;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.file-tab span,
.file-tab small {
  display: block;
}

.file-tab span {
  font-weight: 900;
}

.file-tab small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(23, 33, 43, 0.12);
}

.file-tab-content {
  display: grid;
  gap: 14px;
}

.activity-feed-panel {
  grid-column: 1 / -1;
}

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

.ledger-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) minmax(96px, auto) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ledger-date,
.ledger-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ledger-date span,
.ledger-main strong,
.ledger-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-date span,
.ledger-amount {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.ledger-date small,
.ledger-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ledger-main strong {
  font-size: 14px;
}

.ledger-status,
.ledger-action {
  justify-self: end;
}

.ledger-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.vehicle-file-toolbar {
  display: flex;
  justify-content: flex-start;
}

.vehicle-file-hero {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(300px, 1.55fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  position: static;
  border-left: 4px solid var(--primary);
  box-shadow: none;
}

.vehicle-file-hero .vehicle-photo-placeholder,
.vehicle-file-hero .vehicle-photo-img {
  min-height: 165px;
}

.vehicle-file-title {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
}

.vehicle-file-title h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.08;
}

.vehicle-file-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 800;
}

.vehicle-action-workbench {
  display: grid;
  gap: 14px;
  scroll-margin-top: 16px;
}

.vehicle-workbench-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.vehicle-workbench-header h2,
.workbench-form-block h3 {
  margin: 0;
}

.vehicle-action-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  min-width: min(680px, 100%);
}

.vehicle-action-tab {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: #314653;
  text-align: left;
}

.vehicle-action-tab span {
  display: block;
  font-weight: 900;
}

.vehicle-action-tab small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-action-tab.is-active {
  border-color: var(--primary-dark);
  background: var(--primary);
  color: #fff;
}

.vehicle-action-tab.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.vehicle-action-body {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(280px, 0.55fr);
  gap: 16px;
  align-items: start;
}

.workbench-main,
.workbench-context,
.workbench-full {
  min-width: 0;
}

.workbench-context {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.workbench-context h3,
.workbench-context h4 {
  margin: 0;
}

.workbench-context h3 {
  font-size: 16px;
}

.workbench-context h4 {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.context-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.context-stat-row span {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 9px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.context-stat-row strong {
  color: var(--ink);
  font-size: 15px;
}

.context-section {
  display: grid;
  gap: 8px;
}

.compact-record strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.compact-empty {
  padding: 12px;
  font-size: 13px;
}

.context-details {
  margin-bottom: 0;
}

.service-workbench {
  display: grid;
  gap: 14px;
}

.service-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: var(--surface-2);
}

.service-mode-tab {
  min-height: 48px;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: #314653;
  text-align: left;
}

.service-mode-tab span,
.service-mode-tab small {
  display: block;
}

.service-mode-tab span {
  font-weight: 900;
}

.service-mode-tab small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.service-mode-tab.is-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(23, 33, 43, 0.10);
}

.workbench-form-block {
  display: grid;
  gap: 12px;
}

.workbench-form-block h3 {
  color: #243846;
  font-size: 16px;
}

.workbench-action-intro {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.workbench-action-intro h3,
.workbench-action-intro p {
  margin: 0;
}

.workbench-action-intro h3 {
  color: #1f3440;
  font-size: 16px;
}

.workbench-action-intro p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.form-section-grid {
  display: grid;
  gap: 12px;
}

.form-subsection {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.form-subsection h3,
.form-subsection p {
  margin: 0;
}

.form-subsection h3 {
  color: #243846;
  font-size: 15px;
}

.form-subsection p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.workbench-footer {
  display: flex;
  justify-content: flex-start;
}

.workbench-form {
  max-width: 900px;
}

.inline-empty {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.wear-tracker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wear-tracker-grid + .split-mini {
  margin-top: 12px;
}

.wear-card {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wear-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.wear-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
}

.wear-card small {
  color: var(--muted);
  font-weight: 700;
}

.wear-card.tone-good {
  border-color: rgba(40, 122, 69, 0.25);
  background: #f4faf6;
}

.wear-card.tone-warn {
  border-color: rgba(154, 107, 18, 0.32);
  background: #fffaf0;
}

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

.vehicle-primary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.vehicle-current-panel,
.vehicle-readiness-panel,
.vehicle-finance-panel,
.vehicle-receipts-panel {
  display: grid;
  gap: 12px;
}

.vehicle-finance-panel,
.vehicle-receipts-panel {
  grid-column: 1 / -1;
}

.vehicle-update-drawer {
  padding: 0;
  overflow: hidden;
  border-left: 4px solid var(--primary);
  background: #fff;
}

.vehicle-file-workspace {
  padding: 0;
  overflow: hidden;
  border-left: 4px solid var(--primary);
  background: #fff;
}

.vehicle-file-workspace .workbench-form {
  max-width: none;
}

.vehicle-update-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #f8fbfc;
}

.vehicle-update-summary h2,
.vehicle-update-summary p {
  margin: 0;
}

.vehicle-update-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.vehicle-update-drawer.is-open .vehicle-update-summary {
  border-bottom: 1px solid var(--line);
}

.vehicle-file-workspace .vehicle-update-summary {
  border-bottom: 1px solid var(--line);
}

.vehicle-workbench-content {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #fff;
}

.maintenance-ledger-panel {
  grid-column: 1 / -1;
}

.maintenance-ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.maintenance-ledger-grid section {
  display: grid;
  align-content: start;
  gap: 8px;
}

.maintenance-ledger-grid h3 {
  margin: 0;
  color: #243846;
  font-size: 14px;
}

.compact-detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-bottom: 12px;
}

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

.receipt-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e6f3f3;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.receipt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.receipt-links a {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.receipt-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.receipt-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.receipt-drawer summary {
  cursor: pointer;
  padding: 9px 11px;
  color: #314653;
  font-size: 13px;
  font-weight: 900;
}

.receipt-drawer[open] summary {
  border-bottom: 1px solid var(--line);
}

.receipt-drawer .receipt-inline {
  border: 0;
  border-radius: 0 0 8px 8px;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.receipt-open-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.missing-receipts-panel {
  display: grid;
  gap: 14px;
}

.workbench-subheader {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.workbench-subheader h3,
.workbench-subheader p,
.no-receipt-notes h3 {
  margin: 0;
}

.workbench-subheader p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.missing-receipt-item {
  display: grid;
  gap: 12px;
}

.missing-receipt-vehicle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.report-receipt-cleanup:focus {
  outline: 3px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline-offset: 3px;
}

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

.missing-receipt-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.missing-receipt-upload {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.missing-receipt-upload label:nth-of-type(3),
.missing-receipt-upload button,
.missing-receipt-upload .form-inline-status,
.no-receipt-form .form-inline-status {
  grid-column: 1 / -1;
}

.missing-receipt-upload button,
.missing-receipt-link button,
.no-receipt-form button {
  justify-self: start;
}

.missing-receipt-link,
.missing-receipt-link-empty {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.missing-receipt-link-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.missing-receipt-link-empty strong,
.missing-receipt-link-empty span {
  display: block;
}

.no-receipt-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
