:root {
  color-scheme: light;
  --ink: #161615;
  --muted: #6d6250;
  --line: #e1d6bf;
  --panel: #ffffff;
  --page: #f5f1e8;
  --brand: #d99b14;
  --brand-dark: #9a6408;
  --steel: #141413;
  --charcoal: #242321;
  --gold: #e0a51b;
  --gold-bright: #ffd86a;
  --green: #1f7a4d;
  --blue: #225a8a;
  --shadow: 0 18px 45px rgba(20, 20, 19, 0.13);
  --gold-shadow: 0 18px 44px rgba(96, 61, 4, 0.2);
}

.truck-maintenance-panel {
  display: grid;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.maintenance-head,
.maintenance-card,
.maintenance-table-card,
.maintenance-alerts {
  background: linear-gradient(145deg, rgba(14, 14, 14, 0.96), rgba(32, 28, 18, 0.94));
  border: 1px solid rgba(244, 181, 48, 0.36);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  color: #f7f2e7;
  min-width: 0;
  padding: 18px;
}

.maintenance-head h3,
.maintenance-card h4,
.maintenance-table-card h4 {
  color: #ffd56a;
  margin: 0;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 197, 64, 0.25);
}

.maintenance-head p {
  color: #d8d0c0;
  margin-bottom: 0;
}

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

.maintenance-summary-grid article {
  background: #fff8e8;
  border: 2px solid #111;
  border-radius: 8px;
  color: #111;
  padding: 14px;
}

.maintenance-summary-grid span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.maintenance-summary-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 6px;
}

.maintenance-summary-grid .danger {
  background: #ffe6e1;
  border-color: #7a160d;
}

.maintenance-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  min-width: 0;
}

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

.maintenance-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  min-width: 0;
}

.maintenance-form label {
  color: #f7f2e7;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-width: 0;
}

.maintenance-form input,
.maintenance-form select,
.maintenance-form textarea {
  background: #fffdf7;
  border: 1px solid #cdbd92;
  border-radius: 8px;
  color: #111;
  max-width: 100%;
  min-height: 40px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.maintenance-form textarea {
  min-height: 92px;
}

.maintenance-form .wide {
  grid-column: 1 / -1;
}

.maintenance-form button {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.maintenance-alerts {
  border-color: rgba(226, 67, 45, 0.6);
}

.maintenance-alerts.good {
  border-color: rgba(39, 174, 96, 0.55);
}

.maintenance-alerts p,
.maintenance-alerts span {
  color: #f8e1dc;
  margin: 6px 0;
}

.maintenance-alerts.good span {
  color: #d8d0c0;
}

.maintenance-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.maintenance-table {
  border-collapse: collapse;
  color: #111;
  min-width: min(1120px, 100%);
  width: 100%;
}

.maintenance-table th {
  background: #0d0d0d;
  color: #ffd56a;
  font-size: 12px;
  padding: 9px;
  text-align: left;
  white-space: nowrap;
}

.maintenance-table td {
  background: #fffdf7;
  border-bottom: 1px solid #e5d8b8;
  padding: 9px;
  vertical-align: top;
  word-break: break-word;
}

.maintenance-table td:last-child {
  min-width: 190px;
}

.maintenance-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
  white-space: nowrap;
}

.maintenance-badge.good {
  background: #dff5e7;
  color: #116b32;
}

.maintenance-badge.warn {
  background: #fff2c7;
  color: #6f4b00;
}

.maintenance-badge.danger {
  background: #ffe0dc;
  color: #8b1d12;
}

.fleet-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.fleet-status-grid article {
  background: #fff8e8;
  border: 2px solid #111;
  border-radius: 8px;
  color: #111;
  padding: 14px;
}

.fleet-status-grid article.danger {
  background: #ffe6e1;
  border-color: #7a160d;
}

.fleet-status-grid span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.fleet-status-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 5px;
}

.truck-status-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.truck-status-card {
  background: #fffdf7;
  border: 2px solid #111;
  border-radius: 8px;
  color: #111;
  padding: 14px;
}

.truck-status-card.warn {
  border-color: #b57b00;
  background: #fff4cf;
}

.truck-status-card.danger {
  border-color: #8b1d12;
  background: #ffe6e1;
}

.truck-status-card header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.truck-status-card header strong {
  font-size: 20px;
}

.truck-status-card header span {
  background: #111;
  border-radius: 999px;
  color: #ffd56a;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.truck-status-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.truck-status-card dl div {
  display: grid;
  gap: 2px;
}

.truck-status-card dt {
  color: #6d6250;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.truck-status-card dd {
  margin: 0;
  font-weight: 800;
}

@media (max-width: 900px) {
  .maintenance-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .truck-maintenance-panel {
    gap: 12px;
  }

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

  .maintenance-head,
  .maintenance-card,
  .maintenance-table-card,
  .maintenance-alerts {
    border-radius: 8px;
    padding: 12px;
  }

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

  .maintenance-summary-grid article {
    min-width: 0;
    padding: 10px;
  }

  .maintenance-summary-grid strong {
    font-size: 22px;
  }

  .maintenance-table-wrap {
    overflow-x: visible;
  }

  .maintenance-table,
  .maintenance-table thead,
  .maintenance-table tbody,
  .maintenance-table tr,
  .maintenance-table th,
  .maintenance-table td {
    display: block;
  }

  .maintenance-table {
    min-width: 0;
  }

  .maintenance-table thead {
    display: none;
  }

  .maintenance-table tbody {
    display: grid;
    gap: 10px;
  }

  .maintenance-table tr {
    background: #fffdf7;
    border: 1px solid #e5d8b8;
    border-radius: 8px;
    overflow: hidden;
  }

  .maintenance-table td {
    align-items: start;
    border-bottom: 1px solid #f0e4c7;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
    min-width: 0;
    padding: 8px 10px;
  }

  .maintenance-table td:last-child {
    border-bottom: 0;
    min-width: 0;
  }

  .maintenance-table td::before {
    color: #6d6250;
    content: attr(data-label);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .maintenance-table td[data-label="Actions"] {
    grid-template-columns: 1fr;
  }

  .maintenance-table td[data-label="Actions"]::before {
    margin-bottom: 2px;
  }

  .maintenance-table td[data-label="Actions"] .small-button {
    margin: 0 6px 6px 0;
  }
}

@media (max-width: 420px) {
  .maintenance-summary-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-table td {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(224, 165, 27, 0.16), transparent 34vw),
    linear-gradient(180deg, #171614 0, #2a261d 260px, var(--page) 520px);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px);
  background:
    linear-gradient(135deg, rgba(255, 216, 106, 0.16), transparent 34%),
    linear-gradient(180deg, #060606 0%, #181716 62%, #252017 100%);
  color: #fff;
  border-bottom: 5px solid var(--gold);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto clamp(18px, 4vw, 48px) 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 106, 0.9), transparent);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: min(100%, 620px);
}

.brand-logo {
  width: clamp(82px, 11vw, 132px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 6px;
  border: 1px solid rgba(255, 216, 106, 0.34);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 16px 32px rgba(0, 0, 0, 0.36);
}

.topbar h1,
.section-header h2,
.modal-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 46px);
  color: var(--gold-bright);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 3px 0 #6c4405,
    0 10px 28px rgba(224, 165, 27, 0.28);
}

.brand-tagline {
  margin: 8px 0 0;
  color: #f0dfb0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.subtitle,
.eyebrow {
  margin: 0;
}

.subtitle {
  color: #dce6e9;
  margin-top: 6px;
}

.eyebrow {
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.topbar-actions,
.section-actions,
.modal-actions,
.tools-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

main {
  width: min(1880px, 100%);
  margin: 0 auto;
  padding: 24px clamp(10px, 2vw, 28px) 40px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.secondary-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: -6px 0 20px;
}

.secondary-kpi-strip article,
.awarded-projection-summary article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 100, 8, 0.3);
  border-radius: 6px;
  background: var(--panel);
}

.secondary-kpi-strip span,
.secondary-kpi-strip strong,
.secondary-kpi-strip small,
.awarded-projection-summary span,
.awarded-projection-summary strong {
  display: block;
}

.secondary-kpi-strip span,
.awarded-projection-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.secondary-kpi-strip strong,
.awarded-projection-summary strong {
  margin-top: 3px;
  font-size: 19px;
}

.secondary-kpi-strip small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.summary-tile {
  min-height: 108px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 250, 238, 0.97));
  border: 1px solid rgba(154, 100, 8, 0.26);
  border-radius: 8px;
  box-shadow: var(--gold-shadow);
  position: relative;
  overflow: hidden;
}

.summary-tile:first-child {
  min-height: 108px;
}

.summary-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold), var(--brand-dark));
}

.summary-tile span,
.calculator-results span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.summary-tile strong,
.calculator-results strong {
  display: block;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  color: #171614;
}

.summary-tile > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticket-summary-tile {
  border-color: rgba(215, 154, 30, 0.58);
}

.ticket-summary-tile::before {
  background: linear-gradient(180deg, #ffd86a, #d79a1e, #171614);
}

.ticket-summary-tile small {
  cursor: pointer;
  color: #725006;
}

.dashboard-update-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: -6px 0 20px;
}

.dashboard-update-strip article {
  border: 1px solid rgba(34, 90, 138, 0.24);
  border-radius: 6px;
  background: #f7fbff;
  padding: 10px 12px;
}

.dashboard-update-strip span,
.dashboard-update-strip strong,
.dashboard-update-strip small {
  display: block;
}

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

.dashboard-update-strip strong {
  margin-top: 4px;
  font-size: 15px;
}

.dashboard-update-strip small {
  margin-top: 4px;
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.daily-briefing {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid rgba(154, 100, 8, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(25, 24, 20, 0.96), rgba(12, 12, 11, 0.96));
  box-shadow: var(--gold-shadow);
  color: #fff7df;
}

.daily-briefing-header,
.briefing-pipeline-head,
.briefing-section-title,
.briefing-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.daily-briefing-header {
  align-items: center;
  margin-bottom: 14px;
}

.daily-briefing h2,
.daily-briefing h3,
.daily-briefing p {
  margin: 0;
}

.daily-briefing h2 {
  font-size: clamp(22px, 2.2vw, 32px);
  color: var(--gold-bright);
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.daily-briefing-header > div > p:last-child,
.briefing-note,
.briefing-empty {
  margin-top: 6px;
  color: #e8dcb9;
  font-size: 13px;
}

.daily-briefing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.daily-briefing-grid > article,
.briefing-pipeline {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.briefing-section-title {
  align-items: center;
  margin-bottom: 10px;
}

.briefing-section-title span,
.briefing-pipeline-grid span {
  color: #f8dfa2;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.briefing-section-title strong {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-bright);
  color: #101010;
  text-align: center;
}

.briefing-list {
  display: grid;
  gap: 9px;
}

.briefing-item {
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #171614;
}

.briefing-item strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.briefing-item-head .status-pill {
  max-width: 138px;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.15;
}

.briefing-item p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.briefing-item small {
  display: block;
  margin-top: 5px;
  color: #5c5340;
  font-size: 11px;
  line-height: 1.3;
}

.briefing-script {
  font-weight: 800;
}

.briefing-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.briefing-item-actions .secondary-button {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1;
}

.briefing-item-actions .secondary-button.danger,
.permit-message-preview-actions .secondary-button.danger {
  border-color: rgba(180, 35, 24, 0.35);
  color: #8a1f16;
}

.follow-up-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.follow-up-preview-head strong,
.follow-up-preview-head small {
  display: block;
}

.follow-up-preview-head small {
  margin-top: 4px;
  color: #e8dcb9;
  font-size: 11px;
  line-height: 1.25;
}

.follow-up-preview-list {
  display: grid;
  gap: 9px;
}

.briefing-follow-up-card.compact:nth-child(n + 6) {
  display: none;
}

.follow-up-dialog {
  width: min(1120px, calc(100% - 24px));
}

.follow-up-dialog-body {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  max-height: min(72vh, 760px);
  overflow: auto;
  background: #f7f4ea;
}

.follow-up-manager-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.follow-up-manager-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.follow-up-manager-toolbar select,
.follow-up-manager-toolbar input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.follow-up-manager-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.follow-up-manager-stats article {
  padding: 10px;
  border: 1px solid rgba(39, 63, 79, 0.12);
  border-radius: 8px;
  background: #fff;
}

.follow-up-manager-stats span,
.follow-up-manager-stats strong {
  display: block;
}

.follow-up-manager-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.follow-up-manager-stats strong {
  margin-top: 4px;
  color: var(--steel);
  font-size: 20px;
}

.follow-up-manager-list {
  display: grid;
  gap: 10px;
}

.follow-up-dialog .briefing-item {
  border: 1px solid rgba(39, 63, 79, 0.12);
  background: #fff;
}

.briefing-pipeline {
  margin-top: 12px;
}

.briefing-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.briefing-pipeline-grid article {
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #171614;
}

.briefing-pipeline-grid span,
.briefing-pipeline-grid strong {
  display: block;
}

.briefing-pipeline-grid span {
  color: #6b5a31;
}

.briefing-pipeline-grid strong {
  margin-top: 4px;
  font-size: 18px;
}

.briefing-top-list {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #fff7df;
}

.briefing-top-list span {
  display: block;
  color: #e8dcb9;
  font-size: 12px;
}

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

.split-summary-values div {
  min-width: 0;
}

.split-summary-values small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 6px;
}

.split-summary-values strong {
  font-size: clamp(24px, 2.4vw, 32px);
}

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

.stacked-summary-values small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 4px;
}

.stacked-summary-values strong {
  display: block;
  font-size: clamp(24px, 2.4vw, 32px);
}

#homeExtraShiftsTile {
  min-height: 168px;
  border-color: #b67808;
  box-shadow: 0 10px 24px rgba(92, 57, 0, 0.14);
}

.extra-shifts-summary {
  display: grid;
  grid-template-columns: 42px repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 8px;
  align-items: end;
}

.extra-shifts-summary small {
  display: block;
  color: #171614;
  font-size: 13px;
  font-weight: 900;
  margin: 0;
  line-height: 1.05;
}

.extra-shifts-summary span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.extra-shifts-summary strong {
  display: block;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1;
}

.goal-status-tile small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.goal-status-tile.goal-good {
  border-color: #2f855a;
  background: #f3fbf6;
}

.goal-status-tile.goal-good strong {
  color: #1f6b42;
}

.goal-status-tile.goal-warn {
  border-color: #d69e2e;
  background: #fffaf0;
}

.goal-status-tile.goal-warn strong {
  color: #8a5b00;
}

.goal-status-tile.goal-bad {
  border-color: #b7372d;
  background: #fff5f4;
}

.goal-status-tile.goal-bad strong {
  color: #8f241c;
}

#monthlyProjection,
#summaryBreakEven,
#summaryAvgHourlyRate,
#summaryProfitPerHour,
#summaryExtraShifts42 {
  font-size: clamp(20px, 2.2vw, 28px);
}

#totalBidValue {
  font-size: clamp(30px, 3.4vw, 42px);
  white-space: nowrap;
}

.true-daily-profit-tile {
  grid-column: span 3;
  min-width: 0;
  border-left: 5px solid var(--gold);
}

.true-daily-profit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 10px;
}

.true-daily-profit-grid div {
  min-width: 0;
}

.true-daily-profit-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.true-daily-profit-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

#trueDailyProfitStatus {
  margin: 12px 0 0;
  font-weight: 900;
}

.true-profit-good {
  border-left-color: #2f855a;
  background: #f3fbf6;
}

.true-profit-good #trueDailyProfitValue,
.true-profit-good #trueDailyProfitStatus {
  color: #1f6b42;
}

.true-profit-warn {
  border-left-color: #d69e2e;
  background: #fffaf0;
}

.true-profit-warn #trueDailyProfitValue,
.true-profit-warn #trueDailyProfitStatus {
  color: #8a5b00;
}

.true-profit-bad {
  border-left-color: #b7372d;
  background: #fff5f4;
}

.true-profit-bad #trueDailyProfitValue,
.true-profit-bad #trueDailyProfitStatus {
  color: #8f241c;
}

.finance-overview-panel {
  padding: 0 20px 16px;
}

.driver-workday-center-panel {
  max-width: 100%;
  min-width: 0;
  padding: 0 20px 18px;
}

.driver-workday-center-shell {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.driver-workday-live-summary,
.driver-workday-record-panel,
.dvir-form-embed {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 10px 24px rgba(21, 24, 29, 0.06);
}

.driver-workday-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.driver-workday-tab-jump {
  display: grid;
  gap: 6px;
  max-width: 360px;
}

.driver-workday-tab-jump span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-workday-tab-jump select {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(43, 38, 28, 0.22);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 900;
  padding: 8px 10px;
}

.driver-workday-center-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  max-width: 100%;
  min-width: 0;
}

.driver-workday-center-tab {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(43, 38, 28, 0.22);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.15;
  padding: 8px 9px;
  text-align: center;
  white-space: normal;
}

.driver-workday-center-tab.active {
  border-color: #171614;
  background: #171614;
  color: #f8c24c;
}

.driver-workday-center-tab-panel {
  max-width: 100%;
  min-width: 0;
}

.driver-workday-command-grid,
.driver-workday-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.driver-workday-command-grid article,
.driver-workday-status-grid article {
  border: 1px solid rgba(215, 154, 30, 0.38);
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
}

.driver-workday-command-grid span,
.driver-workday-command-grid strong,
.driver-workday-command-grid small,
.driver-workday-status-grid span,
.driver-workday-status-grid strong {
  display: block;
}

.driver-workday-command-grid span,
.driver-workday-status-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.driver-workday-command-grid strong,
.driver-workday-status-grid strong {
  margin-top: 5px;
  font-size: 24px;
}

.driver-workday-command-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.driver-workday-live-summary,
.driver-workday-record-panel,
.dvir-form-embed {
  padding: 16px;
}

.driver-workday-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.driver-workday-section-head h4 {
  margin: 4px 0 0;
}

.driver-workday-section-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.driver-workday-recent-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.driver-workday-recent-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.driver-workday-recent-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 800;
}

.driver-workday-search {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.driver-workday-search input {
  width: 100%;
}

.driver-workday-split-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.driver-workday-record-table {
  min-width: 980px;
}

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

.finance-summary-grid.compact {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.finance-summary-grid article,
.bank-profile-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.finance-summary-grid article {
  padding: 14px;
}

.finance-summary-grid span,
.finance-summary-grid strong,
.finance-summary-grid small {
  display: block;
}

.finance-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-summary-grid strong {
  margin-top: 6px;
  font-size: 20px;
}

.finance-summary-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.bank-profile-panel {
  margin-top: 12px;
  padding: 14px;
}

.bank-profile-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.bank-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.bank-profile-form label,
.bank-profile-form input {
  min-width: 0;
}

.bank-profile-form label {
  font-weight: 800;
}

.bank-profile-form input {
  width: 100%;
  margin-top: 5px;
}

.bank-security-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ticket-tracker-panel {
  margin-top: 18px;
  padding: 0;
  border: 2px solid #d79a1e;
  border-radius: 8px;
  background: #fffaf0;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(23, 22, 20, 0.12);
}

.ticket-tracker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(215, 154, 30, 0.24), rgba(215, 154, 30, 0.03)),
    #171614;
  color: #fff8e7;
  padding: 18px 20px;
}

.ticket-tracker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}

.ticket-tracker-actions button {
  min-height: 42px;
}

.ticket-tracker-header h3 {
  margin: 4px 0 6px;
  color: #f8c24c;
  font-size: 30px;
  line-height: 1;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.ticket-tracker-header p {
  margin: 0;
  color: rgba(255, 248, 231, 0.84);
}

.ticket-tracker-header .eyebrow {
  color: #f8c24c;
}

.ticket-tracker-lede {
  max-width: 620px;
  font-size: 15px;
  font-weight: 800;
}

.ticket-summary-grid {
  padding: 16px;
  background: #fffaf0;
}

.ticket-summary-grid article {
  border-color: rgba(215, 154, 30, 0.5);
  background: #fffdf8;
}

.ticket-summary-grid strong {
  font-size: clamp(22px, 2vw, 32px);
}

.ticket-table-wrap {
  padding: 0 16px 18px;
}

.ticket-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.ticket-card {
  border: 1px solid rgba(43, 38, 28, 0.18);
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(43, 38, 28, 0.08);
}

.ticket-card-topline,
.ticket-card-title,
.ticket-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-select-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ticket-driver-assign {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  max-width: 290px;
}

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

.ticket-driver-assign select {
  min-height: 40px;
}

.ticket-card-title {
  align-items: flex-start;
  margin-top: 10px;
}

.ticket-card-title strong,
.ticket-card-title span {
  display: block;
}

.ticket-card-title strong {
  font-size: 22px;
}

.ticket-card-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 14px 0;
}

.ticket-card-details div {
  min-width: 0;
}

.ticket-card-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-card-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
  font-size: 15px;
}

.ticket-card-actions {
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.ticket-card-actions .attachment-list {
  flex: 1 1 auto;
}

.ticket-warning-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 0 16px 16px;
  border: 2px solid #c87918;
  border-radius: 8px;
  background: #fff4d8;
  padding: 12px 14px;
  color: #2a2213;
}

.ticket-warning-panel strong,
.ticket-warning-panel span {
  display: block;
}

.ticket-warning-panel strong {
  font-size: 13px;
}

.ticket-warning-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-management-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
  background: #fffaf0;
}

.ticket-management-tab {
  border: 1px solid rgba(43, 38, 28, 0.22);
  border-radius: 6px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  padding: 8px 12px;
}

.ticket-management-tab.active {
  border-color: #171614;
  background: #171614;
  color: #f8c24c;
}

.ticket-panel-toolbar,
.ticket-analytics-settings {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
}

.ticket-panel-toolbar h4,
.ticket-chart-panel h5,
.ticket-report-panel h5 {
  margin: 3px 0 0;
}

.ticket-panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  max-width: 680px;
}

.ticket-filter-grid,
.ticket-analytics-settings,
.compact-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.ticket-filter-grid label,
.ticket-analytics-settings label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.ticket-filter-grid input,
.ticket-filter-grid select,
.ticket-analytics-settings input,
.ticket-analytics-settings select {
  width: 100%;
  margin-top: 5px;
}

.ticket-filter-grid .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.ticket-filter-grid .inline-check input {
  width: auto;
  margin: 0;
}

.ticket-card-warning {
  border-color: #c87918;
  box-shadow: 0 0 0 2px rgba(200, 121, 24, 0.18);
}

.ticket-discrepancy-warning {
  margin-top: 10px;
  border: 1px solid #c87918;
  border-radius: 6px;
  background: #fff4d8;
  color: #6d3106;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
}

.ticket-override-summary {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  border: 1px solid rgba(29, 121, 75, 0.24);
  border-radius: 8px;
  background: #f1fff8;
  padding: 9px 10px;
}

.ticket-override-summary strong {
  color: #145f3d;
  font-size: 12px;
  text-transform: uppercase;
}

.ticket-override-summary small {
  color: #2f4f3d;
  font-weight: 800;
  line-height: 1.35;
}

.ticket-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.ticket-chart-panel,
.ticket-report-panel {
  border: 1px solid rgba(43, 38, 28, 0.16);
  border-radius: 8px;
  background: #fffdf8;
  padding: 14px;
}

.ticket-bar-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.ticket-bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(90px, 2fr) minmax(70px, auto);
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.ticket-bar-row span {
  overflow-wrap: anywhere;
}

.ticket-bar-row div {
  height: 10px;
  border-radius: 999px;
  background: #efe4c8;
  overflow: hidden;
}

.ticket-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d79a1e;
}

.responsive-table-wrap {
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 12px;
}

.mini-table th,
.mini-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.mini-table th {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-action-spacer {
  flex: 1 1 auto;
}

.empty-inline {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.projection-tabs {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--line);
}

.projection-tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 900;
  cursor: pointer;
}

.projection-tab.active {
  border-color: var(--brand-dark);
  background: var(--steel);
  color: var(--gold-bright);
}

.vendor-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-end;
}

.vendor-category-tab {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: var(--panel);
  color: var(--ink);
  margin-bottom: -1px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.vendor-category-tab.active {
  border-color: var(--brand-dark);
  background: var(--steel);
  color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(246, 181, 23, 0.22);
}

.contractor-outreach-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.contractor-outreach-head,
.contractor-outreach-actions,
.contractor-outreach-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.contractor-outreach-head h3,
.contractor-select-list h4,
.contractor-preview-list h4 {
  margin: 0;
}

.contractor-outreach-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.contractor-outreach-controls,
.contractor-outreach-template {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.contractor-outreach-template {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contractor-outreach-template textarea {
  min-height: 120px;
}

.contractor-outreach-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.template-utility-actions {
  display: flex;
  align-items: end;
}

.contractor-outreach-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.contractor-outreach-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8faf9;
}

.contractor-outreach-summary span,
.contractor-outreach-summary strong,
.outreach-contractor-row small,
.outreach-contractor-row em {
  display: block;
}

.contractor-outreach-summary span,
.outreach-contractor-row small,
.outreach-contractor-row em {
  color: var(--muted);
  font-size: 12px;
}

.contractor-outreach-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 14px;
  margin-top: 14px;
}

.contractor-select-list,
.contractor-preview-list {
  min-width: 0;
}

.outreach-contractor-row,
.outreach-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  background: #fff;
}

.outreach-contractor-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  cursor: pointer;
}

.outreach-contractor-row em {
  font-style: normal;
}

.outreach-preview-card > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.outreach-preview-card textarea {
  width: 100%;
  min-height: 230px;
  margin-top: 8px;
  font-family: inherit;
}

.outreach-preview-card.has-errors {
  border-color: #d97706;
}

.outreach-warning-list,
.outreach-result {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}

.outreach-result {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #14532d;
}

.outreach-warning-list p,
.outreach-result p {
  margin: 0;
}

.outreach-error {
  color: #9f1239;
}

@media (max-width: 820px) {
  .contractor-outreach-grid {
    grid-template-columns: 1fr;
  }
}

.vendor-phone {
  display: inline-block;
  min-width: 118px;
  color: #050505;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

a.vendor-phone:hover {
  color: #050505;
  text-decoration: underline;
}

.daily-work-weekly-panel {
  margin: 0 20px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

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

.weekly-history-head h3 {
  margin: 2px 0 4px;
  font-size: 18px;
  color: #ffffff;
  text-shadow:
    -1px -1px 0 #050505,
    1px -1px 0 #050505,
    -1px 1px 0 #050505,
    1px 1px 0 #050505,
    0 2px 0 #050505;
}

.weekly-history-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.weekly-history-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.weekly-history-cards article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--card);
}

.weekly-history-cards span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.weekly-history-cards strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.weekly-history-cards small {
  color: var(--muted);
  font-weight: 800;
}

.weekly-history-table-wrap {
  overflow-x: auto;
}

.weekly-history-table {
  width: 100%;
  border-collapse: collapse;
}

.weekly-history-table th,
.weekly-history-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.weekly-history-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.current-week-row {
  background: rgba(246, 181, 23, 0.13);
}

.awarded-projection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line);
}

.permit-pipeline-impact {
  display: grid;
  gap: 12px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--line);
}

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

.permit-impact-head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.permit-impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.permit-impact-grid article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 100, 8, 0.3);
  border-radius: 6px;
  background: var(--panel);
}

.permit-impact-grid span,
.permit-impact-grid strong {
  display: block;
}

.permit-impact-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.permit-impact-grid strong {
  margin-top: 3px;
  font-size: 19px;
}

.permit-impact-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.project-name-cell {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.project-name-cell strong {
  font-size: 13px;
}

.project-name-cell small {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}

.kpi-action-panel {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.kpi-action-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-action-heading h3,
.kpi-action-heading p {
  margin: 0;
}

.kpi-action-panel ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.kpi-action-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--brand);
  background: var(--page);
}

.kpi-action-panel li.kpi-action-bad {
  border-left-color: #b7372d;
  background: #fff5f4;
}

.kpi-action-clear {
  margin: 14px 0 0;
  color: var(--muted);
}

.active-goal-row td {
  background: #fff6d8;
  font-weight: 900;
}

.active-goal-row td:first-child::after {
  content: "  • Active baseline";
  color: var(--brand-dark);
  font-size: 11px;
}

.negative-value {
  color: #8f241c !important;
}

.positive-value {
  color: #1f6b42 !important;
  font-weight: 800;
}

.daily-profit-snapshot {
  margin: 0 24px 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

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

.snapshot-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

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

.snapshot-grid article {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.snapshot-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
}

.snapshot-grid strong {
  display: block;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1;
}

.snapshot-synopsis {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: #fff;
  color: var(--steel);
  line-height: 1.5;
}

.top-synopsis {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: -6px 0 20px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fff8ea);
  border: 1px solid rgba(154, 100, 8, 0.24);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  box-shadow: var(--gold-shadow);
}

.top-synopsis h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.top-synopsis p:last-child {
  margin: 0;
  color: var(--steel);
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.nav-panel,
.content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nav-panel {
  position: sticky;
  top: 16px;
  padding: 10px;
  background: linear-gradient(180deg, #1b1a18, #2a261f);
  border-color: rgba(224, 165, 27, 0.34);
}

.nav-button {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  color: #f3ead2;
  padding: 12px 13px;
  border-radius: 6px;
  font-weight: 700;
}

.nav-button:hover {
  background: rgba(255, 216, 106, 0.12);
}

.nav-button.active {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #141413;
  box-shadow: inset 0 -2px 0 rgba(106, 68, 5, 0.28);
}

.content-panel {
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fffaf0);
}

.section-header h2 {
  margin-top: 4px;
  font-size: 28px;
}

.section-header p:last-child {
  color: var(--muted);
  margin: 6px 0 0;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #171614;
  border-color: rgba(154, 100, 8, 0.46);
  padding: 0 16px;
  box-shadow: inset 0 -2px 0 rgba(106, 68, 5, 0.28);
}

.primary-button:hover {
  background: linear-gradient(180deg, #ffe28a, #c7890d);
}

.secondary-button {
  background: #fff;
  color: var(--steel);
  border-color: var(--line);
  padding: 0 14px;
}

.secondary-button:hover {
  border-color: var(--gold);
  background: #fff8ea;
}

.topbar .secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: #fff2c9;
  border-color: rgba(255, 216, 106, 0.36);
}

.topbar .secondary-button:hover {
  border-color: var(--gold-bright);
  background: rgba(255, 216, 106, 0.14);
}

.icon-button {
  width: 40px;
  background: #f4f7f6;
  color: var(--steel);
  border-color: var(--line);
}

.tools-row {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  width: min(420px, 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
}

.calculator-panel {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.budget-tool-panel {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

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

.budget-tool-head h3 {
  margin: 4px 0 0;
  font-size: 24px;
}

.budget-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.budget-card-grid-wide {
  grid-column: 1 / -1;
  min-width: 0;
}

.budget-mini-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.budget-mini-card h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.budget-mini-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.budget-card-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.budget-card-summary div {
  min-width: 0;
}

.budget-card-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.budget-card-summary dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 700;
}

.budget-mini-card .secondary-button {
  justify-self: start;
}

.budget-mini-card.daily-miles-card {
  grid-column: 1 / -1;
  min-height: 0;
  align-self: start;
  overflow: visible;
}

.budget-mini-card.truck-capacity-card {
  grid-column: 1 / -1;
  min-height: 0;
  overflow: visible;
}

.budget-mini-card.truck-capacity-card .budget-card-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-mini-card.driver-mileage-card {
  grid-column: span 2;
  min-height: 0;
}

.budget-mini-card.dvir-form-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.budget-mini-card.warning-card {
  border-color: rgba(180, 55, 45, 0.45);
  background: #fff7f5;
}

.budget-mini-card.warning-card h4,
.budget-mini-card.warning-card dd {
  color: #8f241c;
}

.budget-mini-card.success-card {
  border-color: rgba(55, 126, 87, 0.35);
  background: #f5fbf7;
}

.budget-mini-card.success-card h4,
.budget-mini-card.success-card dd {
  color: #1f6b42;
}

.atco-ton-profit-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.atco-ton-profit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.atco-ton-profit-head h5 {
  margin: 2px 0 0;
  font-size: 16px;
}

.atco-load-compare-control {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.atco-load-compare-control label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.atco-load-compare-control input {
  width: 120px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.atco-ton-profit-table th,
.atco-ton-profit-table td {
  white-space: nowrap;
  font-size: 12px;
}

.profit-row-good td:last-child {
  color: #1f6b46;
  font-weight: 800;
}

.profit-row-bad td:last-child {
  color: #9a2d24;
  font-weight: 800;
}

.budget-mileage-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.budget-form-card {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.budget-form-card h4 {
  margin: 0 0 14px;
  font-size: 18px;
}

.budget-mileage-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.8fr) minmax(150px, 0.9fr);
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.budget-mileage-row:first-of-type {
  border-top: 0;
}

.budget-mileage-row > span {
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  padding-bottom: 9px;
}

.budget-mileage-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.budget-mileage-row input {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.budget-mileage-row.calculated {
  background: #f8faf9;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.budget-mileage-row.calculated input {
  background: #eef3f3;
  font-weight: 700;
}

.budget-mileage-results {
  display: grid;
  gap: 12px;
}

.budget-mileage-results article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.budget-mileage-results span,
.budget-mileage-results em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.budget-mileage-results strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 28px;
}

.budget-auto-block {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.budget-auto-head {
  margin-bottom: 14px;
}

.budget-auto-head h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.budget-auto-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.budget-auto-grid article {
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.budget-auto-grid span,
.budget-auto-grid em,
.budget-auto-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.budget-auto-grid small {
  margin-top: 5px;
  font-weight: 800;
}

.budget-auto-grid strong {
  display: block;
  margin: 12px 0 6px;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1;
}

.trip-profit-route-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.trip-profit-route-panel label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.trip-profit-route-panel input {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.trip-profit-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-profit-actions button {
  min-height: 38px;
}

.trip-profit-route-panel .google-trip-result {
  grid-column: 1 / -1;
}

.trip-profit-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.trip-profit-project-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.trip-profit-project-panel article {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
}

.trip-profit-project-panel span,
.trip-profit-project-panel small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.trip-profit-project-panel strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1;
}

.operating-hours-chart {
  display: grid;
  gap: 14px;
}

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

.operating-hour-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fbfcfc;
}

.operating-hour-row.good {
  border-left-color: #21764a;
}

.operating-hour-row.bad {
  border-left-color: #9b2c24;
}

.operating-hour-label strong,
.operating-hour-label span {
  display: block;
}

.operating-hour-label strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.operating-hour-label span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.operating-hour-bars {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.operating-hour-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(70px, 0.35fr) minmax(90px, auto);
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  background: #fff;
}

.operating-hour-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-width, 0%);
  opacity: 0.18;
}

.operating-hour-bar.revenue::before {
  background: var(--gold);
}

.operating-hour-bar.cost::before {
  background: #6b7280;
}

.operating-hour-bar.profit.good::before {
  background: #21764a;
}

.operating-hour-bar.profit.bad::before {
  background: #9b2c24;
}

.operating-hour-bar span,
.operating-hour-bar strong {
  position: relative;
  z-index: 1;
}

.operating-hour-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.operating-hour-bar strong {
  color: var(--ink);
  text-align: right;
}

.operating-hours-table-wrap {
  margin-top: 2px;
}

.operating-hours-table td,
.operating-hours-table th {
  white-space: nowrap;
}

.budget-tool-synopsis {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: #fff;
  color: var(--steel);
  line-height: 1.5;
}

.miles-tracker-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.miles-tracker-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.miles-tracker-settings label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.miles-tracker-settings input {
  width: 100%;
  margin-top: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.miles-detail-table table {
  font-size: 13px;
}

.miles-zero-row {
  background: #fff2f0;
}

.operating-budget-preview,
.profitability-preview {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.operating-budget-preview h3,
.profitability-preview h3 {
  margin: 0 0 12px;
}

.operating-budget-kpis,
.profitability-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.operating-budget-kpis span,
.profitability-kpis span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.operating-budget-kpis strong,
.profitability-kpis strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  margin-top: 4px;
}

.operating-budget-preview table,
.profitability-preview table {
  min-width: 0;
  font-size: 13px;
}

.operating-budget-preview th,
.operating-budget-preview td,
.profitability-preview th,
.profitability-preview td {
  padding: 10px;
}

.fleet-growth-panel {
  margin-bottom: 16px;
}

.kpi-center-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-health-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #10100f;
  color: #fff;
}

.kpi-health-banner h3 {
  margin: 2px 0 0;
  color: var(--gold-bright);
  font-size: 34px;
  text-shadow: 1px 1px 0 #000;
}

.kpi-health-good {
  border-left-color: #2f855a;
}

.kpi-health-warn {
  border-left-color: #d69e2e;
}

.kpi-health-bad {
  border-left-color: #b7372d;
}

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

.kpi-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kpi-card span,
.kpi-card small {
  display: block;
  color: var(--muted);
}

.kpi-card span {
  font-size: 12px;
  font-weight: 900;
}

.kpi-card strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 22px;
  overflow-wrap: anywhere;
}

.kpi-card small {
  line-height: 1.35;
}

.kpi-card-good {
  border-color: rgba(47, 133, 90, 0.45);
}

.kpi-card-warn {
  border-color: rgba(214, 158, 46, 0.55);
}

.kpi-card-bad {
  border-color: rgba(183, 55, 45, 0.55);
}

.kpi-input-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kpi-input-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.kpi-input-panel summary span {
  color: var(--muted);
  font-size: 12px;
}

.kpi-input-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.kpi-input-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kpi-input-form input {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.kpi-input-form .primary-button {
  align-self: end;
}

.fleet-growth-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #10100f;
  color: #f6f2e8;
  box-shadow: 0 14px 28px rgba(10, 8, 4, 0.14);
}

.fleet-growth-card h3 {
  margin: 0;
  color: #f4b72a;
  font-size: 28px;
  text-shadow:
    1px 1px 0 #000,
    -1px 1px 0 #000,
    1px -1px 0 #000,
    -1px -1px 0 #000;
}

.fleet-growth-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.fleet-growth-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fleet-growth-kpis span {
  display: block;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(244, 183, 42, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #d8d2c1;
  font-size: 12px;
  font-weight: 800;
}

.fleet-growth-kpis strong {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 18px;
}

.fleet-growth-recommendation,
.fleet-growth-warning {
  margin: 14px 0 0;
  line-height: 1.5;
}

.fleet-growth-warning {
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(180, 55, 45, 0.18);
  color: #ffd5d0;
  font-weight: 800;
}

.fleet-growth-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}

.fleet-growth-settings label {
  color: #d8d2c1;
  font-size: 12px;
  font-weight: 800;
}

.fleet-growth-settings input {
  width: 100%;
  margin-top: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 183, 42, 0.42);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.fleet-growth-status-bad {
  border-color: rgba(180, 55, 45, 0.55);
}

.fleet-growth-status-warn {
  border-color: rgba(205, 149, 22, 0.7);
}

.fleet-growth-status-good {
  border-color: rgba(244, 183, 42, 0.7);
}

.fleet-combined-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fleet-combined-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.fleet-combined-heading h3 {
  margin: 0 0 4px;
}

.fleet-combined-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.fleet-combined-table {
  max-height: 420px;
  overflow: auto;
}

.fleet-combined-table table {
  min-width: 980px;
}

.fleet-combined-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.budget-preview-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.daily-miles-source-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.daily-miles-source-form label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-miles-source-form input {
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.daily-miles-auto-value,
.daily-miles-result {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(221, 166, 58, 0.45);
  border-radius: 6px;
  background: rgba(221, 166, 58, 0.08);
}

.daily-miles-auto-value {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  background: #fff;
  border-color: var(--line);
}

.daily-miles-result {
  grid-column: span 2;
}

.google-trip-estimate {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.google-trip-estimate small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.daily-miles-auto-value span,
.daily-miles-result span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.daily-miles-auto-value strong,
.daily-miles-result strong {
  flex-shrink: 0;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.daily-miles-source-form .primary-button {
  width: 100%;
  min-height: 34px;
  grid-column: span 2;
}

.daily-miles-card > .secondary-button {
  justify-self: end;
}

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

.driver-mileage-form label {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.driver-mileage-form input {
  width: 100%;
  min-height: 36px;
  margin-top: 5px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.driver-mileage-result {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(221, 166, 58, 0.45);
  border-radius: 6px;
  background: rgba(221, 166, 58, 0.08);
}

.driver-mileage-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.driver-mileage-result strong {
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
}

.driver-mileage-form .primary-button {
  width: 100%;
  min-height: 38px;
  align-self: end;
}

.driver-mileage-form .form-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.driver-mileage-form .form-message.good {
  color: #1f6b42;
}

.driver-mileage-form .form-message.warn {
  color: #8f241c;
}

.driver-mileage-card > .secondary-button {
  justify-self: end;
}

.dvir-paper-form {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 2px solid #111;
  border-radius: 4px;
  background: #fff;
  color: #111;
}

.driver-app-dvir-report {
  min-width: 0;
}

.driver-app-dvir-report .dvir-paper-form {
  padding: 26px 30px;
  border-width: 3px;
  border-radius: 8px;
  border-color: #0f0f0f;
  background:
    linear-gradient(180deg, rgba(255, 248, 228, 0.7), rgba(255, 255, 255, 0.98) 240px),
    #fff;
}

.driver-app-dvir-report .dvir-form-banner {
  gap: 12px;
  padding-bottom: 24px;
  border-bottom-width: 5px;
  border-bottom-color: #d79a1e;
  background: #0f0f0f;
  color: #f7c64a;
  margin: -26px -30px 8px;
  padding: 18px 30px 24px;
  border-radius: 5px 5px 0 0;
}

.driver-app-dvir-report .dvir-brand-logo {
  width: min(360px, 82vw);
  max-height: 150px;
  object-position: center 72%;
}

.driver-app-dvir-report .dvir-form-banner strong {
  font-size: clamp(32px, 6vw, 60px);
  letter-spacing: 5px;
  color: #f7c64a;
  text-shadow: 0 2px 0 #6c4704;
}

.driver-app-dvir-report .dvir-form-banner span {
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: 1px;
  color: #fff8df;
}

.driver-app-dvir-report .dvir-checklist-head,
.driver-app-dvir-report .dvir-checklist-section h4 {
  background: #0f0f0f;
  color: #f7c64a;
}

.driver-app-dvir-report .dvir-mile-preview {
  border-color: #0f0f0f;
  background: #fff8df;
  box-shadow: inset 0 0 0 3px rgba(215, 154, 30, 0.22);
}

.driver-app-dvir-report .dvir-mode-notice {
  border-color: #d79a1e;
  background: #fff4cf;
}

.dvir-form-banner {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 3px solid #111;
  padding-bottom: 10px;
}

.dvir-brand-logo {
  width: min(260px, 78vw);
  max-height: 110px;
  object-fit: contain;
  object-position: center 58%;
  border-radius: 6px;
}

.dvir-form-banner strong {
  font-size: 30px;
  letter-spacing: 1px;
}

.dvir-form-banner span {
  font-size: 18px;
  font-weight: 900;
}

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

.dvir-form-grid label,
.dvir-remarks {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #111;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dvir-form-grid label.wide,
.dvir-form-grid .wide {
  grid-column: 1 / -1;
}

.dvir-form-grid input,
.dvir-form-grid select,
.dvir-remarks textarea {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid #111;
  border-radius: 0;
  padding: 7px 4px;
  color: #111;
  background: #fff;
  font: inherit;
  text-transform: none;
}

.dvir-remarks textarea {
  border: 1px solid #111;
  resize: vertical;
}

.dvir-mile-preview {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 2px solid #111;
  background: #f6f6f6;
}

.dvir-mile-preview span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dvir-mile-preview strong {
  font-size: 20px;
}

.dvir-checklist-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px;
  color: #fff;
  background: #111;
  text-align: center;
}

.dvir-bulk-check-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.dvir-bulk-check-actions .secondary-button {
  padding: 7px 10px;
  font-size: 12px;
}

.dvir-mode-notice {
  margin: -4px 0 0;
  padding: 8px 10px;
  border: 1px solid #111;
  background: #fff8df;
  color: #111;
  font-weight: 900;
  line-height: 1.35;
}

.dvir-admin-override {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(180px, 260px) 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px dashed #111;
  background: #f7f7f7;
}

.dvir-admin-override label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #111;
  font-size: 13px;
  font-weight: 900;
}

.dvir-admin-override select {
  min-height: 34px;
  border: 1px solid #111;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
}

.dvir-admin-override p {
  margin: 0;
  color: #444;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

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

.dvir-checklist-section {
  border: 1px solid #111;
}

.dvir-checklist-section h4 {
  margin: 0;
  padding: 8px 10px;
  color: #fff;
  background: #111;
  font-size: 14px;
}

.dvir-checklist-rows {
  display: grid;
}

.dvir-check-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(54px, auto));
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid #ddd;
}

.dvir-check-row label,
.dvir-checkline {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #111;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.dvir-check-item {
  font-weight: 800;
}

.dvir-check-row input,
.dvir-checkline input {
  width: 17px;
  height: 17px;
  accent-color: #111;
}

.dvir-disabled-check {
  color: #777;
  opacity: 0.45;
}

.dvir-paper-form .primary-button {
  justify-self: start;
}

.dvir-records-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dvir-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dvir-panel-head h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.dvir-panel-head p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.open-dvir-days-panel {
  border-left: 5px solid var(--gold);
}

.open-dvir-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px;
}

.open-dvir-day-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(214, 158, 46, 0.55);
  border-radius: 8px;
  background: #fffaf0;
}

.open-dvir-day-card h5 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.open-dvir-day-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.open-dvir-day-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.open-dvir-day-card dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.open-dvir-day-card .primary-button {
  justify-self: start;
}

.dvir-table-wrap {
  overflow-x: auto;
}

.dvir-record-table {
  width: 100%;
  border-collapse: collapse;
}

.dvir-record-table th,
.dvir-record-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.dvir-record-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.dvir-record-table small {
  color: var(--muted);
}

.dvir-attachment-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.dvir-attachment-list a,
.dvir-attachment-list span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.dvir-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 10px 14px;
  margin: 0;
}

.dvir-report-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dvir-report-summary dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.dispatch-schedule-panel {
  display: grid;
  gap: 16px;
}

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

.dispatch-summary-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(221, 166, 58, 0.35);
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.dispatch-summary-grid span {
  display: block;
  color: #f4d890;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dispatch-summary-grid strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 24px;
}

.dispatch-summary-grid .dispatch-alert-tile {
  border-color: #b4372d;
  background: #5c1712;
}

.owner-live-operations-card {
  border-color: rgba(221, 166, 58, 0.45);
}

.owner-live-source {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}

.owner-live-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 16px 0;
}

.owner-live-status-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.owner-live-status-grid span {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.owner-live-status-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.owner-live-status-grid .active,
.owner-live-status-grid .ready {
  border-color: rgba(23, 107, 58, 0.35);
  background: #f5fbf7;
}

.owner-live-status-grid .warn,
.owner-live-status-grid .returning {
  border-color: rgba(183, 122, 0, 0.35);
  background: #fff9e9;
}

.owner-live-status-grid .complete {
  border-color: rgba(80, 92, 102, 0.2);
  background: #f7f8f8;
}

.owner-live-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  padding: 16px;
}

.owner-live-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf8f1;
}

.owner-live-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
}

.owner-live-column > header span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.owner-live-driver-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(80, 92, 102, 0.35);
  border-radius: 8px;
  background: #fff;
}

.owner-live-driver-card.morning_incomplete,
.owner-live-driver-card.end_of_day_incomplete {
  border-left-color: #b77a00;
}

.owner-live-driver-card.ready_to_depart,
.owner-live-driver-card.working {
  border-left-color: #176b3a;
}

.owner-live-driver-card.returning {
  border-left-color: #986800;
}

.owner-live-driver-card.complete {
  border-left-color: #59656f;
}

.owner-live-driver-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.owner-live-driver-head strong,
.owner-live-driver-card p {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
}

.owner-live-driver-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.owner-live-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f0f0ec;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.owner-live-pill.active,
.owner-live-pill.ready {
  background: #dff2e6;
  color: #176b3a;
}

.owner-live-pill.warn,
.owner-live-pill.returning {
  background: #fff0c8;
  color: #7a5200;
}

.owner-live-pill.complete {
  background: #eceeed;
  color: #3f464c;
}

.owner-live-driver-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.owner-live-driver-card dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-live-driver-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 900;
}

.owner-live-missing {
  padding: 8px;
  border-radius: 6px;
  background: #fff5dd;
  color: #7a5200;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.owner-live-missing.complete {
  background: #eef8f1;
  color: #176b3a;
}

.owner-live-next {
  color: var(--ink) !important;
}

.dispatch-empty.compact {
  padding: 8px 0 2px;
  font-size: 12px;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.dispatch-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dispatch-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dispatch-card-head h3 {
  margin: 4px 0 0;
  font-size: 19px;
}

.dispatch-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

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

.dispatch-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.dispatch-form .wide {
  grid-column: 1 / -1;
}

.dispatch-form input,
.dispatch-form select,
.dispatch-form textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.dispatch-form textarea {
  resize: vertical;
}

.dispatch-form .primary-button,
.dispatch-form .secondary-button,
.dispatch-recommendation,
.dispatch-form .form-message {
  grid-column: 1 / -1;
}

.dispatch-recommendation {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(221, 166, 58, 0.45);
  border-radius: 8px;
  background: rgba(221, 166, 58, 0.09);
}

.dispatch-recommendation strong {
  color: var(--ink);
}

.dispatch-recommendation span {
  color: var(--muted);
  font-weight: 700;
}

.dispatch-truck-list,
.dispatch-note-list,
.dispatch-alert-list,
.dispatch-job-grid {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.dispatch-truck-card,
.dispatch-note-list article,
.dispatch-alert-list article,
.dispatch-job-card,
.dispatch-timeline-job {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.dispatch-truck-card {
  display: grid;
  gap: 7px;
}

.dispatch-truck-card span,
.dispatch-truck-card small,
.dispatch-note-list span,
.dispatch-note-list p {
  color: var(--muted);
}

.dispatch-alert-list article,
.dispatch-card-warning {
  border-color: rgba(180, 55, 45, 0.45);
  background: #fff7f5;
}

.dispatch-alert-list span,
.dispatch-card-warning {
  color: #8f241c;
  font-weight: 800;
}

.dispatch-view-head {
  align-items: center;
}

.dispatch-view-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dispatch-view-buttons .active {
  background: var(--brand);
  color: #111;
}

.dispatch-timeline {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.dispatch-timeline-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
}

.dispatch-timeline-truck {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 12px;
  border-radius: 8px;
  background: #111;
  color: #fff;
}

.dispatch-timeline-truck span {
  color: #f4d890;
  font-size: 12px;
  font-weight: 800;
}

.dispatch-timeline-jobs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dispatch-job-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.dispatch-job-card {
  display: grid;
  gap: 10px;
}

.dispatch-job-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dispatch-job-card-head span {
  color: var(--brand-dark);
  font-weight: 900;
}

.dispatch-job-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.dispatch-job-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dispatch-job-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.dispatch-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dispatch-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted);
}

.dispatch-available {
  border-color: rgba(55, 126, 87, 0.35);
  background: #f5fbf7;
}

.dispatch-confirmed {
  border-color: rgba(48, 95, 154, 0.35);
  background: #f4f8ff;
}

.dispatch-pending {
  border-color: rgba(221, 166, 58, 0.45);
  background: #fff8e6;
}

.dispatch-conflict {
  border-color: rgba(180, 55, 45, 0.45);
  background: #fff7f5;
}

.dispatch-completed {
  border-color: #c8ccd0;
  background: #f4f5f6;
}

.dispatch-canceled,
.dispatch-unavailable {
  border-color: #2b2f32;
  background: #eef0f1;
}

.driver-portal-panel {
  display: block;
}

.driver-portal-shell {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.driver-topbar,
.driver-login-card,
.driver-job-card,
.driver-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(21, 24, 29, 0.06);
}

.driver-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #111;
  color: #fff;
}

.driver-topbar h3,
.driver-login-card h3,
.driver-job-card h3,
.driver-action-card h4 {
  margin: 4px 0;
}

.driver-topbar span,
.driver-login-card p,
.driver-job-card p,
.driver-action-card p,
.driver-muted {
  color: var(--muted);
}

.driver-topbar span {
  color: #f4d890;
  font-weight: 800;
}

.driver-login-card,
.driver-job-card,
.driver-action-card {
  padding: 16px;
}

.driver-job-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.driver-job-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-job-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 850;
}

.driver-button-row,
.driver-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.driver-instructions {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(221, 166, 58, 0.12);
  color: var(--ink);
  font-weight: 800;
}

.driver-step-grid {
  display: grid;
  gap: 12px;
}

.driver-action-card {
  position: relative;
  display: grid;
  gap: 10px;
}

.driver-action-card > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #111;
  color: var(--brand);
  font-weight: 950;
}

.driver-mobile-form {
  display: grid;
  gap: 10px;
}

.driver-mobile-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.driver-mobile-form input,
.driver-mobile-form select,
.driver-mobile-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.driver-mobile-form textarea {
  resize: vertical;
}

.driver-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.driver-check input {
  width: auto;
  min-height: auto;
}

.driver-exception-form {
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

.driver-end-card {
  border-color: rgba(55, 126, 87, 0.35);
  background: #f5fbf7;
}

.driver-workday-hero,
.driver-workday-card,
.driver-workday-progress {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(21, 24, 29, 0.06);
}

.driver-workday-hero {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.driver-workday-hero h3 {
  margin: 4px 0 8px;
}

.driver-workday-hero dl,
.driver-mini-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.driver-workday-hero dt,
.driver-mini-dl dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.driver-workday-hero dd,
.driver-mini-dl dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.driver-next-step {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-left: 4px solid var(--brand);
  background: rgba(221, 166, 58, 0.1);
}

.driver-next-step small,
.driver-workday-lock {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.driver-workday-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.driver-workday-progress button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  text-align: left;
}

.driver-workday-progress button span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.driver-workday-progress button.done {
  border-color: rgba(55, 126, 87, 0.35);
  background: #f5fbf7;
}

.driver-workday-progress button.current {
  border-color: rgba(221, 166, 58, 0.7);
  background: #fff7df;
}

.driver-workday-progress button.locked {
  opacity: 0.58;
}

.driver-workday-flow {
  display: grid;
  gap: 12px;
}

.driver-workday-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.driver-workday-card.current {
  border-color: rgba(221, 166, 58, 0.8);
}

.driver-workday-card.done {
  border-color: rgba(55, 126, 87, 0.35);
}

.driver-workday-card.locked {
  background: #fafafa;
}

.driver-workday-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.driver-workday-card-head h4 {
  margin: 4px 0 0;
}

.driver-message-thread-card {
  border-color: rgba(42, 92, 130, 0.24);
  background: #fbfdff;
}

.driver-message-thread {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-message-thread article {
  display: grid;
  gap: 6px;
  max-width: 86%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(21, 24, 29, 0.08);
  background: #f7f7f4;
}

.driver-message-thread article.owner {
  justify-self: end;
  background: #eef7f1;
}

.driver-message-thread article.driver {
  justify-self: start;
}

.driver-message-thread article div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.driver-message-thread article p {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.driver-big-button {
  width: 100%;
  min-height: 48px;
}

.driver-assignment-status {
  margin-bottom: 8px;
}

.driver-file-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.driver-file-pills span {
  max-width: 100%;
  border: 1px solid rgba(55, 126, 87, 0.24);
  border-radius: 999px;
  background: #f5fbf7;
  color: #225c3f;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  overflow-wrap: anywhere;
}

.driver-assignment-extract-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.driver-extract-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.driver-extract-status.good {
  color: #1d794b;
}

.driver-extract-status.warn {
  color: #8a5c00;
}

.driver-extract-status.bad {
  color: #9d2d24;
}

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

.driver-ticket-list article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.driver-ticket-list span,
.driver-ticket-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.driver-ticket-signature-preview {
  display: grid;
  gap: 8px;
}

.driver-ticket-signature-preview article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.driver-ticket-signature-preview strong,
.driver-ticket-signature-preview span,
.driver-ticket-signature-preview small {
  overflow-wrap: anywhere;
}

.ticket-lifecycle-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ticket-lifecycle-row small {
  color: var(--muted);
  font-weight: 800;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}

.calculator-grid label,
.form-grid label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calculator-grid input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.form-grid textarea {
  min-height: 88px;
  resize: vertical;
}

.calculator-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.calculator-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.calculator-results div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compliance-panel {
  margin-bottom: 18px;
  display: grid;
  gap: 14px;
}

.compliance-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.compliance-overview-grid article,
.compliance-renewals,
.compliance-filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.compliance-overview-grid span,
.compliance-filter {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.compliance-overview-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: var(--ink);
}

.compliance-renewals {
  display: grid;
  gap: 8px;
}

.compliance-renewals h3 {
  margin: 2px 0 0;
}

.compliance-renewals ul {
  margin: 0;
  padding-left: 18px;
}

.compliance-filter {
  display: inline-grid;
  gap: 6px;
  max-width: 260px;
}

.compliance-filter select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.scorecard-panel {
  margin-bottom: 18px;
}

.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.scorecard-grid article {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--gold-shadow);
}

.scorecard-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scorecard-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: var(--ink);
}

.scorecard-test-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.scorecard-test-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.button-test-report {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--panel);
  overflow-x: auto;
}

.button-test-report h3 {
  margin: 0 0 10px;
}

.button-test-report table {
  min-width: 1240px;
}

.button-test-report th,
.button-test-report td {
  padding: 10px 12px;
}

.truck-source-health-panel {
  margin: 0 24px 18px;
  padding: 16px;
  border: 1px solid rgba(224, 165, 27, 0.32);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: linear-gradient(180deg, #171614, #221f18);
  color: #f8efd8;
  box-shadow: var(--gold-shadow);
}

.truck-source-health-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.truck-source-health-head h3 {
  margin: 2px 0 0;
  color: var(--gold-bright);
  text-shadow: 1px 1px 0 #000;
}

.truck-source-health-head p:last-child {
  margin: 0;
  color: #d8c99c;
  font-weight: 700;
  text-align: right;
}

.truck-source-health-note {
  margin: -4px 0 14px;
  color: #d8c99c;
  font-weight: 700;
  line-height: 1.45;
}

.truck-source-health-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.truck-source-health-grid article {
  padding: 12px;
  border: 1px solid rgba(255, 216, 106, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.truck-source-health-grid span {
  display: block;
  color: #d8c99c;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.truck-source-health-grid strong {
  display: block;
  margin-top: 5px;
  color: #fff7dc;
  font-size: 22px;
}

.truck-source-health-table {
  overflow-x: auto;
}

.truck-source-health-table table {
  min-width: 900px;
}

.truck-source-health-table th {
  background: rgba(255, 216, 106, 0.12);
  color: var(--gold-bright);
}

.truck-source-health-table td {
  border-bottom-color: rgba(255, 216, 106, 0.18);
  color: #f8efd8;
}

.source-open-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 216, 106, 0.42);
  border-radius: 6px;
  color: #fff4c4;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.source-open-link:hover {
  background: rgba(255, 216, 106, 0.14);
}

.google-trip-calculator,
.daily-miles-tracker-dropdown,
.manual-one-way-trips {
  display: grid;
  grid-column: span 2;
  gap: 8px;
  margin-top: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--panel);
}

.google-trip-calculator summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.daily-miles-tracker-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.daily-miles-tracker-dropdown summary::-webkit-details-marker {
  display: none;
}

.google-trip-calculator summary::-webkit-details-marker {
  display: none;
}

.google-trip-calculator h4,
.daily-miles-tracker-dropdown h4,
.manual-one-way-trips h4 {
  margin: 2px 0 0;
  font-size: 14px;
}

.google-trip-calculator summary span,
.daily-miles-tracker-dropdown summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-miles-tracker-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-miles-tracker-table {
  max-height: min(58vh, 520px);
  overflow: auto;
  position: relative;
  z-index: 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.daily-miles-tracker-table table {
  min-width: 820px;
}

.daily-miles-tracker-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.daily-miles-tracker-dropdown[open] {
  position: relative;
  z-index: 8;
  box-shadow: 0 18px 40px rgba(17, 16, 12, 0.16);
}

.google-trip-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.google-trip-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.google-trip-form input {
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.google-trip-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.google-trip-result {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  color: var(--muted);
  font-weight: 700;
}

.google-trip-result.good {
  background: #e7f4ed;
  color: var(--green);
}

.google-trip-result.warn {
  background: #fff4da;
  color: #8c6200;
}

.manual-trip-table table {
  min-width: 760px;
}

.update-center-panel {
  margin-bottom: 18px;
}

.update-center-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

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

.update-center-grid article,
.update-center-note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  box-shadow: var(--gold-shadow);
}

.update-center-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.update-center-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--ink);
  line-height: 1.15;
}

.update-center-note {
  margin-bottom: 14px;
  color: var(--muted);
}

.update-report {
  margin-top: 0;
}

.automation-control-center {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(154, 100, 8, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,250,238,0.98));
  box-shadow: var(--gold-shadow);
}

.automation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.automation-heading h3 {
  margin: 0;
}

.automation-heading p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.automation-settings-grid,
.automation-status-grid,
.automation-report-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.automation-settings-grid {
  margin-bottom: 12px;
}

.automation-settings-grid label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.automation-settings-grid input,
.automation-settings-grid select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.automation-settings-grid label:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.automation-settings-grid label:first-child input {
  width: auto;
  min-height: auto;
}

.automation-status-grid article,
.automation-report-grid article {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(154, 100, 8, 0.22);
  border-radius: 6px;
  background: #fff;
}

.automation-status-grid span,
.automation-status-grid strong,
.automation-report-grid span,
.automation-report-grid strong {
  display: block;
}

.automation-status-grid span,
.automation-report-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.automation-status-grid strong,
.automation-report-grid strong {
  margin-top: 4px;
  font-size: 17px;
}

.automation-report {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.automation-report h3 {
  margin: 0 0 6px;
}

.automation-report p {
  margin: 0 0 12px;
  color: var(--muted);
}

.automation-report table {
  margin-top: 12px;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #f8faf9;
  color: var(--steel);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: #253239;
  font-size: 14px;
}

body.contractors-view table {
  min-width: 1180px;
}

body.contractors-view th,
body.contractors-view td {
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.2;
}

body.contractors-view th {
  font-size: 10px;
  letter-spacing: 0;
}

body.contractors-view .actions-cell {
  white-space: nowrap;
}

body.contractors-view .email-select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

body.contractors-view .email-select-cell input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.compact-notes-cell {
  display: -webkit-box;
  max-width: 320px;
  max-height: 3.9em;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.compact-horizontal-cell {
  display: block;
  min-width: 380px;
  max-width: 680px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.inline-number-input {
  width: 110px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.inline-number-input:focus {
  outline: 2px solid rgba(199, 66, 43, 0.2);
  border-color: var(--brand);
}

.actions-cell {
  min-width: 140px;
  white-space: nowrap;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--steel);
  font-weight: 700;
}

.small-button.delete {
  color: var(--brand-dark);
}

.small-button.analyze {
  color: var(--green);
  border-color: #b9dac8;
}

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

.file-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.file-link:hover {
  border-color: var(--blue);
}

.source-link {
  color: var(--blue);
  font-weight: 700;
}

.truck-photo-link {
  display: inline-flex;
  width: 72px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f6f7f8;
}

.truck-photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.muted-cell,
.field-hint {
  color: var(--muted);
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
}

.status-pill.good {
  background: #e7f4ed;
  color: var(--green);
}

.status-pill.warn {
  background: #fff4da;
  color: #8c6200;
}

.status-pill.bad {
  background: #ffe1df;
  color: #8a1f16;
}

.empty-state {
  padding: 44px 24px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

dialog {
  width: min(760px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(22, 32, 37, 0.25);
}

dialog::backdrop {
  background: rgba(22, 32, 37, 0.48);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header .eyebrow {
  color: var(--brand);
}

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

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

.modal-actions {
  justify-content: flex-end;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--line);
}

.permit-outreach-dialog {
  width: min(940px, calc(100% - 24px));
}

.permit-outreach-body {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
}

.permit-outreach-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.permit-outreach-body label.wide {
  grid-column: 1 / -1;
}

.permit-outreach-body input,
.permit-outreach-body select,
.permit-outreach-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.permit-outreach-body textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.45;
}

.permit-outreach-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--brand);
  font-weight: 800;
}

.permit-message-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(183, 125, 17, 0.32);
  border-radius: 6px;
  background: #fff8ea;
}

.permit-source-link-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(39, 63, 79, 0.18);
  border-radius: 6px;
  background: #eef5f7;
}

.permit-source-link-panel strong,
.permit-source-link-panel small {
  display: block;
}

.permit-source-link-panel small {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.permit-source-link-panel .primary-button {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
}

.permit-message-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.permit-message-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.permit-message-preview-head h3 {
  margin: 2px 0 0;
  color: var(--steel);
  font-size: 16px;
}

.permit-message-preview textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.45;
}

.permit-outreach-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.permit-outreach-actions .primary-button {
  margin-left: auto;
}

.extra-shifts-detail {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.daily-work-log-save-status {
  margin: 8px 0 0;
  color: #176b3a;
  font-size: 12px;
  font-weight: 900;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .topbar,
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup {
    align-items: flex-start;
  }

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

  .permit-outreach-body {
    grid-template-columns: 1fr;
  }

  .permit-source-link-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .permit-source-link-panel .primary-button {
    justify-content: center;
  }

  .permit-outreach-actions .primary-button {
    margin-left: 0;
  }

  .daily-briefing-grid,
  .briefing-pipeline-grid,
  .follow-up-manager-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-tile:first-child {
    grid-column: 1 / -1;
  }

  .true-daily-profit-tile {
    grid-column: 1 / -1;
  }

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

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

  .top-synopsis {
    grid-template-columns: 1fr;
  }

  .budget-mileage-tool,
  .budget-mileage-row,
  .budget-card-grid,
  .budget-auto-grid,
  .operating-hours-chart-grid,
  .operating-hour-row,
  .trip-profit-route-panel,
  .trip-profit-project-panel,
  .operating-budget-kpis,
  .fleet-growth-kpis,
  .fleet-growth-settings,
  .miles-tracker-settings,
  .daily-miles-source-form,
  .driver-mileage-form,
  .dvir-form-grid,
  .dvir-checklist,
  .dvir-checklist-head,
  .dvir-report-summary,
  .follow-up-manager-toolbar,
  .dispatch-summary-grid,
  .owner-live-status-grid,
  .owner-live-columns,
  .dispatch-layout,
  .driver-workday-hero dl,
  .driver-mini-dl,
  .driver-two-col,
  .driver-button-row,
  .driver-ticket-entry-grid,
  .dispatch-form,
  .dispatch-form.compact,
  .dispatch-timeline-row,
  .dispatch-job-card dl,
  .driver-job-card dl,
  .driver-button-row,
  .driver-two-col {
    grid-template-columns: 1fr;
  }

  .dvir-panel-head {
    display: grid;
  }

  .dvir-admin-override {
    grid-template-columns: 1fr;
  }

  .open-dvir-day-card dl {
    grid-template-columns: 1fr;
  }

  .dispatch-card-head,
  .dispatch-view-head,
  .driver-topbar {
    display: grid;
  }

  .owner-live-source {
    text-align: left;
  }

  .dispatch-view-buttons {
    justify-content: start;
  }

  .dvir-form-banner strong {
    font-size: 22px;
  }

  .dvir-check-row {
    grid-template-columns: 1fr repeat(3, minmax(48px, auto));
  }

  .fleet-growth-heading {
    display: grid;
  }

  .fleet-combined-heading {
    display: grid;
  }

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

  .budget-mini-card.daily-miles-card,
  .budget-mini-card.truck-capacity-card,
  .budget-mini-card.driver-mileage-card,
  .budget-mini-card.dvir-form-card,
  .daily-miles-result {
    grid-column: auto;
  }

  .budget-mini-card.truck-capacity-card .budget-card-summary {
    grid-template-columns: 1fr;
  }

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

  .nav-panel {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

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

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

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

  .automation-heading {
    display: grid;
  }

  .automation-actions {
    justify-content: flex-start;
  }

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

  .google-trip-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .driver-workday-progress,
  .driver-workday-hero dl,
  .driver-mini-dl,
  .owner-live-driver-card dl {
    grid-template-columns: 1fr;
  }

  .driver-workday-card,
  .driver-workday-hero {
    padding: 14px;
  }

  .operating-hour-label strong {
    font-size: 24px;
  }

  .operating-hour-bar {
    grid-template-columns: 1fr;
  }

  .operating-hour-bar strong {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .secondary-kpi-strip,
  .awarded-projection-summary {
    grid-template-columns: 1fr;
  }

  .finance-summary-grid,
  .bank-profile-form,
  .ticket-card-grid,
  .ticket-card-details {
    grid-template-columns: 1fr;
  }

  .ticket-tracker-header {
    display: grid;
  }

  .driver-workday-center-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .driver-workday-section-head,
  .driver-workday-recent-list article {
    display: grid;
  }

  .driver-workday-action-row {
    justify-content: stretch;
  }

  .driver-workday-action-row button {
    width: 100%;
  }

  .driver-workday-center-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-tracker-actions {
    justify-content: stretch;
    max-width: none;
  }

  .ticket-tracker-actions button {
    width: 100%;
  }

  .bank-profile-panel summary,
  .kpi-action-heading,
  .kpi-action-panel li {
    align-items: stretch;
    flex-direction: column;
  }

  .true-daily-profit-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card-grid,
  .kpi-input-form {
    grid-template-columns: 1fr;
  }

  .kpi-health-banner,
  .kpi-input-panel summary {
    display: grid;
  }

  main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand-lockup {
    flex-direction: column;
  }

  .brand-logo {
    width: 96px;
  }

  .summary-grid,
  .daily-briefing-grid,
  .briefing-pipeline-grid,
  .automation-settings-grid,
  .automation-status-grid,
  .automation-report-grid,
  .snapshot-grid,
  .calculator-results,
  .calculator-grid,
  .scorecard-grid,
  .update-center-grid,
  .google-trip-form,
  .form-grid,
  .nav-panel {
    grid-template-columns: 1fr;
  }

  #totalBidValue {
    font-size: clamp(26px, 9vw, 34px);
  }

  .section-header,
  .daily-briefing-header,
  .tools-row,
  .calculator-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

  .daily-briefing-header,
  .briefing-pipeline-head,
  .briefing-item-head {
    display: grid;
  }
}
