:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #66717e;
  --line: #d8dde3;
  --panel: #ffffff;
  --bg: #f3f6f8;
  --brand: #19706d;
  --brand-dark: #105653;
  --accent: #c76b33;
  --soft: #e8f3f2;
  --shadow: 0 12px 28px rgba(30, 41, 59, 0.08);
}

@media (max-width: 860px) {
  .board-hero {
    display: grid;
  }

  .board-week-switcher {
    justify-content: stretch;
  }

  .board-week-switcher > *,
  .board-toolbar > * {
    flex: 1 1 100%;
  }

  .board-filter-fields {
    position: static;
    min-width: 0;
    grid-template-columns: 1fr;
    box-shadow: none;
  }

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

  .board-grid {
    min-width: 980px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(15, 47, 51, 0.84), rgba(15, 47, 51, 0.84)),
    radial-gradient(circle at top left, rgba(25, 112, 109, 0.36), transparent 32%),
    #0f2f33;
}

.login-shell {
  width: min(100%, 440px);
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
  padding: clamp(24px, 6vw, 36px);
}

.login-logo {
  display: block;
  width: min(100%, 320px);
  margin: 0 0 18px;
}

.login-card h1 {
  color: var(--ink);
  font-size: clamp(30px, 8vw, 42px);
}

.login-copy {
  color: var(--muted);
  margin-bottom: 24px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form button {
  margin-top: 4px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #9a4317;
  font-weight: 700;
}

.muted-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px clamp(16px, 4vw, 42px);
  background: #0f2f33;
  color: white;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px clamp(16px, 4vw, 42px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.app-nav button,
.app-nav .nav-link {
  background: #eef3f4;
  color: var(--brand-dark);
  border: 1px solid #cbd8da;
  padding: 9px 12px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.app-nav button.active,
.nav-group.active > .nav-menu-toggle {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.nav-group {
  position: relative;
}

.nav-menu-toggle::after {
  content: " v";
  font-size: 11px;
}

.nav-submenu {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: none;
  gap: 6px;
  left: 0;
  min-width: 170px;
  padding: 8px;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 20;
}

.nav-group.open .nav-submenu {
  display: grid;
}

.nav-submenu button {
  text-align: left;
  width: 100%;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #a8dcda;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 18px;
  padding: 22px clamp(16px, 4vw, 42px) 36px;
}

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

.allocation-panel,
.contracts-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.diary-panel,
.invoicing-panel,
.paperwork-panel,
.subbie-pay-panel,
.weekly-panel,
.costs-panel {
  grid-column: 1 / -1;
}

.pending-panel {
  grid-column: 1 / -1;
}

.dashboard-panel {
  grid-column: 1 / -1;
}

.dashboard-week-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-week-controls select {
  min-width: 230px;
}

.dashboard-grid,
.rego-dashboard,
.chase-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.company-dashboard-summary {
  display: grid;
  gap: 14px;
}

.company-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.company-dashboard-metric,
.company-truck-card {
  border: 1px solid #d6e1e2;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(15, 31, 36, 0.06);
}

.company-dashboard-metric {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.company-dashboard-metric span,
.company-truck-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.company-dashboard-metric strong {
  color: var(--brand-dark);
  font-size: 25px;
  line-height: 1.1;
}

.company-dashboard-metric small {
  color: var(--muted);
  font-weight: 700;
}

.company-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.company-truck-card {
  display: grid;
  gap: 6px;
  min-height: 150px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  border-left: 5px solid var(--brand);
}

.company-truck-card:hover {
  background: #f9fcfc;
  border-color: var(--brand-dark);
}

.company-truck-card.needs-km {
  border-left-color: #d98a26;
}

.company-truck-card strong {
  color: var(--brand-dark);
  font-size: 22px;
}

.company-truck-card small,
.company-truck-card em,
.company-truck-card b,
.company-truck-card i {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.company-truck-card b {
  color: var(--ink);
}

.company-truck-card i {
  color: #7c4b12;
}

.company-dashboard-empty {
  padding: 12px;
  border: 1px dashed #c9d5d7;
  border-radius: 8px;
  background: #f8fbfb;
}

.dashboard-tile,
.rego-card {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 96px;
  border: 1px solid #b8dad8;
  background: var(--soft);
  color: var(--brand-dark);
  text-align: left;
}

.dashboard-tile span,
.rego-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-tile strong,
.rego-card strong {
  font-size: 28px;
}

.rego-card small {
  color: var(--ink);
  font-weight: 700;
}

.chase-panel {
  grid-column: 1 / -1;
}

.chase-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.chase-form textarea {
  grid-column: 1 / -3;
}

.chase-table-wrap {
  margin-top: 14px;
}

.dashboard-subtitle {
  margin-top: 20px;
}

.empty-mini {
  color: var(--muted);
  margin: 0;
}

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

.paperwork-summary-card,
.paperwork-latest-card,
.paperwork-upload-card,
.paperwork-detail-card,
.paperwork-exception-card {
  border: 1px solid #d6e1e2;
  background: #fff;
  border-radius: 8px;
}

.paperwork-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.paperwork-latest-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.paperwork-quick-open {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.paperwork-latest-card .paperwork-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

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

.paperwork-summary-card strong {
  color: var(--brand-dark);
  font-size: 24px;
}

.paperwork-workbench {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.45fr) minmax(240px, 0.8fr);
  gap: 12px;
  align-items: start;
}

.paperwork-upload-card,
.paperwork-detail-card,
.paperwork-exception-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.paperwork-upload-form {
  display: grid;
  gap: 8px;
}

.paperwork-upload-result {
  display: grid;
  gap: 8px;
}

.paperwork-result-card,
.paperwork-alert,
.paperwork-fixture-result,
.paperwork-diagnostics,
.paperwork-raw-text,
.paperwork-audit-row {
  border: 1px solid #dbe5e6;
  border-radius: 8px;
  background: #f8fbfb;
  padding: 10px;
}

.paperwork-result-card,
.paperwork-fixture-result,
.paperwork-audit-row {
  display: grid;
  gap: 4px;
}

.paperwork-alert {
  border-color: #e8c779;
  background: #fff9e8;
}

.paperwork-alert ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.paperwork-fixture-result.is-pass {
  border-color: #9fc8aa;
  background: #f1fbf4;
}

.paperwork-fixture-result.is-fail {
  border-color: #dea2a2;
  background: #fff4f4;
}

.paperwork-diagnostics pre,
.paperwork-raw-text pre {
  max-height: 360px;
  overflow: auto;
  margin: 10px 0 0;
  border: 1px solid #e1e8e9;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  white-space: pre-wrap;
  font: 12px/1.45 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.paperwork-xero-check {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5e6;
  border-left: 4px solid #b6c7cc;
  border-radius: 8px;
  background: #f8fbfb;
  padding: 10px;
}

.paperwork-xero-check.xero-found,
.paperwork-xero-check.xero-found_local {
  border-left-color: #4d9c67;
}

.paperwork-xero-check.xero-missing,
.paperwork-xero-check.xero-amount_mismatch,
.paperwork-xero-check.xero-contact_mismatch,
.paperwork-xero-check.xero-possible_duplicate,
.paperwork-xero-check.xero-deleted_voided,
.paperwork-xero-check.xero-xero_reconnect_required,
.paperwork-xero-check.xero-xero_error {
  border-left-color: #c9772f;
  background: #fff9ef;
}

.paperwork-xero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.paperwork-xero-meta span {
  display: grid;
  gap: 2px;
  border: 1px solid #e1e8e9;
  border-radius: 8px;
  background: #fff;
  padding: 7px;
  color: var(--muted);
  font-size: 12px;
}

.paperwork-xero-meta b {
  color: var(--ink);
}

.paperwork-list,
.paperwork-exception-list,
.paperwork-lines,
.paperwork-checks,
.paperwork-audit {
  display: grid;
  gap: 8px;
}

.paperwork-list-item,
.paperwork-exception-row,
.paperwork-line {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid #dbe5e6;
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.paperwork-list-item.active {
  border-color: var(--brand);
  background: var(--soft);
}

.paperwork-group-heading {
  margin: 8px 0 0;
  color: var(--brand-dark);
  font-size: 13px;
  text-transform: uppercase;
}

.paperwork-review-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #c7dadc;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f4fbfb;
  padding: 12px;
}

.paperwork-review-panel h4,
.paperwork-review-panel p {
  margin: 0;
}

.paperwork-review-panel small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.paperwork-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paperwork-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.paperwork-select-row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.paperwork-badge {
  display: inline-flex;
  align-items: center;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef4f5;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.paperwork-badge.machine {
  background: #edf5ff;
  color: #245985;
}

.paperwork-badge.human,
.paperwork-badge.override {
  background: #e9f8ef;
  color: #24633a;
}

.paperwork-badge.warning {
  background: #fff1df;
  color: #80500e;
}

.paperwork-badge.muted {
  background: #f1f2f3;
  color: #667176;
}

.tiny-action {
  padding: 4px 7px;
  font-size: 12px;
}

.paperwork-list-item span,
.paperwork-exception-row span,
.paperwork-line span,
.paperwork-line small,
.paperwork-checks p,
.paperwork-audit p,
.paperwork-detail-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.paperwork-detail-toolbar,
.paperwork-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.paperwork-detail h3,
.paperwork-detail h4 {
  margin: 0;
}

.paperwork-detail h4 {
  margin-top: 12px;
}

.paperwork-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.paperwork-meta-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid #e1e8e9;
  border-radius: 8px;
  padding: 9px;
  color: var(--muted);
}

.paperwork-meta-grid b {
  color: var(--ink);
}

.paperwork-line {
  grid-template-columns: minmax(0, 1.2fr) minmax(190px, 0.8fr);
}

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

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

.section-title span {
  color: var(--brand-dark);
  background: var(--soft);
  border: 1px solid #b8dad8;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  white-space: nowrap;
}

.section-title.small {
  margin-bottom: 10px;
}

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

.title-actions select {
  min-width: 180px;
}

.title-actions .search-combo {
  flex: 1 1 260px;
  min-width: 240px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d0d8;
  border-radius: 6px;
  color: var(--ink);
  background: white;
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(25, 112, 109, 0.14);
}

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

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button,
.link-button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:hover,
.link-button:hover {
  background: var(--brand-dark);
}

.secondary {
  background: #eef3f4;
  color: var(--brand-dark);
  border: 1px solid #cbd8da;
}

.secondary:hover {
  background: #dfeaec;
}

.send-button {
  background: var(--accent);
}

.send-button:hover {
  background: #a95426;
}

.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: white;
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hidden {
  display: none !important;
}

.message-box {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.dispatch-workbench {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(520px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.contract-panel,
.job-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

.contract-panel {
  position: sticky;
  top: 12px;
}

.contract-panel-wide,
.job-panel-wide {
  max-width: 1120px;
}

.contract-panel-wide {
  position: static;
}

.contract-panel .section-title span,
.job-panel .section-title span {
  background: #fff7ef;
  border-color: #edc7ae;
  color: #8f481d;
}

.contract-list {
  display: grid;
  gap: 8px;
  max-height: 340px;
  margin-bottom: 16px;
  overflow: auto;
  padding-right: 4px;
}

.contract-list li {
  align-items: center;
}

.contract-split-panel {
  align-items: center;
  border: 1px solid #b8dad8;
  border-radius: 8px;
  background: var(--soft);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(260px, 1fr) 110px 170px auto;
  margin-bottom: 12px;
  padding: 10px;
}

.contract-split-toolbar label {
  display: grid;
  gap: 5px;
}

.contract-split-toolbar label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.contract-split-panel input,
.contract-split-panel select,
.contract-split-panel button {
  min-height: 38px;
  padding: 8px 9px;
}

.contract-form-title {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-top: 12px;
  text-transform: uppercase;
}

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

.setup-xero-toggle {
  background: #fbfcfd;
}

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

.user-active-toggle {
  align-self: end;
}

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

.user-rows {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.user-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.user-row.inactive {
  opacity: 0.68;
}

.user-row-details {
  display: grid;
  gap: 3px;
}

.user-row-details span {
  color: var(--muted);
  font-size: 13px;
}

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

.pending-form {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(140px, 0.75fr) minmax(160px, 0.8fr) minmax(95px, 0.55fr) minmax(95px, 0.55fr);
  gap: 10px;
}

.pending-form .client-picker-field,
.pending-form .location-picker-field,
.pending-form #pendingPickupAddress,
.pending-form #pendingDeliveryAddress,
.pending-form textarea {
  grid-column: span 2;
}

.pending-form .pending-toggle {
  align-self: stretch;
}

.pending-form textarea {
  min-height: 76px;
}

.inline-toggle {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 0 11px;
}

.inline-toggle input {
  margin: 0;
  width: auto;
}

.pending-table-wrap {
  margin-top: 14px;
}

.pending-table tbody tr {
  border-left: 5px solid transparent;
}

.pending-table tbody tr.pending-status-good {
  background: #f5fbf7;
  border-left-color: #2f8f5b;
}

.pending-table tbody tr.pending-status-changed {
  background: #fff9e8;
  border-left-color: #d8a31d;
}

.pending-table tbody tr.pending-status-problem {
  background: #fff1ef;
  border-left-color: #c65343;
}

.pending-status-select {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  min-height: 34px;
  padding: 6px 10px;
}

.pending-status-select.pending-status-good {
  background: #e9f7ee;
  border-color: #b9dcc5;
  color: #23613c;
}

.pending-status-select.pending-status-changed {
  background: #fff2c7;
  border-color: #efd17b;
  color: #7a5608;
}

.pending-status-select.pending-status-problem {
  background: #ffe1dd;
  border-color: #efb3aa;
  color: #8a3127;
}

.planner-panel {
  grid-column: 1 / -1;
}

.planner-fleet {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.planner-auto-pools {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
}

.planner-pool-rows {
  display: grid;
  gap: 8px;
}

.planner-pool-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.8fr);
  padding: 10px 12px;
}

.planner-pool-row.included {
  border-color: #81c995;
  box-shadow: 0 0 0 2px rgba(35, 97, 60, 0.08);
}

.planner-pool-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.planner-pool-copy strong {
  color: var(--ink);
}

.planner-pool-copy p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.planner-pool-controls {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, 0.7fr) minmax(90px, 0.55fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr);
}

.planner-pool-controls label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.planner-pool-controls .inline-toggle {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #dbe5eb;
  border-radius: 8px;
  display: flex;
  min-height: 38px;
  padding: 7px 9px;
}

.planner-pool-controls input,
.planner-pool-controls select {
  min-height: 36px;
}

.planner-truck-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 10px;
}

.planner-truck-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid #b8dad8;
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.planner-truck-row header,
.planner-truck-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.planner-panel > .section-title .title-actions {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#plannerWeekSelect {
  min-width: 190px;
}

.planner-truck-row small {
  color: var(--muted);
  font-weight: 700;
}

.planner-truck-inputs input {
  flex: 1 1 210px;
}

.planner-truck-inputs label {
  color: var(--muted);
  display: grid;
  flex: 1 1 230px;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

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

.bulk-form textarea,
.bulk-form button {
  grid-column: 1 / -1;
}

.planner-results {
  display: grid;
  gap: 10px;
}

.planner-preflight {
  background: #fff;
  border: 1px solid #d7e2e8;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.planner-preflight header strong {
  color: var(--brand-dark);
  font-size: 16px;
}

.planner-preflight-grid,
.planner-truck-starts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.planner-preflight-grid span,
.planner-truck-starts span {
  background: #f5fbfa;
  border: 1px solid #d6e8e7;
  border-radius: 8px;
  color: #215b59;
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 8px 10px;
}

.planner-preflight-grid strong {
  font-size: 18px;
}

.planner-preflight-grid small {
  color: #52616e;
  font-weight: 700;
}

.planner-preflight-warnings {
  display: grid;
  gap: 6px;
}

.planner-preflight-warning,
.planner-preflight-route-warning {
  background: #fafcfc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
}

.planner-preflight-warning.has-warning,
.planner-preflight-route-warning {
  background: #fff8e7;
  border-color: #efcf7a;
}

.planner-preflight-warning summary,
.planner-preflight-route-warning summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 800;
}

.planner-preflight-warning ul,
.planner-preflight-route-warning ul {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.board-planner-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: 1 / -1;
  height: calc(100vh - 156px);
  min-height: 560px;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

main.layout:has(.board-planner-panel:not(.hidden)) {
  max-width: none;
  padding-left: clamp(8px, 1.5vw, 18px);
  padding-right: clamp(8px, 1.5vw, 18px);
}

.panel.board-planner-panel {
  padding: 10px;
}

.board-hero {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.board-hero h2 {
  margin: 0;
  font-size: 20px;
}

.board-hero p {
  display: none;
  margin: 0;
  color: #64748b;
}

.board-hero .eyebrow {
  margin-bottom: 2px;
  font-size: 10px;
}

.board-week-switcher,
.board-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-week-switcher {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.board-week-switcher input {
  width: 170px;
  min-width: 170px;
}

.board-week-switcher button {
  white-space: nowrap;
}

.board-week-switcher strong {
  min-width: 250px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  text-align: center;
}

.board-toolbar {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.board-toolbar input,
.board-toolbar select {
  min-width: 150px;
}

.board-toolbar #boardSearch {
  min-width: 260px;
  flex: 1 1 260px;
}

.board-truck-picker,
.board-filter-panel {
  min-width: 240px;
  position: relative;
}

.board-truck-picker summary,
.board-filter-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.board-truck-picker summary span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  text-align: center;
}

.board-truck-picker[open],
.board-filter-panel[open] {
  z-index: 5;
}

.board-truck-picker-actions,
.board-truck-choices,
.board-filter-fields {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-top: 0;
  background: #fff;
}

.board-truck-picker-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-truck-choices {
  max-height: 260px;
  overflow: auto;
  border-radius: 0 0 10px 10px;
}

.board-filter-fields {
  position: absolute;
  min-width: 420px;
  right: 0;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  border-radius: 0 0 10px 10px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.board-filter-fields #boardSearch {
  grid-column: 1 / -1;
}

.board-truck-choices label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 7px;
  color: #334155;
}

.board-truck-choices label:hover {
  background: #f8fafc;
}

.board-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 6px;
}

.board-summary-card {
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.board-summary-card span,
.board-summary-card em {
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}

.board-summary-card strong {
  font-size: 16px;
  color: #0f172a;
}

.board-shell {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  position: relative;
}

.board-main,
.board-sidebar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.board-main {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  position: relative;
  scroll-behavior: smooth;
}

.board-grid {
  display: grid;
  grid-template-columns: 154px repeat(5, minmax(230px, 1fr));
  min-width: 1304px;
}

.board-head,
.board-truck-head,
.board-cell {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.board-head {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 8px 10px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
}

.board-corner {
  left: 0;
  position: sticky;
  z-index: 15;
}

.board-truck-head {
  position: sticky;
  left: 0;
  z-index: 10;
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 88px;
  padding: 8px 10px;
  background: #fff;
}

.board-truck-head strong {
  font-size: 15px;
  color: #0f172a;
}

.board-truck-head span {
  color: #334155;
  font-size: 13px;
}

.board-truck-head em {
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.board-cell {
  min-height: 88px;
  padding: 6px;
  background: #fbfdff;
}

.board-cell-total {
  margin-bottom: 6px;
  padding: 4px 6px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.board-cell:has(.board-job-card) {
  background: #fff;
}

.board-available,
.board-drop-empty {
  display: grid;
  min-height: 36px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.board-job-card {
  position: relative;
  display: grid;
  gap: 4px;
  margin-bottom: 6px;
  padding: 8px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  cursor: grab;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  z-index: 1;
}

.board-job-card:active {
  cursor: grabbing;
}

.board-job-card.dragging {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  opacity: 0.72;
  transform: translateY(-1px);
  z-index: 2000;
}

.board-job-card strong {
  padding-right: 22px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.15;
}

.board-job-card b {
  justify-self: end;
  padding: 2px 6px;
  border-radius: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 11px;
}

.board-card-menu {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 6px;
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.76);
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.board-card-route {
  display: grid;
  gap: 2px;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.25;
}

.board-card-route,
.board-card-meta,
.board-card-footer {
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-card-route {
  display: grid;
  -webkit-line-clamp: unset;
}

.board-card-route span {
  display: block;
  color: #64748b;
}

.board-card-meta,
.board-card-footer {
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}

.board-card-detail-line {
  color: #063f36;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(6, 63, 54, 0.16);
}

.board-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.board-card-badges span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #1e293b;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
}

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

.board-card-action {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.board-card-green {
  border-color: #86efac;
  background: #ecfdf3;
}

.board-card-blue {
  border-color: #93c5fd;
  background: #eff6ff;
}

.board-card-amber {
  border-color: #fbbf24;
  background: #fffbeb;
}

.board-card-violet {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.board-card-rose {
  border-color: #fda4af;
  background: #fff1f2;
}

.board-sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 190px);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  position: absolute;
  top: 0;
  right: 0;
  width: min(350px, calc(100vw - 32px));
  z-index: 35;
  transform: translateX(calc(100% + 18px));
  transition: transform 0.18s ease;
}

.board-shell.board-drawer-open .board-sidebar {
  transform: translateX(0);
}

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

.board-sidebar-head h3 {
  margin: 0;
}

.board-sidebar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.board-sidebar-head span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
}

#boardToggleSidebar {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.board-weekend-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 800;
}

.board-toolbar .board-weekend-toggle input {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
}

.board-bulk-planner {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.board-bulk-planner label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.board-bulk-planner p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.board-unallocated {
  display: grid;
  gap: 10px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.board-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
}

.board-card-modal.hidden {
  display: none;
}

.board-card-modal-panel {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid #d8e3e6;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 16px;
}

.board-card-modal-head,
.board-card-modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.board-card-modal-head h3 {
  margin: 0;
  color: #102a2d;
}

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

.board-card-form-grid label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.board-card-form-grid input,
.board-card-form-grid textarea {
  width: 100%;
  border: 1px solid #cfdde2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  padding: 8px 9px;
}

.board-card-notes {
  grid-column: 1 / -1;
}

.board-empty-board {
  grid-column: 1 / -1;
  padding: 26px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 1100px) {
  .board-planner-panel {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .board-shell {
    overflow: visible;
  }

  .board-main {
    max-height: 62vh;
  }

  .board-sidebar {
    max-height: 420px;
  }
}

@media (max-width: 860px) {
  .board-hero {
    display: grid;
  }

  .board-week-switcher {
    justify-content: stretch;
  }

  .board-week-switcher > *,
  .board-toolbar > * {
    flex: 1 1 100%;
  }

  .board-filter-fields {
    min-width: 0;
    position: static;
    grid-template-columns: 1fr;
    box-shadow: none;
  }

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

  .board-grid {
    min-width: 980px;
  }
}

.plan-summary {
  display: grid;
  gap: 9px;
  border: 1px solid #b8dad8;
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
}

.plan-summary p {
  color: var(--muted);
  margin: 0;
}

.plan-rego-summaries {
  display: grid;
  gap: 8px;
}

.plan-rego-summary {
  background: white;
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 10px 11px;
}

.plan-rego-summary > strong {
  color: var(--brand-dark);
}

.plan-day {
  display: grid;
  gap: 10px;
  border-top: 2px solid #b8dad8;
  padding-top: 12px;
}

.plan-day > header {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.plan-day > header strong {
  color: var(--brand-dark);
  font-size: 17px;
}

.plan-day-metrics,
.plan-day-flow {
  display: grid;
  gap: 8px;
}

.plan-day-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-unplanned {
  border: 1px dashed #c8d0d8;
  border-radius: 8px;
  background: #fafcfc;
  padding: 10px 12px;
}

.plan-saved-work {
  border: 1px solid #c8d0d8;
  border-radius: 8px;
  background: #f5f8f8;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.plan-saved-work p {
  color: var(--muted);
  margin: 0;
}

.plan-unplanned summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 700;
}

.plan-unplanned-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.plan-unplanned-row {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  padding-top: 8px;
}

.plan-unplanned-row p {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 0;
}

.plan-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.plan-card header,
.plan-metrics,
.plan-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.plan-card p {
  margin: 0;
}

.plan-route {
  color: var(--ink);
  font-weight: 700;
}

.plan-move {
  color: var(--muted);
  font-size: 13px;
}

.plan-detail {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.plan-detail summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.plan-detail .plan-metrics {
  margin-top: 8px;
}

.plan-metrics span,
.plan-flag {
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 700;
  padding: 5px 8px;
}

.plan-flag.warning {
  background: #fff0d9;
  color: #7a4a00;
}

.plan-flag.good {
  background: #dff3e5;
  color: #176037;
}

.plan-flag.danger {
  background: #ffe0de;
  color: #8a281f;
}

.weekly-form {
  display: grid;
  grid-template-columns: 0.75fr 0.7fr 1fr 1.25fr 1.25fr auto 0.7fr 0.7fr 0.7fr 0.85fr auto auto;
  gap: 8px;
}

.weekly-start-row {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.weekly-start-row label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.weekly-location-help {
  color: var(--muted);
  font-size: 12px;
  grid-column: 1 / -1;
  margin: 0;
}

.inline-status {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.weekly-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.weekly-summary div {
  border: 1px solid #b8dad8;
  border-radius: 6px;
  background: var(--soft);
  padding: 10px 11px;
}

.weekly-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.weekly-summary strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.cost-form {
  display: grid;
  grid-template-columns: 0.75fr repeat(6, minmax(0, 1fr)) auto auto auto;
  gap: 8px;
}

.quote-form {
  display: grid;
  grid-template-columns: 0.75fr 1.1fr 1.1fr 1.1fr 1.1fr auto 0.75fr 0.75fr 0.7fr 0.7fr 0.85fr;
  gap: 8px;
}

.quote-cost-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.quote-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.quote-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.quote-map {
  width: 100%;
  height: min(62vh, 620px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
}

.quote-map-legs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quote-leg {
  border: 1px solid #b8dad8;
  border-radius: 6px;
  background: var(--soft);
  color: var(--brand-dark);
  padding: 8px 10px;
  font-weight: 700;
}

.quote-leg.fuel {
  background: #fff5d9;
  border-color: #e3bf63;
  color: #6f5000;
}

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

.cost-summary div,
.quote-summary div {
  border: 1px solid #b8dad8;
  border-radius: 6px;
  background: var(--soft);
  padding: 10px 11px;
}

.cost-summary span,
.quote-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.cost-summary strong,
.quote-summary strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.weekly-table-wrap {
  margin-top: 14px;
}

.weekly-map-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.costs-table-wrap {
  margin-top: 14px;
}

.weekly-table {
  min-width: 1460px;
}

.costs-table {
  min-width: 1450px;
}

.profit-positive {
  color: var(--brand-dark);
  font-weight: 700;
}

.profit-negative {
  color: #9a4317;
  font-weight: 700;
}

.rego-summary-row td {
  background: #f8fafb;
  color: var(--brand-dark);
  font-weight: 700;
}

.pending-table {
  min-width: 1180px;
}

.pending-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

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

.pending-dashboard-head h2 {
  color: #081319;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0;
  margin: 0 0 5px;
}

.pending-dashboard-head p {
  color: var(--muted);
  margin: 0;
}

.pending-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.pending-summary-badge {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(9, 35, 46, 0.06);
  color: #2e3d43;
  display: inline-flex;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  white-space: nowrap;
}

.pending-summary-badge::before {
  border-radius: 999px;
  content: "";
  height: 10px;
  width: 10px;
}

.pending-summary-badge strong {
  color: #071a18;
}

.pending-badge-waiting::before {
  background: #f59e0b;
}

.pending-badge-allocated::before {
  background: #0f8b4c;
}

.pending-badge-completed::before {
  background: #1f74d8;
}

.pending-dispatch-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.35fr);
}

.pending-create-card,
.pending-queue-card {
  background: #ffffff;
  border: 1px solid #dde6e7;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(14, 43, 52, 0.08);
}

.pending-create-card {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  overflow: hidden;
  padding: 0;
}

.pending-card-title {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding: 20px;
}

.pending-card-title h3,
.pending-queue-head h3 {
  color: #071a18;
  margin: 0;
}

.pending-card-title small,
.pending-queue-head span {
  color: var(--muted);
}

.pending-title-icon {
  align-items: center;
  background: #e8f5ee;
  border: 1px solid #b8dfcb;
  border-radius: 10px;
  color: #00634d;
  display: grid;
  font-size: 22px;
  font-weight: 800;
  height: 40px;
  place-items: center;
  width: 40px;
}

.pending-form-section {
  border-bottom: 1px solid #edf2f3;
  display: grid;
  gap: 12px;
  padding: 18px 20px;
}

.pending-form-section h4 {
  color: #00634d;
  font-size: 15px;
  margin: 0;
}

.pending-form-section label,
.pending-form-section .client-picker-field,
.pending-form-section .location-picker-field {
  display: grid;
  gap: 7px;
}

.pending-form-section label > span,
.pending-form-section .field-label-row {
  color: #26383c;
  font-size: 13px;
  font-weight: 700;
}

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

.pending-span-2 {
  grid-column: 1 / -1;
}

.pending-value-card {
  background: linear-gradient(180deg, #f7faf9, #eef5f2);
  border: 1px solid #dce8e4;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  padding: 12px;
}

.pending-value-card span,
.pending-value-card small {
  color: var(--muted);
  font-size: 12px;
}

.pending-value-card strong {
  color: #003f34;
  font-size: 22px;
}

.pending-detail-toggle {
  border-top: 1px dashed #d7e2e2;
  margin-top: 8px;
  padding-top: 8px;
}

.pending-detail-toggle summary {
  color: #435257;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.pending-detail-toggle input,
.pending-detail-toggle .pending-toggle {
  margin-top: 9px;
}

.pending-save-actions {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}

.pending-save-actions #savePendingJob {
  min-height: 52px;
  width: 100%;
}

.pending-queue-card {
  min-width: 0;
  padding: 16px;
}

.pending-queue-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -2px 0 16px;
  padding: 0 0 14px;
}

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

.pending-job-card {
  background: #ffffff;
  border: 1px solid #dde6e7;
  border-left: 5px solid #0f8b4c;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(8, 31, 41, 0.07);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.pending-job-card.pending-status-changed {
  background: #fffaf0;
  border-left-color: #f59e0b;
}

.pending-job-card.pending-status-problem {
  background: #fff5f3;
  border-left-color: #d94b3d;
}

.pending-job-card-head,
.pending-job-load,
.pending-job-meta,
.pending-card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.pending-job-card-head {
  justify-content: space-between;
}

.pending-job-date,
.pending-job-meta {
  color: #46585d;
  font-size: 13px;
}

.pending-job-customer {
  color: #071a18;
  font-size: 18px;
  margin: 0;
}

.pending-job-load {
  color: #071a18;
  flex-wrap: wrap;
}

.pending-job-load strong {
  margin-right: auto;
}

.pending-job-load span {
  background: #f2f6f6;
  border-radius: 999px;
  font-weight: 800;
  padding: 4px 8px;
}

.pending-job-route {
  color: #122326;
  display: grid;
  gap: 6px;
  font-weight: 700;
  line-height: 1.3;
}

.pending-route-arrow {
  color: #00634d;
  font-size: 18px;
  line-height: 1;
}

.pending-job-meta {
  flex-wrap: wrap;
  justify-content: space-between;
}

.pending-card-actions {
  border-top: 1px solid #edf2f3;
  flex-wrap: wrap;
  padding-top: 10px;
}

.pending-card-actions button {
  min-height: 38px;
}

.pending-allocate-button {
  background: #00634d;
  color: #ffffff;
}

.pending-empty-card {
  grid-column: 1 / -1;
  min-height: 130px;
}

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

.mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.mini-list strong {
  display: block;
}

.mini-list span {
  color: var(--muted);
  font-size: 13px;
}

.subbie-xero-controls {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(150px, auto) minmax(120px, 170px);
}

.subbie-xero-controls .inline-toggle {
  min-height: 36px;
  padding: 0 9px;
}

.subbie-xero-controls input[type="text"] {
  min-height: 36px;
}

.truck-tracking-settings {
  margin-top: 12px;
  overflow-x: auto;
}

.truck-tracking-table {
  min-width: 320px;
  width: 100%;
}

.truck-tracking-table th,
.truck-tracking-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
}

.truck-tracking-toggle {
  display: inline-flex;
  min-height: 34px;
}

.location-columns {
  display: grid;
  gap: 18px;
}

.location-columns > div {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  padding: 14px;
}

.location-columns h3 {
  color: var(--brand-dark);
  font-size: 15px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.location-list {
  gap: 10px;
  margin-top: 0;
}

.location-card {
  align-items: flex-start;
  background: #ffffff;
  border-color: #e1e8ee;
  border-left: 4px solid var(--brand);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.location-card.empty-location {
  border-left-color: #d0d9e2;
  grid-template-columns: 1fr;
}

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

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

.location-address {
  color: #263542;
  font-weight: 700;
}

.location-details {
  color: var(--muted);
}

.location-meta {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 260px;
}

.location-actions button {
  min-width: 78px;
}

.location-edit-card {
  border-left-color: var(--accent);
  grid-template-columns: 1fr;
}

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

.location-edit-form > strong,
.location-edit-form label:nth-of-type(2),
.location-edit-form label:nth-of-type(3),
.location-edit-actions {
  grid-column: 1 / -1;
}

.location-edit-toggle {
  align-self: end;
}

.location-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.delete-button {
  flex: 0 0 auto;
  background: #fff5ef;
  color: #9a4317;
  border: 1px solid #efc4a9;
  padding: 7px 9px;
}

.delete-button:hover {
  background: #f8e6db;
}

.edit-button {
  background: #eef3f4;
  color: var(--brand-dark);
  border: 1px solid #cbd8da;
  padding: 7px 9px;
}

.edit-button:hover {
  background: #dfeaec;
}

.link-button-inline {
  display: inline-block;
  text-decoration: none;
}

.row-actions {
  display: flex;
  gap: 8px;
  min-width: 130px;
}

.search {
  max-width: 260px;
}

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

table {
  width: 100%;
  min-width: 1460px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fafb;
}

.status-select {
  min-width: 130px;
}

.sms-pill {
  display: inline-block;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.sms-pill.sent {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.sms-pill.failed {
  background: #fff5ef;
  color: #9a4317;
}

.sms-pill.edited {
  background: #fff8e6;
  color: #7a5a00;
}

.diary-title {
  align-items: flex-start;
  gap: 14px;
}

.diary-week-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.diary-week-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 18px;
}

.diary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.diary-toggle input {
  width: auto;
  min-height: auto;
}

.completed-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.completed-filter-grid label {
  margin: 0;
}

.completed-filter-grid button {
  min-height: 42px;
}

.diary-daysheet {
  display: grid;
  gap: 18px;
}

.diary-day {
  border: 1px solid #e2d1c2;
  border-radius: 8px;
  background: #fffaf5;
  overflow: hidden;
}

.diary-day-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #c76b33;
  color: #ffffff;
}

.diary-day-header h3 {
  margin: 0;
  font-size: 18px;
}

.diary-day-summary {
  display: block;
  margin-top: 3px;
  color: #fff4eb;
  font-size: 12px;
  font-weight: 700;
}

.diary-rego-group {
  margin: 10px;
  border: 1px solid #e5e0da;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.diary-rego-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #e6edf1;
  background: #f6f8f8;
}

.diary-rego-header h4 {
  margin: 0;
  font-size: 15px;
  color: var(--brand-dark);
}

.diary-rego-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.diary-job-list {
  display: grid;
  gap: 0;
  overflow-x: auto;
}

.diary-job-card {
  gap: 0;
  padding: 0;
  border-bottom: 1px solid #edf1f4;
}

.diary-job-card:last-child {
  border-bottom: 0;
}

.diary-job-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.diary-job-title strong {
  color: var(--brand-dark);
}

.diary-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diary-badge {
  border: 1px solid #dce5ea;
  border-radius: 999px;
  background: #f8fafb;
  color: #42515f;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.diary-job-row {
  align-items: stretch;
  background: #ffffff;
  display: grid;
  grid-template-columns:
    minmax(62px, 0.45fr)
    minmax(78px, 0.5fr)
    minmax(150px, 1.05fr)
    minmax(78px, 0.5fr)
    minmax(150px, 1.05fr)
    minmax(145px, 0.95fr)
    minmax(116px, 0.65fr)
    minmax(105px, 0.65fr)
    minmax(120px, 0.7fr)
    minmax(95px, 0.55fr)
    minmax(150px, 1fr)
    minmax(170px, 0.95fr)
    minmax(190px, 1fr);
  min-width: 1580px;
}

.diary-job-header-row {
  background: #f1f5f5;
  border-bottom: 1px solid #dce5ea;
  color: #52616e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  min-height: 34px;
  text-transform: uppercase;
}

.completed-jobs-list .diary-day-header {
  background: #1f2937;
}

.completed-job-row {
  background: #fbfdff;
}

.completed-job-header-row,
.completed-job-row {
  grid-template-columns:
    minmax(70px, 0.55fr)
    minmax(90px, 0.7fr)
    minmax(140px, 1.15fr)
    minmax(140px, 1.15fr)
    minmax(140px, 1fr)
    minmax(88px, 0.65fr)
    minmax(95px, 0.75fr)
    minmax(95px, 0.75fr)
    minmax(95px, 0.75fr)
    minmax(85px, 0.65fr)
    minmax(92px, 0.7fr)
    minmax(105px, 0.8fr)
    minmax(130px, 0.9fr);
}

.diary-row-cell {
  border-right: 1px solid #edf1f4;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 9px;
}

.diary-row-cell:last-child {
  border-right: 0;
}

.diary-row-cell strong {
  color: #24313d;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.diary-row-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.diary-mobile-label {
  display: none;
}

.diary-inline-input {
  border: 1px solid #d6e0e6;
  border-radius: 6px;
  min-height: 32px;
  padding: 6px 7px;
  width: 100%;
}

.diary-qty-cell,
.diary-status-cell,
.diary-row-actions {
  align-content: start;
  display: grid;
  gap: 5px;
}

.diary-status-cell {
  align-items: start;
}

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

.diary-row-actions .edit-button,
.diary-row-actions .delete-button,
.diary-row-actions .secondary,
.diary-row-actions .ready-button {
  min-height: 30px;
  padding: 5px 7px;
  text-align: center;
}

.diary-small-action {
  font-size: 12px;
}

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

.diary-stop {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-left: 3px solid #b8dad8;
  padding-left: 9px;
}

.diary-stop span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.diary-stop strong {
  color: var(--ink);
  font-size: 14px;
}

.diary-stop p,
.diary-note {
  margin: 0;
  color: #52616e;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.diary-note {
  border-left: 3px solid #e4c7a5;
  padding-left: 9px;
}

.diary-job-side {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: end;
}

.diary-status-select {
  min-height: 32px;
  width: 100%;
}

.diary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.diary-actions .edit-button,
.diary-actions .delete-button {
  padding: 6px 8px;
}

.diary-invoice-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(100px, 0.45fr) minmax(140px, 0.65fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid #eef2f5;
  padding-top: 10px;
}

.diary-invoice-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.diary-invoice-panel input {
  width: 100%;
  min-height: 38px;
}

.diary-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  align-items: center;
}

.ready-button {
  background: var(--brand);
  color: #ffffff;
  border: 1px solid var(--brand);
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
}

.ready-button.is-ready {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.invoice-status-pill {
  display: inline-block;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.invoice-ready {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.invoice-drafted {
  background: #fff8e6;
  color: #7a5a00;
}

.invoice-invoiced {
  background: #edf7ed;
  color: #2f6f3a;
}

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

.accounts-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.accounts-summary-card {
  display: grid;
  gap: 5px;
  border: 1px solid #dce5ea;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.accounts-summary-card span,
.accounts-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.accounts-summary-card strong {
  font-size: 18px;
  color: var(--ink);
}

.accounts-summary-card em,
.accounts-group-card em {
  color: #9a4317;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.accounts-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 12px 0 16px;
}

.accounts-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.xero-json-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.xero-json-panel textarea {
  display: none;
}

.xero-json-panel.is-open textarea {
  display: block;
}

.xero-payload-status {
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.xero-payload-status.is-valid {
  border-color: #b8dad8;
  background: #e8f3f2;
  color: var(--brand-dark);
}

.xero-payload-status.is-invalid {
  border-color: #efc4a9;
  background: #fff5ef;
  color: #9a4317;
}

.xero-json-panel textarea {
  width: 100%;
  min-height: 190px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  resize: vertical;
}

.accounts-group-card {
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 35, 45, 0.05);
}

.accounts-group-card > details > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid #e6edf1;
  background: #f4f8fa;
  padding: 11px 12px;
}

.accounts-group-card > details > summary::before {
  content: "▾";
  color: var(--brand);
  font-size: 15px;
  font-weight: 900;
}

.accounts-group-card > details:not([open]) > summary::before {
  content: "▸";
}

.accounts-group-card > details > summary::-webkit-details-marker {
  display: none;
}

.accounts-group-card > details > summary strong {
  color: var(--brand-dark);
  font-size: 17px;
}

.accounts-group-card > details > summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.accounts-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  border-bottom: 1px solid #edf1f4;
  padding: 10px 12px;
}

.invoice-load-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.invoice-load-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dce5ea;
  border-left: 5px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.invoice-row-drafted {
  border-left-color: #d4a21f;
}

.invoice-row-invoiced {
  border-left-color: #2f8a45;
}

.invoice-load-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.invoice-load-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.invoice-load-heading strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.invoice-load-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-load-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.invoice-route-stop {
  border: 1px solid #e4ebef;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 9px 10px;
}

.invoice-route-stop summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  list-style: none;
}

.invoice-route-stop summary::-webkit-details-marker {
  display: none;
}

.invoice-route-stop small,
.invoice-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-route-stop strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.invoice-route-stop span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.invoice-load-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(95px, 1fr));
  gap: 8px;
}

.invoice-inline-edit {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(135px, 1fr) minmax(110px, 0.8fr) minmax(180px, 1.4fr);
  gap: 8px;
  align-items: end;
  border: 1px solid #e4ebef;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.invoice-edit-field {
  display: grid;
  gap: 5px;
}

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

.invoice-edit-field input,
.invoice-edit-field textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfdde2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 9px;
}

.invoice-edit-field textarea {
  min-height: 36px;
  resize: vertical;
}

.invoice-metric {
  display: grid;
  gap: 3px;
  border: 1px solid #e4ebef;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 9px;
}

.invoice-metric strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.invoice-metric.large {
  border-color: #c8dadd;
  background: #f2f8f8;
}

.invoice-metric.large strong {
  color: var(--brand-dark);
  font-size: 20px;
}

.invoice-metric.amount {
  border-color: #bddbd4;
  background: #ecf8f4;
}

.invoice-load-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.invoice-info-badge {
  border-radius: 999px;
  background: #eef3f4;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.invoice-info-badge.good {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.invoice-info-badge.warn {
  background: #fff8e6;
  color: #7a5a00;
}

.invoice-load-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.invoice-load-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.invoice-batch-table-wrap {
  overflow-x: visible;
}

.invoice-batch-table {
  border-collapse: collapse;
  min-width: 1320px;
  width: 100%;
}

.invoice-batch-table th,
.invoice-batch-table td {
  border-bottom: 1px solid #edf1f4;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.invoice-batch-table th {
  background: #fbfcfd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-batch-table td {
  color: var(--ink);
  font-size: 13px;
}

.invoice-batch-table td > span {
  display: block;
}

.invoice-batch-table .strong-cell {
  font-weight: 800;
}

.invoice-batch-table .stop-cell {
  min-width: 190px;
  max-width: 240px;
  white-space: normal;
}

.invoice-stop-cell {
  display: grid;
  gap: 4px;
}

.invoice-stop-cell strong {
  display: -webkit-box;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.invoice-stop-cell details {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.invoice-stop-cell summary {
  cursor: pointer;
  list-style-position: inside;
}

.invoice-stop-cell details span {
  display: block;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.invoice-batch-table .numeric-cell {
  text-align: right;
  white-space: nowrap;
}

.invoice-batch-table .status-cell {
  min-width: 240px;
}

.invoice-batch-table .actions-cell {
  min-width: 190px;
}

.invoice-batch-row:hover {
  background: #fbfcfd;
}

.mobile-cell-label {
  display: none;
}

.invoice-row-status,
.invoice-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.invoice-row-status span:not(.invoice-status-pill):not(.readiness-badge):not(.accounts-warning) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  width: 100%;
}

.invoice-row-actions button {
  min-height: 30px;
  padding: 5px 8px;
}

.invoice-review-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(165px, auto);
  gap: 14px;
  border: 1px solid #dce5ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.subbie-pay-card {
  grid-template-columns: minmax(0, 1fr) minmax(165px, auto);
}

.rcti-rate-editor {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rcti-rate-editor label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  max-width: 180px;
}

.rcti-rate-editor input {
  margin-top: 4px;
}

.accounts-select {
  display: flex;
  gap: 7px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.invoice-review-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.invoice-review-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
}

.invoice-review-meta span {
  display: grid;
  gap: 3px;
  border: 1px solid #e4ebef;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.invoice-review-meta small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.xero-preview-panel {
  display: grid;
  gap: 9px;
  border: 1px solid #e1e8ee;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 11px;
}

.xero-preview-panel > strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.xero-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.xero-line-preview {
  margin: 0;
  color: #42515f;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.docket-attachment-indicator {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
  padding: 8px 10px;
  width: fit-content;
}

.compact-docket-indicator {
  font-size: 12px;
  margin-top: 0;
  padding: 5px 7px;
}

.docket-attachment-indicator.has-docket {
  background: #ecfdf3;
  color: #116329;
}

.docket-attachment-indicator.missing-docket {
  background: #fff7ed;
  color: #9a3412;
}

.invoice-review-actions {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: stretch;
}

.readiness-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.readiness-green {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.readiness-amber {
  background: #fff8e6;
  color: #7a5a00;
}

.readiness-red {
  background: #fff5ef;
  color: #9a4317;
}

.pay-ready {
  background: #fff8e6;
  color: #7a5a00;
}

.pay-paid {
  background: #e8f3f2;
  color: var(--brand-dark);
}

.pay-drafted {
  background: #eef2ff;
  color: #3730a3;
}

.pay-sent {
  background: #ecfeff;
  color: #155e75;
}

.diary-empty {
  border: 1px dashed #cbd8da;
  border-radius: 8px;
  background: #f8fbfc;
}

.docket-preview {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.docket-preview img {
  width: min(100%, 280px);
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.driver-submission-card .invoice-review-actions {
  align-content: start;
}

.driver-submission-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.driver-submission-meta-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
}

.driver-submission-meta-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.driver-submission-meta-item strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.driver-submission-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.driver-submission-edit-grid label {
  color: var(--muted);
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.driver-submission-edit-grid textarea {
  min-height: 64px;
}

.driver-submission-edit-grid label:has(textarea) {
  grid-column: span 2;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

@media (max-width: 860px) {
  .app-header,
  .layout {
    display: block;
  }

  .dashboard-grid,
  .rego-dashboard,
  .chase-dashboard {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .side-stack,
  .weekly-panel,
  .costs-panel,
  .chase-panel,
  .invoicing-panel,
  .subbie-pay-panel,
  .completed-jobs-panel,
  .diary-panel {
    margin-top: 18px;
  }

  .nav-group {
    width: 100%;
  }

  .nav-menu-toggle {
    width: 100%;
  }

  .nav-submenu {
    margin-top: 6px;
    position: static;
  }

  .diary-title {
    display: grid;
  }

  .diary-title .search,
  .diary-week-controls button,
  .diary-toggle,
  .diary-status-select {
    width: 100%;
    max-width: none;
  }

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

  .diary-job-list {
    overflow-x: visible;
  }

  .diary-job-header-row {
    display: none;
  }

  .diary-job-row {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .diary-row-cell {
    border-right: 0;
    border-bottom: 1px solid #edf1f4;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .diary-mobile-label {
    display: block;
    text-transform: uppercase;
  }

  .diary-col-qty,
  .diary-col-status,
  .diary-col-actions,
  .diary-col-docket,
  .diary-col-notes {
    grid-template-columns: 1fr;
  }

  .diary-job-card,
  .diary-route-grid,
  .diary-invoice-panel,
  .driver-submission-edit-grid,
  .driver-submission-meta-grid,
  .invoice-review-card {
    grid-template-columns: 1fr;
  }

  .driver-submission-edit-grid label:has(textarea) {
    grid-column: auto;
  }

  .accounts-toolbar,
  .accounts-group-actions {
    display: grid;
  }

  .accounts-toolbar label {
    min-width: 0;
  }

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

  .invoice-load-top,
  .invoice-load-route,
  .invoice-load-metrics,
  .invoice-inline-edit {
    grid-template-columns: 1fr;
  }

  .invoice-load-actions {
    display: grid;
  }

  .invoice-batch-table {
    min-width: 0;
  }

  .invoice-batch-table thead {
    display: none;
  }

  .invoice-batch-table,
  .invoice-batch-table tbody,
  .invoice-batch-table tr,
  .invoice-batch-table td {
    display: block;
    width: 100%;
  }

  .invoice-batch-table tr {
    border-bottom: 1px solid #dce5ea;
    padding: 8px 0;
  }

  .invoice-batch-table td {
    border-bottom: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: 108px minmax(0, 1fr);
    padding: 6px 10px;
    text-align: left;
  }

  .invoice-batch-table .numeric-cell {
    text-align: left;
  }

  .invoice-batch-table .stop-cell {
    max-width: none;
    min-width: 0;
  }

  .mobile-cell-label {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .diary-job-side,
  .invoice-review-actions {
    justify-items: stretch;
  }

  .diary-actions,
  .diary-invoice-actions {
    justify-content: flex-start;
  }

  .form-grid,
  .compact-form,
  .subbie-xero-controls,
  .user-form,
  .dispatch-workbench,
  .contract-split-panel,
  .bulk-form,
  .chase-form,
  .weekly-start-row,
  .weekly-form,
  .quote-form,
  .quote-cost-grid,
  .cost-form,
  .pending-form,
  .input-row {
    grid-template-columns: 1fr;
  }

  .pending-dashboard-head,
  .pending-dispatch-layout,
  .pending-form-grid,
  .pending-location-grid,
  .pending-card-grid {
    grid-template-columns: 1fr;
  }

  .pending-dashboard-head {
    align-items: stretch;
    display: grid;
  }

  .pending-summary-badges {
    justify-content: flex-start;
  }

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

  .pending-form .client-picker-field,
  .pending-form .location-picker-field,
  .pending-form #pendingPickupAddress,
  .pending-form #pendingDeliveryAddress,
  .pending-form textarea {
    grid-column: auto;
  }

  .chase-form textarea {
    grid-column: auto;
  }

  .contract-panel {
    position: static;
  }

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

  .search {
    max-width: none;
  }
}

/* UI polish pass: visual/layout only. */
:root {
  --ink: #16202a;
  --muted: #64707d;
  --line: #dce3ea;
  --panel: #ffffff;
  --bg: #eef3f6;
  --brand: #176f6b;
  --brand-dark: #0d4f4d;
  --accent: #c76531;
  --soft: #eef8f7;
  --warning-soft: #fff4dc;
  --danger-soft: #fff0ed;
  --shadow: 0 10px 24px rgba(15, 31, 45, 0.07);
  --shadow-soft: 0 3px 10px rgba(15, 31, 45, 0.05);
}

body {
  background:
    linear-gradient(180deg, #e8f0f3 0, #eef3f6 240px),
    var(--bg);
}

.app-header {
  background: linear-gradient(135deg, #102c31 0%, #17474a 62%, #245a50 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(12, 28, 34, 0.16);
  padding-block: 22px;
}

.app-header h1 {
  line-height: 1;
}

.header-actions {
  justify-content: flex-end;
}

.app-header .secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.app-header .secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-nav {
  align-items: center;
  box-shadow: 0 1px 0 rgba(15, 31, 45, 0.04);
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-nav button,
.app-nav .nav-link {
  background: transparent;
  border-color: transparent;
  color: #31515a;
  min-height: 38px;
  padding: 9px 11px;
}

.app-nav button:hover,
.app-nav .nav-link:hover {
  background: #edf4f6;
}

.app-nav button.active,
.nav-group.active > .nav-menu-toggle {
  background: #e6f4f3;
  border-color: #abd4d1;
  color: var(--brand-dark);
}

.layout {
  grid-template-columns: 1fr;
  margin: 0 auto;
  max-width: 1540px;
  padding-top: 24px;
}

.panel {
  border-color: #e1e8ee;
  box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 24px);
}

.section-title {
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 12px;
}

.section-title.small {
  border-bottom: 0;
  padding-bottom: 0;
}

.section-title h2 {
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.15;
}

.section-title h3 {
  color: #24313b;
  font-size: 15px;
}

.section-title span,
.inline-status,
#plannerStatus {
  border-radius: 999px;
}

.dashboard-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.dashboard-tile,
.rego-card,
.weekly-summary div,
.cost-summary div,
.quote-summary div {
  background: #ffffff;
  border-color: #dbe9e8;
  box-shadow: var(--shadow-soft);
}

.dashboard-tile {
  min-height: 118px;
  padding: 16px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.dashboard-tile:hover {
  background: #ffffff;
  border-color: #9accca;
  box-shadow: 0 12px 22px rgba(20, 83, 80, 0.1);
  transform: translateY(-1px);
}

.dashboard-tile strong {
  color: var(--ink);
  font-size: clamp(25px, 2.3vw, 34px);
  letter-spacing: 0;
}

.rego-dashboard,
.chase-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.rego-card {
  border-left: 4px solid var(--brand);
  padding: 14px;
}

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

.form-grid label:not(.wide) {
  grid-column: span 2;
}

label {
  color: #52616e;
}

input,
select,
textarea {
  border-color: #d0d9e2;
  min-height: 42px;
}

textarea {
  line-height: 1.4;
}

.input-row {
  align-items: stretch;
}

.client-picker-field,
.location-picker-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field-label-row {
  align-items: center;
  color: #52616e;
  display: flex;
  font-weight: 700;
  gap: 10px;
  justify-content: space-between;
}

.quiet-button {
  background: #edf6f6;
  border: 1px solid #d6e8e7;
  color: #215b59;
  font-size: 12px;
  min-height: 30px;
  padding: 5px 9px;
}

.quiet-button:hover {
  background: #dff0ef;
}

.inline-add-panel {
  background: #ffffff;
  border: 1px solid #d6e8e7;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 9px;
}

.location-picker-field .inline-add-panel,
.saved-location-field .inline-add-panel {
  gap: 10px;
  grid-template-columns: 1fr;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px;
  width: min(100%, 560px);
}

.location-picker-field .inline-add-panel input,
.location-picker-field .inline-add-panel textarea,
.saved-location-field .inline-add-panel input,
.saved-location-field .inline-add-panel textarea {
  grid-column: 1 / -1;
  width: 100%;
}

.location-picker-field .inline-add-actions,
.saved-location-field .inline-add-actions {
  justify-content: flex-start;
}

.inline-add-panel.hidden {
  display: none;
}

.inline-add-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.inline-add-actions button {
  min-height: 34px;
  min-width: 86px;
  padding: 7px 10px;
}

.inline-add-suggestion {
  background: #f5fbfa;
  border: 1px dashed #9fcfcc;
  color: #195b58;
  font-size: 13px;
  justify-content: flex-start;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.search-combo {
  position: relative;
  width: 100%;
}

.search-combo-native {
  bottom: 0;
  height: 1px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.search-combo-trigger {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d0d9e2;
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  overflow: hidden;
  padding: 9px 38px 9px 11px;
  position: relative;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.search-combo-trigger::after {
  color: #6b7885;
  content: "v";
  font-size: 12px;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.search-combo-trigger.is-empty {
  color: #71808f;
}

.search-combo-panel {
  background: #ffffff;
  border: 1px solid #cad8d9;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(22, 32, 42, 0.16);
  display: grid;
  gap: 8px;
  left: 0;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.search-combo-panel.hidden {
  display: none;
}

.search-combo-input {
  min-height: 38px;
}

.search-combo-options {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
}

.search-combo-option {
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #25313c;
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 9px;
  text-align: left;
  white-space: normal;
}

.search-combo-option:hover,
.search-combo-option.selected {
  background: #edf6f6;
  border-color: #c9e1df;
  color: #194f4c;
}

.search-combo-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 9px;
}

button,
.link-button {
  min-height: 40px;
}

.job-panel,
.contract-panel {
  background: #ffffff;
  border-color: #e1e8ee;
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.job-panel-wide,
.contract-panel-wide {
  max-width: none;
}

.contracts-workbench {
  display: grid;
  gap: 16px;
}

.contract-bank-list {
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 4px;
}

.contract-progress-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.contract-progress-head h3 {
  margin: 0;
}

.contract-progress-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contract-progress-head input {
  max-width: 360px;
}

.contract-progress-tools {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 360px) 130px auto;
}

.contract-progress-tools input,
.contract-progress-tools select {
  width: 100%;
}

.contract-progress-grid {
  display: grid;
  gap: 12px;
}

.contract-progress-card {
  background: #ffffff;
  border: 1px solid #e1e8ee;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.contract-progress-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.contract-progress-title h4,
.contract-progress-title p {
  margin: 0;
}

.contract-progress-title p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.contract-progress-bar {
  background: #e8f0ef;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.contract-progress-bar span {
  background: linear-gradient(90deg, var(--brand), #0f8f77);
  display: block;
  height: 100%;
}

.contract-progress-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.contract-progress-metric {
  background: var(--soft);
  border: 1px solid #d9e7e5;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
}

.contract-progress-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.contract-progress-metric strong {
  color: var(--brand-dark);
  font-size: 17px;
}

.contract-progress-loads {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.contract-progress-loads summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 800;
}

.contract-progress-load-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.contract-progress-load-row {
  align-items: center;
  background: #f8fbfb;
  border: 1px solid #e0e9e8;
  border-radius: 8px;
  display: grid;
  font-size: 13px;
  gap: 8px;
  grid-template-columns: 100px 88px 80px 80px 110px minmax(120px, 1fr);
  padding: 8px 10px;
}

.contract-card {
  background: #ffffff;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(22, 32, 42, 0.04);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 12px;
}

.previous-contracts-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.contract-card-archived {
  background: #f8fbfb;
  border-style: dashed;
  box-shadow: none;
}

.contract-card-archived .contract-card-title {
  color: var(--muted);
}

.contract-card-main,
.contract-card-text {
  min-width: 0;
}

.contract-card-text {
  display: grid;
  gap: 7px;
}

.contract-card-title {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.contract-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contract-card-metrics span {
  background: #f5fbfa;
  border: 1px solid #d6e8e7;
  border-radius: 999px;
  color: #215b59;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.contract-card-route {
  color: #52616e;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contract-planner-controls {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.45fr) minmax(130px, 0.55fr) minmax(120px, 0.45fr);
}

.contract-planner-controls label {
  color: #52616e;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.contract-planner-controls .inline-toggle {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #dbe5eb;
  border-radius: 8px;
  display: flex;
  min-height: 38px;
  padding: 7px 9px;
}

.contract-planner-controls input,
.contract-planner-controls select {
  min-height: 36px;
}

.contract-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.contract-card-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.contract-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.contract-form textarea,
.contract-form button {
  grid-column: auto;
}

.contract-form-section {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.contract-form-section h4 {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.contract-form-section label,
.contract-form-section .client-picker-field,
.contract-split-toolbar label {
  color: #52616e;
  font-weight: 700;
}

.contract-form-section label > span {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}

.contract-form-section label > .field-label-row,
.saved-location-field > .field-label-row {
  display: flex;
}

.contract-section-grid,
.contract-stop-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contract-section-grid label:first-child,
.contract-section-grid .client-picker-field:first-child {
  grid-column: 1 / -1;
}

.contract-stop-grid .wide {
  grid-column: 1 / -1;
}

.contract-exfarm-toggle {
  align-self: end;
  background: #ffffff;
  grid-column: 1 / -1;
  margin-top: 0;
}

.contract-notes-section {
  grid-column: 1 / -1;
}

.contract-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contract-form-actions button {
  min-width: 150px;
}

@media (max-width: 860px) {
  .contract-progress-head,
  .contract-progress-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .contract-progress-head input {
    max-width: none;
  }

  .contract-progress-tools {
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  .contract-progress-load-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contract-split-panel,
  .contract-form,
  .contract-section-grid,
  .contract-stop-grid,
  .contract-card,
  .planner-pool-row,
  .planner-pool-controls {
    grid-template-columns: 1fr;
  }

  .contract-card-actions {
    justify-content: flex-start;
  }

  .contract-planner-controls {
    grid-template-columns: 1fr;
  }

  .contract-card-actions button,
  .contract-form-actions button {
    flex: 1 1 120px;
  }
}

.message-box {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  margin-top: 18px;
  padding: 14px;
}

.message-box textarea {
  background: #ffffff;
}

.planner-fleet {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.planner-truck-row {
  background: #ffffff;
  border-color: #dbe9e8;
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.planner-output {
  display: grid;
  gap: 12px;
}

.plan-summary {
  background: #f5fbfa;
  border-color: #b9dcda;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.plan-rego-summaries {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.plan-rego-summary {
  border-color: #e1e8ee;
  box-shadow: var(--shadow-soft);
}

.plan-day {
  background: #ffffff;
  border: 1px solid #e1e8ee;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.plan-day > header {
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 10px;
}

.plan-card {
  border-color: #e1e8ee;
  box-shadow: var(--shadow-soft);
  gap: 10px;
  padding: 13px 14px;
}

.plan-card header {
  align-items: flex-start;
}

.plan-card header strong {
  font-size: 15px;
}

.plan-metrics {
  justify-content: flex-start;
}

.plan-metrics span,
.plan-flag {
  background: #edf6f6;
  border: 1px solid #d6e8e7;
  color: #215b59;
  font-size: 12px;
}

.plan-flag {
  line-height: 1.35;
}

.plan-flag.warning {
  background: var(--warning-soft);
  border-color: #eed8a8;
}

.plan-flag.danger {
  background: var(--danger-soft);
  border-color: #efc7c0;
}

.weekly-start-row,
.weekly-form,
.cost-form,
.quote-form {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  padding: 12px;
}

.weekly-form {
  grid-template-columns: minmax(160px, 0.9fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(180px, 1fr) minmax(180px, 1fr);
}

.weekly-form button,
.weekly-form input,
.weekly-form select {
  min-width: 0;
}

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

.weekly-summary div,
.cost-summary div,
.quote-summary div {
  border-left: 4px solid var(--brand);
  padding: 13px 14px;
}

.weekly-summary strong,
.cost-summary strong,
.quote-summary strong {
  color: var(--ink);
  font-size: 20px;
}

.cost-summary,
.quote-summary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cost-form {
  grid-template-columns: minmax(100px, 0.8fr) repeat(3, minmax(110px, 1fr)) repeat(3, minmax(130px, 1fr));
}

.cost-form button {
  min-width: 120px;
}

.quote-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.quote-form button {
  min-width: 130px;
}

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

.table-wrap {
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  background: #ffffff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #f3f7f9;
  color: #52616e;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:nth-child(even) td {
  background: #fbfdfe;
}

tbody tr:hover td {
  background: #f4faf9;
}

td {
  color: #263542;
}

.sms-pill,
.edit-button,
.delete-button,
.secondary {
  border-radius: 6px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .form-grid,
  .weekly-form,
  .cost-form,
  .quote-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid label:not(.wide) {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .app-header {
    display: grid;
    gap: 16px;
  }

  .app-nav {
    max-height: 48vh;
    overflow-y: auto;
    position: static;
  }

  .app-nav button,
  .app-nav .nav-link {
    justify-content: center;
    width: 100%;
  }

  .layout {
    padding: 14px 12px 28px;
  }

  .panel,
  .job-panel,
  .contract-panel,
  .planner-fleet,
  .weekly-start-row,
  .weekly-form,
  .cost-form,
  .quote-form {
    padding: 14px;
  }

  .dashboard-grid,
  .form-grid,
  .weekly-form,
  .cost-form,
  .quote-form,
  .quote-cost-grid {
    grid-template-columns: 1fr;
  }

  .form-grid label:not(.wide) {
    grid-column: 1 / -1;
  }

  .input-row,
  .title-actions,
  .actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .title-actions > *,
  .actions > *,
  .input-row > * {
    width: 100%;
  }

  .plan-day > header,
  .plan-card header,
  .plan-unplanned-row {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-summary,
  .cost-summary,
  .quote-summary,
  .plan-rego-summaries {
    grid-template-columns: 1fr;
  }

  .quote-map {
    min-height: 320px;
  }

  .location-columns > div {
    padding: 12px;
  }

  .location-card {
    grid-template-columns: 1fr;
  }

  .location-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .location-actions button {
    width: 100%;
  }

  .location-edit-form {
    grid-template-columns: 1fr;
  }

  .location-edit-actions {
    flex-direction: column;
  }
}

.allocation-panel > .section-title {
  margin-bottom: 14px;
}

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

.dispatch-job-form .job-entry-card {
  background: #ffffff;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.dispatch-job-form .job-header-card,
.dispatch-job-form .load-card,
.dispatch-job-form .notes-message-card {
  grid-column: 1 / -1;
}

.dispatch-job-form .pickup-card {
  grid-column: span 6;
}

.dispatch-job-form .delivery-card {
  grid-column: span 6;
}

.job-entry-heading {
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.job-entry-heading h3 {
  color: #1f2c36;
  font-size: 16px;
  margin: 0;
}

.job-entry-heading span {
  background: #e6f4f3;
  border: 1px solid #abd4d1;
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.job-entry-grid,
.notes-message-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.header-grid {
  grid-template-columns: minmax(150px, 0.75fr) minmax(230px, 1.25fr) minmax(230px, 1.25fr) minmax(150px, 0.75fr);
}

.load-grid {
  grid-template-columns: minmax(160px, 1fr) minmax(105px, 0.6fr) repeat(2, minmax(145px, 0.75fr)) minmax(260px, 1.5fr);
}

.stop-grid {
  grid-template-columns: minmax(0, 1fr) minmax(135px, 0.45fr);
}

.stop-grid .saved-location-field,
.stop-grid .address-field,
.stop-grid .details-field {
  grid-column: 1 / -1;
}

.notes-message-grid {
  align-items: stretch;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
}

.dispatch-job-form .message-box {
  background: #f8fbfc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

.dispatch-job-form .message-box textarea,
.dispatch-job-form #jobDiary {
  min-height: 174px;
}

.map-action-row {
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(112px, auto);
}

.dispatch-actions {
  border-top: 1px solid #edf1f4;
  justify-content: flex-end;
  padding-top: 12px;
}

.dispatch-actions #saveAllocationButton {
  min-width: 220px;
}

.dispatch-actions .send-button {
  min-width: 120px;
}

.dispatch-actions .secondary,
.dispatch-actions .link-button {
  min-width: 105px;
}

.dispatch-job-form label {
  min-width: 0;
}

.dispatch-job-form input,
.dispatch-job-form select,
.dispatch-job-form textarea {
  min-width: 0;
}

.clients-panel {
  display: grid;
  gap: 18px;
}

.clients-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
}

.client-bank,
.client-detail-form {
  background: #ffffff;
  border: 1px solid #dde5ea;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
  padding: 16px;
}

.client-bank {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
}

.client-bank-list {
  display: grid;
  gap: 8px;
  max-height: 680px;
  overflow: auto;
  padding-right: 2px;
}

.client-bank-card {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #dce6ea;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.client-bank-card:hover,
.client-bank-card.active {
  background: var(--soft);
  border-color: rgba(25, 112, 109, 0.45);
}

.client-bank-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.client-bank-card strong,
.client-bank-card small {
  overflow-wrap: anywhere;
}

.client-bank-card small {
  color: var(--muted);
  font-size: 12px;
}

.client-bank-card em {
  background: #eef3f4;
  border: 1px solid #d7e0e3;
  border-radius: 999px;
  color: var(--brand-dark);
  flex: 0 0 auto;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  padding: 4px 8px;
}

.client-detail-form {
  display: grid;
  gap: 16px;
}

.client-form-section {
  border: 1px solid #edf1f4;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.client-form-section h3 {
  border-bottom: 1px solid #edf1f4;
  color: var(--brand-dark);
  font-size: 15px;
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 8px;
}

.client-form-section label {
  display: grid;
  gap: 6px;
  margin: 0;
}

.client-form-section textarea,
.client-form-section label:has(textarea),
.client-form-section .inline-toggle {
  grid-column: 1 / -1;
}

.client-form-section .inline-toggle {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
}

.client-form-section .inline-toggle input {
  width: auto;
}

.client-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.client-locations-panel {
  background: #ffffff;
  border: 1px solid #dde5ea;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
  display: grid;
  gap: 14px;
  padding: 16px;
}

.client-linked-locations {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.client-linked-location-card {
  background: #f8fbfc;
  border: 1px solid #dde7ec;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.client-linked-location-card strong {
  color: var(--ink);
}

.client-linked-location-card small {
  color: var(--muted);
}

.client-linked-location-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

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

.client-report-panel {
  display: grid;
  gap: 16px;
}

.reports-panel {
  max-width: 1380px;
}

.reports-panel .client-report-panel {
  border: 1px solid #dce6df;
  box-shadow: 0 16px 36px rgba(15, 47, 33, 0.08);
}

.client-report-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

.client-report-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.client-report-toolbar input,
.client-report-toolbar select {
  width: 100%;
}

.client-report-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-report-presets button {
  min-height: 36px;
  padding: 8px 12px;
}

.client-report-presets button.active {
  background: #e8f5ed;
  border-color: #8fc5a2;
  color: var(--brand-dark);
}

.compact-report-summary {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.client-report-output {
  display: grid;
  gap: 12px;
}

.client-report-group {
  background: #ffffff;
  border: 1px solid #dde5ea;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(30, 41, 59, 0.06);
  overflow: hidden;
}

.client-report-group header {
  align-items: center;
  background: #f6faf7;
  border-bottom: 1px solid #dde5ea;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.client-report-group h4,
.client-report-group p {
  margin: 0;
}

.client-report-group h4 {
  color: var(--brand-dark);
  font-size: 1rem;
}

.client-report-group p {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.client-report-table-wrap {
  overflow-x: auto;
}

.client-report-table {
  border-collapse: collapse;
  min-width: 880px;
  width: 100%;
}

.client-report-table th,
.client-report-table td {
  border-bottom: 1px solid #edf1ee;
  font-size: 0.84rem;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.client-report-table th {
  background: #fbfcfb;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-report-text {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  min-height: 180px;
  width: 100%;
}

@media (max-width: 1200px) {
  .dispatch-job-form .pickup-card,
  .dispatch-job-form .delivery-card {
    grid-column: 1 / -1;
  }

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

  .load-grid .contract-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .clients-layout,
  .client-location-columns,
  .client-form-section,
  .client-report-toolbar,
  .compact-report-summary {
    grid-template-columns: 1fr;
  }

  .client-bank {
    position: static;
  }

  .dispatch-job-form {
    grid-template-columns: 1fr;
  }

  .dispatch-job-form .job-entry-card,
  .dispatch-job-form .pickup-card,
  .dispatch-job-form .delivery-card {
    grid-column: 1 / -1;
  }

  .job-entry-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-grid,
  .load-grid,
  .stop-grid,
  .notes-message-grid,
  .map-action-row {
    grid-template-columns: 1fr;
  }

  .dispatch-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dispatch-actions > * {
    width: 100%;
  }
}

/* Riverina Logistics dashboard skin: visual only. */
:root {
  --ink: #111c22;
  --muted: #60707a;
  --line: #dde7eb;
  --panel: #ffffff;
  --bg: #eef4f6;
  --brand: #00624f;
  --brand-dark: #003c34;
  --brand-deep: #062c2c;
  --brand-mid: #08463f;
  --accent: #e4a93b;
  --accent-soft: #fff6df;
  --soft: #eaf6f3;
  --shadow: 0 18px 45px rgba(10, 35, 39, 0.09);
  --shadow-soft: 0 8px 24px rgba(10, 35, 39, 0.06);
}

body {
  background:
    radial-gradient(circle at top right, rgba(228, 169, 59, 0.08), transparent 280px),
    linear-gradient(180deg, #f8fbfc 0, #eef4f6 260px),
    var(--bg);
  color: var(--ink);
}

.app-header {
  align-items: center;
  background:
    linear-gradient(135deg, #022f2a 0%, #073f38 46%, #0b5a4a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 38px rgba(4, 32, 32, 0.28);
  min-height: 96px;
  padding: 18px clamp(18px, 3.2vw, 42px);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-logo {
  display: block;
  width: clamp(150px, 17vw, 230px);
  max-height: 58px;
  object-fit: contain;
}

.app-header .brand-logo {
  filter: brightness(0) invert(1);
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 2px solid rgba(238, 196, 90, 0.78);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 34%, rgba(228, 169, 59, 0.22), transparent 44%),
    rgba(255, 255, 255, 0.06);
  color: #f7d47e;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-header .eyebrow {
  margin: 0 0 2px;
  color: #e4a93b;
  font-size: 12px;
  font-weight: 900;
}

.app-header h1 {
  color: #ffffff;
  font-size: clamp(28px, 3.3vw, 42px);
  letter-spacing: 0;
  text-transform: none;
}

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

.header-user {
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.header-user strong {
  color: #ffffff;
  font-size: 14px;
}

.header-tools-menu {
  position: relative;
}

.header-tool-toggle {
  min-height: 40px;
}

.header-tools-submenu {
  left: auto;
  right: 0;
  min-width: 210px;
}

.app-header .secondary,
.app-header .ghost,
.app-header .header-tool-toggle {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
}

.app-header .secondary:hover,
.app-header .ghost:hover,
.app-header .header-tool-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.app-nav {
  background: #ffffff;
  border-bottom: 1px solid #dce8eb;
  box-shadow: 0 8px 22px rgba(12, 44, 48, 0.06);
  gap: 6px;
  padding: 11px clamp(18px, 3.2vw, 42px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-nav button,
.app-nav .nav-link {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #24484e;
  font-size: 14px;
  font-weight: 850;
  padding: 9px 13px;
  text-decoration: none;
}

.app-nav button:hover,
.app-nav .nav-link:hover {
  background: #eef7f5;
  border-color: #d5ebe7;
  color: var(--brand-dark);
}

.app-nav button.active,
.nav-group.active > .nav-menu-toggle {
  background: linear-gradient(135deg, #006b58, #004d40);
  border-color: #006b58;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 98, 79, 0.24);
}

.nav-submenu {
  border-radius: 12px;
  border-color: #dce8eb;
  box-shadow: 0 16px 34px rgba(9, 38, 42, 0.14);
}

.nav-submenu button,
.nav-submenu .nav-link {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #24484e;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 10px;
  text-align: left;
  text-decoration: none;
}

.nav-submenu button:hover,
.nav-submenu .nav-link:hover {
  background: #eef7f5;
  color: var(--brand-dark);
}

.layout {
  max-width: 1580px;
  padding-top: 26px;
}

.dashboard-action-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.dashboard-action-strip button {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-height: 76px;
  border: 1px solid #dce9e7;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 98, 79, 0.08), rgba(228, 169, 59, 0.05)),
    #ffffff;
  box-shadow: var(--shadow-soft);
  color: #103f3a;
  padding: 14px;
  text-align: left;
}

.dashboard-action-strip button:hover {
  border-color: #9bcfca;
  background:
    linear-gradient(135deg, rgba(0, 98, 79, 0.12), rgba(228, 169, 59, 0.08)),
    #ffffff;
}

.dashboard-action-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-action-strip strong {
  color: var(--brand-dark);
  font-size: 1rem;
  font-weight: 950;
}

.panel,
.pending-create-card,
.pending-queue-card,
.job-entry-card,
.contract-bank-card,
.client-bank,
.client-detail-card,
.invoice-customer-card,
.driver-submission-card,
.diary-day-section,
.completed-card {
  border: 1px solid #dfe9ed;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: clamp(18px, 2vw, 26px);
}

.section-title {
  align-items: center;
  border-bottom-color: #edf3f5;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.section-title h2 {
  color: #101b20;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 900;
}

.section-title h3,
.pending-card-title h3,
.job-entry-heading h3,
.board-sidebar-head h3 {
  color: #111c22;
  font-weight: 900;
}

button,
.link-button {
  border-radius: 9px;
  background: linear-gradient(135deg, #00715c, #005647);
  box-shadow: 0 8px 16px rgba(0, 98, 79, 0.16);
  font-weight: 850;
}

button:hover,
.link-button:hover {
  background: linear-gradient(135deg, #00604f, #00473b);
}

.secondary,
.quiet-button,
.ghost,
.board-weekend-toggle,
.board-truck-picker summary,
.board-filter-panel summary {
  border-color: #d4e2e5;
  background: #f7fbfb;
  color: #064b42;
  box-shadow: none;
}

.secondary:hover,
.quiet-button:hover,
.ghost:hover {
  background: #eaf6f3;
  color: #043c35;
}

input,
select,
textarea {
  border-color: #cfdee3;
  border-radius: 9px;
  background-color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #00715c;
  box-shadow: 0 0 0 3px rgba(0, 113, 92, 0.12);
  outline: none;
}

.dashboard-tile,
.board-summary-card,
.pending-stat-card,
.invoice-summary-card,
.subbie-pay-summary-card,
.weekly-summary div,
.cost-summary div,
.quote-summary div,
.rego-card {
  border-color: #dce9e7;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdfd);
  box-shadow: var(--shadow-soft);
}

.dashboard-tile:hover,
.pending-job-card:hover,
.invoice-load-card:hover {
  border-color: #9bcfca;
  box-shadow: 0 14px 28px rgba(0, 98, 79, 0.12);
}

.dashboard-tile strong,
.board-summary-card strong,
.invoice-summary-card strong,
.pending-stat-card strong {
  color: #063f39;
}

.pending-panel,
.board-planner-panel,
.diary-panel,
.invoicing-panel {
  background: rgba(255, 255, 255, 0.92);
}

.pending-dispatch-layout,
.invoice-groups,
.diary-week-content,
.board-shell {
  gap: 14px;
}

.pending-card-title,
.board-hero,
.board-toolbar,
.board-summary-card,
.board-main,
.board-sidebar,
.invoice-toolbar,
.diary-controls,
.completed-filters {
  border-color: #dce8eb;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.board-hero {
  background:
    linear-gradient(90deg, rgba(0, 98, 79, 0.07), rgba(228, 169, 59, 0.06)),
    #ffffff;
}

.board-hero .eyebrow,
.pending-form-section h4,
.invoice-group-title span,
.diary-week-label {
  color: #00715c;
}

.board-head,
.board-corner {
  background: #f3f8f8;
  color: #102a2d;
}

.board-truck-head {
  background: #ffffff;
  box-shadow: 8px 0 14px rgba(15, 45, 49, 0.04);
}

.board-truck-head em,
.status-pill.good,
.badge-ready,
.pending-status-good {
  background: #dff7e8;
  color: #126237;
}

.board-cell {
  background: #fbfdfd;
}

.board-available,
.board-drop-empty {
  border-color: #cfe0e5;
  background: #f8fbfb;
}

.board-job-card,
.pending-job-card,
.invoice-load-card,
.diary-job-row,
.diary-job-card {
  border-radius: 12px;
}

.pending-job-card {
  border-color: #dce8eb;
  box-shadow: var(--shadow-soft);
}

.pending-job-primary strong,
.pending-job-title,
.invoice-customer-heading h3,
.diary-day-heading h3 {
  color: #102a2d;
}

.diary-day-heading,
.diary-day-header {
  background: linear-gradient(135deg, #c76b33, #b75c28);
  color: #ffffff;
  border-radius: 12px 12px 0 0;
}

.diary-rego-group,
.invoice-customer-card,
.invoice-batch-card {
  border-color: #dce8eb;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.invoice-toolbar,
.invoice-summary-grid,
.invoicing-controls {
  background: #ffffff;
}

.invoice-load-card,
.invoice-row-card {
  border-color: #dce8eb;
  background: #ffffff;
}

.xero-preview-panel,
.invoice-json-panel {
  border-color: #d7e6e4;
  background: #f7fbfb;
}

@media (max-width: 960px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  .header-user {
    width: 100%;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 14px;
  }

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

@media (max-width: 620px) {
  .dashboard-action-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-week-controls {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-week-controls select,
  .dashboard-week-controls #dashboardSyncCompanyWeekly {
    grid-column: 1 / -1;
  }
}

body.board-focus-mode {
  overflow: hidden;
}

body.board-focus-mode .app-header,
body.board-focus-mode .app-nav {
  display: none;
}

body.board-focus-mode .layout {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

body.board-focus-mode .panel:not(.board-planner-panel) {
  display: none;
}

body.board-focus-mode .board-planner-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 6px;
  gap: 5px;
  background: #eef3f4;
}

body.board-focus-mode .board-hero {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 5px 7px;
  border-radius: 8px;
}

body.board-focus-mode .board-hero h2 {
  font-size: 16px;
}

body.board-focus-mode .board-hero .eyebrow,
body.board-focus-mode .board-hero p {
  display: none;
}

body.board-focus-mode .board-week-switcher {
  gap: 6px;
}

body.board-focus-mode .board-week-switcher strong {
  min-width: 210px;
}

body.board-focus-mode .board-toolbar {
  gap: 6px;
  padding: 5px 6px;
  border-radius: 8px;
}

body.board-focus-mode .board-toolbar button,
body.board-focus-mode .board-toolbar summary,
body.board-focus-mode .board-weekend-toggle {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

body.board-focus-mode .board-summary {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 5px;
}

body.board-focus-mode .board-summary-card {
  padding: 5px 7px;
  border-radius: 8px;
}

body.board-focus-mode .board-summary-card strong {
  font-size: 14px;
}

body.board-focus-mode .board-summary-card span,
body.board-focus-mode .board-summary-card em {
  font-size: 11px;
}

body.board-focus-mode .board-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}

body.board-focus-mode .board-main {
  height: 100%;
  min-height: 0;
  border-radius: 8px;
}

.board-booking-modal-panel {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.board-booking-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dce8eb;
  border-radius: 12px;
  background: #f7fbfb;
}

.board-booking-controls label {
  margin: 0;
}

.board-booking-summary {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef8f5;
  color: #075345;
  font-weight: 700;
}

.board-booking-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 14px;
  min-height: 360px;
}

.board-booking-layout h4 {
  margin: 0 0 8px;
  color: #063f39;
}

.board-booking-rows {
  display: grid;
  gap: 8px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.board-booking-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid #dce8eb;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 45, 49, 0.06);
}

.board-booking-row input {
  margin-top: 3px;
}

.board-booking-row span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.board-booking-row strong,
.board-booking-row small,
.board-booking-row em {
  overflow-wrap: anywhere;
}

.board-booking-row small {
  color: #5b6b70;
}

.board-booking-row em {
  color: #314449;
  font-style: normal;
}

.board-booking-preview {
  min-height: 460px;
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce8eb;
  border-radius: 12px;
  background: #fbfdfd;
  color: #102a2d;
  white-space: pre-wrap;
  font: 13px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.board-booking-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #cfe0e5;
  border-radius: 10px;
  background: #f8fbfb;
  color: #5b6b70;
}

@media (max-width: 860px) {
  .board-booking-controls,
  .board-booking-layout,
  .paperwork-workbench,
  .paperwork-line {
    grid-template-columns: 1fr;
  }

  .board-booking-preview,
  .board-booking-rows {
    max-height: none;
  }
}

body.board-focus-mode .board-grid {
  grid-template-columns: 138px repeat(5, minmax(180px, 1fr));
  min-width: max(1038px, 100%);
}

body.board-focus-mode .board-head {
  padding: 7px 8px;
}

body.board-focus-mode .board-truck-head {
  min-height: 76px;
  padding: 7px 8px;
}

body.board-focus-mode .board-cell {
  min-height: 76px;
  padding: 5px;
}

body.board-focus-mode .board-available,
body.board-focus-mode .board-drop-empty {
  min-height: 30px;
  font-size: 12px;
}

body.board-focus-mode .board-job-card {
  gap: 3px;
  margin-bottom: 5px;
  padding: 6px;
}

body.board-focus-mode .board-job-card strong {
  font-size: 13px;
}

body.board-focus-mode .board-card-route,
body.board-focus-mode .board-card-meta,
body.board-focus-mode .board-card-footer {
  font-size: 11px;
}

body.board-focus-mode .board-sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: min(370px, calc(100vw - 24px));
  height: 100%;
  max-height: none;
  z-index: 1200;
  border-radius: 10px 0 0 10px;
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.22);
  transform: translateX(calc(100% + 20px));
}

body.board-focus-mode .board-shell.board-drawer-open .board-sidebar {
  transform: translateX(0);
}

/* Phase 1: Dashboard polish only. Keep this scoped away from planner/layout logic. */
.dashboard-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.dashboard-panel > .section-title {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
  margin-bottom: 22px;
  padding: 20px 22px;
}

.dashboard-panel > .section-title h2 {
  color: #0f172a;
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.dashboard-panel .dashboard-week-controls {
  gap: 10px;
}

.dashboard-panel .dashboard-week-controls button,
.dashboard-panel .dashboard-week-controls select {
  min-height: 40px;
  border-radius: 10px;
}

.dashboard-panel .dashboard-action-strip {
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-panel .dashboard-action-strip button,
.dashboard-panel .dashboard-tile,
.dashboard-panel .company-dashboard-summary,
.dashboard-panel .rego-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
}

.dashboard-panel .dashboard-action-strip button {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 18px;
  color: #0f172a;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-panel .dashboard-action-strip button::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.dashboard-panel .dashboard-action-strip button:nth-child(2)::before {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.16);
}

.dashboard-panel .dashboard-action-strip button:nth-child(3)::before {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.16);
}

.dashboard-panel .dashboard-action-strip button:nth-child(4)::before {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.22);
}

.dashboard-panel .dashboard-action-strip button:hover,
.dashboard-panel .dashboard-tile:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 36px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.dashboard-panel .dashboard-action-strip span,
.dashboard-panel .dashboard-tile span {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.dashboard-panel .dashboard-action-strip strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.dashboard-panel .dashboard-grid {
  gap: 16px;
}

.dashboard-panel .dashboard-tile {
  min-height: 126px;
  padding: 22px;
}

.dashboard-panel .dashboard-tile strong {
  color: #0f172a;
  font-size: clamp(30px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 1.05;
}

.dashboard-panel .dashboard-subtitle {
  margin-top: 30px;
}

.dashboard-panel .dashboard-subtitle h3 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 750;
}

.dashboard-panel .dashboard-subtitle span,
.dashboard-panel .company-dashboard-metric span,
.dashboard-panel .company-dashboard-metric small {
  color: #64748b;
}

.dashboard-panel .company-dashboard-metric {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
}

.dashboard-panel .company-dashboard-metric strong {
  color: #0f172a;
}

/* Phase 1: Add Job polish only. Keep this scoped away from planner/layout logic. */
.allocation-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.allocation-panel > .section-title {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
  margin-bottom: 22px;
  padding: 20px 22px;
}

.allocation-panel > .section-title h2 {
  color: #0f172a;
  font-size: clamp(26px, 2.1vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.allocation-panel .job-panel-wide {
  max-width: none;
}

.allocation-panel .dispatch-job-form {
  gap: 18px;
}

.allocation-panel .dispatch-job-form .job-entry-card,
.allocation-panel .dispatch-job-form .pickup-card,
.allocation-panel .dispatch-job-form .delivery-card,
.allocation-panel .dispatch-job-form .message-box {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
}

.allocation-panel .dispatch-job-form .job-entry-card,
.allocation-panel .dispatch-job-form .pickup-card,
.allocation-panel .dispatch-job-form .delivery-card {
  padding: 22px;
}

.allocation-panel .job-entry-heading {
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.allocation-panel .job-entry-heading h3 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 750;
}

.allocation-panel .job-entry-heading span,
.allocation-panel #nextAllocation,
.allocation-panel #messageStatus {
  border: 1px solid #dbe7e4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 10px;
}

.allocation-panel .header-grid,
.allocation-panel .load-grid,
.allocation-panel .stop-grid,
.allocation-panel .notes-message-grid {
  gap: 16px;
}

.allocation-panel .dispatch-job-form label,
.allocation-panel .field-label-row {
  color: #0f172a;
  font-size: 13px;
  font-weight: 650;
}

.allocation-panel .dispatch-job-form input,
.allocation-panel .dispatch-job-form select,
.allocation-panel .dispatch-job-form textarea {
  min-height: 46px;
  border: 1px solid #d8e1e8;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
}

.allocation-panel .dispatch-job-form textarea {
  min-height: 94px;
}

.allocation-panel .dispatch-job-form input:focus,
.allocation-panel .dispatch-job-form select:focus,
.allocation-panel .dispatch-job-form textarea:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.allocation-panel .quiet-button,
.allocation-panel .secondary,
.allocation-panel .link-button {
  border-radius: 10px;
}

.allocation-panel .map-action-row,
.allocation-panel .dispatch-actions,
.allocation-panel .inline-add-actions {
  gap: 10px;
}

.allocation-panel .inline-add-panel {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: none;
  padding: 14px;
}

.allocation-panel .dispatch-actions {
  align-items: center;
  border-top: 1px solid #eef2f7;
  margin-top: 4px;
  padding-top: 18px;
}

.allocation-panel .dispatch-actions #saveAllocationButton,
.allocation-panel .dispatch-actions .send-button {
  min-height: 44px;
  border-radius: 12px;
}

.allocation-panel .message-box {
  padding: 16px;
}

.allocation-panel .recent-allocation-notice {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 18px;
  border: 1px solid #bfdfd8;
  border-radius: 16px;
  background: #f0fdfa;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
  padding: 16px 18px;
}

.allocation-panel .recent-allocation-notice strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.allocation-panel .recent-allocation-notice span {
  color: #475569;
  font-size: 13px;
}

.allocation-panel .recent-allocation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.allocation-panel .recent-allocation-actions button {
  min-height: 38px;
  border-radius: 10px;
}

/* Phase 1: Jobs To Allocate polish only. Keep this scoped away from planner/layout logic. */
.pending-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.pending-panel .pending-dashboard-head {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
  margin-bottom: 22px;
  padding: 20px 22px;
}

.pending-panel .pending-dashboard-head h2 {
  color: #0f172a;
  font-size: clamp(26px, 2.1vw, 34px);
  font-weight: 800;
  letter-spacing: 0;
}

.pending-panel .pending-dashboard-head p,
.pending-panel .pending-queue-head span,
.pending-panel .pending-card-title small {
  color: #64748b;
}

.pending-panel .pending-summary-badges {
  gap: 10px;
}

.pending-panel .pending-summary-badge {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  box-shadow: none;
  padding: 8px 12px;
}

.pending-panel .pending-summary-badge strong {
  color: #0f172a;
}

.pending-panel .pending-dispatch-layout {
  gap: 22px;
}

.pending-panel .pending-create-card,
.pending-panel .pending-queue-card,
.pending-panel .pending-job-card,
.pending-panel .pending-value-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.05);
}

.pending-panel .pending-create-card,
.pending-panel .pending-queue-card {
  padding: 22px;
}

.pending-panel .pending-card-title,
.pending-panel .pending-queue-head {
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.pending-panel .pending-title-icon {
  border-radius: 10px;
  background: #ecfdf5;
  color: #0f766e;
}

.pending-panel .pending-card-title h3,
.pending-panel .pending-queue-head h3 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 750;
}

.pending-panel .pending-form-section {
  border-top: 1px solid #f1f5f9;
  padding-top: 18px;
}

.pending-panel .pending-form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.pending-panel .pending-form-section h4 {
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.pending-panel .pending-form-grid,
.pending-panel .pending-location-grid {
  gap: 14px;
}

.pending-panel .pending-form-section label,
.pending-panel .pending-form-section .client-picker-field,
.pending-panel .pending-form-section .location-picker-field,
.pending-panel .field-label-row {
  color: #0f172a;
  font-size: 13px;
  font-weight: 650;
}

.pending-panel input,
.pending-panel select,
.pending-panel textarea {
  min-height: 44px;
  border: 1px solid #d8e1e8;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
}

.pending-panel textarea {
  min-height: 92px;
}

.pending-panel input:focus,
.pending-panel select:focus,
.pending-panel textarea:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.pending-panel .pending-value-card {
  background: #f8fafc;
  box-shadow: none;
}

.pending-panel .pending-value-card span,
.pending-panel .pending-value-card small {
  color: #64748b;
}

.pending-panel .pending-value-card strong {
  color: #0f172a;
}

.pending-panel .pending-detail-toggle {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.pending-panel .inline-add-panel {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: none;
  padding: 14px;
}

.pending-panel .pending-save-actions {
  border-top: 1px solid #eef2f7;
  gap: 10px;
  margin-top: 4px;
  padding-top: 18px;
}

.pending-panel .pending-save-actions button,
.pending-panel .pending-card-actions button {
  border-radius: 12px;
}

.pending-panel .pending-card-grid {
  gap: 16px;
}

.pending-panel .pending-job-card {
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pending-panel .pending-job-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 36px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.pending-panel .pending-job-card-head {
  align-items: flex-start;
}

.pending-panel .pending-job-title,
.pending-panel .pending-job-primary strong {
  color: #0f172a;
  font-weight: 800;
}

.pending-panel .pending-job-meta,
.pending-panel .pending-job-route,
.pending-panel .pending-job-times {
  color: #64748b;
}

.pending-panel .pending-status-good,
.pending-panel .pending-status-changed,
.pending-panel .pending-status-problem {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}
