:root {
  --ops-ink: #08233f;
  --ops-muted: #45637d;
  --ops-line: #b9cfe1;
  --ops-line-strong: #91b1c9;
  --ops-surface: #ffffff;
  --ops-surface-soft: #f3f8fc;
  --ops-page: #edf3f8;
  --ops-primary: #087ce7;
  --ops-primary-strong: #0062c4;
  --ops-navy: #123c5b;
  --ops-success: #16845a;
  --ops-warning: #a66a00;
  --ops-danger: #b42318;
  --ops-radius: 8px;
  --ops-shadow: 0 5px 15px rgba(15, 49, 74, .08);
  --ops-shadow-raised: 0 10px 26px rgba(15, 49, 74, .13);
  --ops-label-weight: 700;
  --ops-heading-weight: 800;
}

body,
button,
input,
select,
textarea {
  color: var(--ops-ink);
}

.page-heading,
.page-header h1,
.source-card > h3,
.table-section-title,
.job-row-primary,
.customer-name,
.material-name {
  font-weight: var(--ops-heading-weight);
}

.page-header p,
.page-subtitle,
.job-row-secondary,
.customer-meta,
.material-meta,
.source-card-body small {
  color: var(--ops-muted);
}

.data-table th,
.source-table th,
.table-header,
.job-list-header,
.directory-table-header {
  color: var(--ops-ink);
  font-weight: var(--ops-label-weight);
}

.home-command-hero,
.dashboard-command-hero {
  color: #ffffff;
}

.home-command-hero :is(h1, h2, h3, strong, .hero-title, .priority-title),
.dashboard-command-hero :is(h1, h2, h3, strong, .hero-title, .priority-title) {
  color: #ffffff;
}

.home-command-hero :is(p, small, span),
.dashboard-command-hero :is(p, small, span) {
  color: #d8ebfb;
}

.form-dialog .dialog-header-controls .job-entry-department {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-dialog .dialog-header-controls .job-entry-department > strong {
  display: none;
}

.form-dialog .dialog-header-controls .job-entry-department [role="radiogroup"] {
  display: inline-flex;
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius);
  overflow: hidden;
}

.form-dialog .dialog-header-controls .job-entry-department label {
  margin: 0;
}

.form-dialog .dialog-header-controls .job-entry-department label + label {
  border-left: 1px solid var(--ops-line);
}

.form-dialog .dialog-header-controls .job-entry-department span {
  display: flex;
  min-height: 34px;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--ops-ink);
  font-size: 12px;
  font-weight: var(--ops-label-weight);
}

.form-dialog .dialog-header-controls .job-entry-department input:checked + span {
  background: var(--ops-primary);
  color: #ffffff;
}

.form-dialog .dialog-header-controls .job-entry-department small {
  display: none;
}

.job-editor-empty-state {
  padding: 28px 24px;
  border: 1px dashed var(--ops-line);
  border-radius: 4px;
  color: var(--ops-muted);
  font-size: 14px;
  text-align: center;
}

.form-dialog .source-card > h3,
.form-dialog .form-section-title {
  color: #ffffff;
  font-weight: var(--ops-heading-weight);
}

.form-dialog .source-card-body {
  background: var(--ops-surface);
}

.form-dialog .job-entry-field > span,
.form-dialog .shop-assignment-label {
  color: var(--ops-ink);
  font-weight: var(--ops-label-weight);
}

/* Unified Empire application language */
body.app-active,
.view {
  background: var(--ops-page);
}

.topbar {
  border-top-color: var(--ops-primary);
  border-bottom-color: var(--ops-line);
  box-shadow: 0 3px 12px rgba(15, 49, 74, .08);
}

.page-heading p { color: var(--ops-primary-strong); }
.page-heading h1 { color: var(--ops-ink); font-weight: 800; letter-spacing: -.02em; }

.workspace-page { gap: 10px; }
.workspace-toolbar,
.workspace-surface,
.surface {
  border-color: var(--ops-line);
  border-radius: var(--ops-radius);
}

.workspace-toolbar {
  min-height: 64px;
  border-top: 3px solid var(--ops-primary);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: var(--ops-shadow);
}

.workspace-toolbar-title strong,
.section-head h2 {
  color: var(--ops-ink);
  font-weight: 850;
  letter-spacing: -.015em;
}

.workspace-toolbar-title span,
.section-head p { color: var(--ops-muted); }

.workspace-record-count {
  border-left-color: var(--ops-line);
  background: linear-gradient(180deg, #f8fbfd, #edf5fb);
}
.workspace-record-count strong { color: var(--ops-primary-strong); }

.workspace-surface,
.surface {
  background: var(--ops-surface);
  box-shadow: var(--ops-shadow);
}

.section-head {
  border-bottom-color: var(--ops-line);
  background: linear-gradient(180deg, #ffffff, #f3f8fc);
}

.primary,
button.primary {
  border-color: var(--ops-primary-strong);
  background: linear-gradient(180deg, #168af0, var(--ops-primary));
  color: #fff;
  box-shadow: 0 3px 8px rgba(8, 124, 231, .18);
}
.primary:hover:not(:disabled),
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #087ce7, #0062c4); box-shadow: 0 5px 12px rgba(8, 124, 231, .24); }

.secondary,
button.secondary {
  border-color: #a9c1d3;
  background: linear-gradient(180deg, #fff, #f5f9fc);
  color: #183f5c;
}
.secondary:hover:not(:disabled),
button.secondary:hover:not(:disabled) { border-color: #6b9fc6; background: #edf6fd; color: var(--ops-primary-strong); }

input,
select,
textarea {
  border-color: #a9c1d3;
  border-radius: 5px;
  background: #fff;
}
input:hover,
select:hover,
textarea:hover { border-color: #719fc2; }
input:focus,
select:focus,
textarea:focus { border-color: var(--ops-primary); box-shadow: 0 0 0 3px rgba(8, 124, 231, .12); }

.department-schedules,
.queue-filters,
.logistics-entity-toggle {
  border-color: var(--ops-line);
  background: #edf4f9;
}
.department-schedules button,
.queue-filters button,
.logistics-entity-toggle button { color: #36566e; }
.department-schedules button.active,
.queue-filters button.active,
.logistics-entity-toggle button.active {
  background: linear-gradient(180deg, #168af0, var(--ops-primary));
  color: #fff;
  box-shadow: 0 3px 8px rgba(8, 124, 231, .2);
}

.data-table thead th,
.source-table thead th,
.quote-production-head,
.fab-table thead th {
  border-color: var(--ops-line);
  background: linear-gradient(180deg, #edf6fc, #e1eef7);
  color: #294b64;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.data-table tbody tr,
.quote-production-row,
.materials-db-table tbody tr,
.customer-list-row {
  border-color: #c8d8e4;
  background: linear-gradient(180deg, #fff, #fbfdfe);
  box-shadow: 0 2px 6px rgba(15, 49, 74, .055);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.data-table tbody tr:hover,
.quote-production-row:hover,
.materials-db-table tbody tr:hover,
.customer-list-row:hover {
  border-color: #77a9cd;
  box-shadow: 0 5px 13px rgba(15, 49, 74, .11);
  transform: translateY(-1px);
}

.workspace-summary-strip {
  border-color: var(--ops-line);
  background: linear-gradient(180deg, #f8fbfd, #edf5fa);
  box-shadow: var(--ops-shadow);
}
.workspace-summary-strip > div + div { border-left-color: var(--ops-line); }

.quote-doc-signal,
.quote-doc-chip,
.badge,
.dispatch-readiness {
  border-radius: 999px;
  font-weight: 850;
}

.settings-workspace .surface,
.reports-workspace .surface,
.purchase-workspace .surface,
.customers-workspace .surface,
.materials-workspace .surface {
  border-top: 3px solid var(--ops-primary);
}

.settings-list > *,
.metric-grid > *,
.detail-list > * {
  border-color: #c8d8e4;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.form-dialog > form {
  overflow: hidden;
  border: 1px solid var(--ops-line-strong);
  border-top: 4px solid var(--ops-primary);
  border-radius: 12px;
  box-shadow: 0 26px 70px rgba(7, 32, 51, .28);
}
.form-dialog > form > header {
  border-bottom-color: var(--ops-line);
  background: linear-gradient(180deg, #fff, #f5f9fc);
}
.form-dialog > form > footer {
  border-top-color: var(--ops-line);
  background: linear-gradient(180deg, #f8fbfd, #fff);
}
.source-card,
.quote-job-style-panel {
  border-color: var(--ops-line-strong);
  border-radius: var(--ops-radius);
  box-shadow: 0 3px 9px rgba(15, 49, 74, .06);
}
.source-card > h3,
.form-section-title,
.quote-job-style-title {
  background: linear-gradient(180deg, #168af0, #0874da);
  color: #fff;
}

/* Delivery uses the same surfaces and hierarchy as the rest of the application. */
.delivery-dispatch-board {
  border-color: var(--ops-line-strong);
  background: var(--ops-page);
  box-shadow: var(--ops-shadow-raised);
}
.dispatch-date-toolbar { background: linear-gradient(180deg, #fff, #f5f9fc); }
.dispatch-driver-strip {
  border-bottom: 1px solid var(--ops-line);
  background: linear-gradient(180deg, #f4f9fc 0%, #e5eff6 100%);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.8);
}
.dispatch-driver-strip-title span { color: var(--ops-primary-strong); }
.dispatch-driver-strip-title strong { color: var(--ops-ink); }
.dispatch-driver-tab {
  border-color: var(--ops-line);
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 49, 74, .07);
}
.dispatch-driver-tab.is-active {
  border-color: var(--ops-primary);
  background: linear-gradient(180deg, #168af0, #0874da);
  color: #fff;
  box-shadow: inset 0 -3px 0 #7bc4ff, 0 4px 11px rgba(8, 124, 231, .2);
}
.dispatch-focus-layout { background: linear-gradient(180deg, #e6eef4, #f0f5f8); }
.dispatch-queue-section,
.dispatch-route-focus,
.dispatch-focus-layout > .dispatch-map-panel,
.dispatch-upcoming-board {
  border-color: var(--ops-line);
  background: #fff;
  box-shadow: var(--ops-shadow);
}
.dispatch-queue-section > header,
.dispatch-route-focus .dispatch-driver-lane > header,
.dispatch-focus-layout > .dispatch-map-panel > header,
.dispatch-upcoming-board > header {
  border-top: 3px solid var(--ops-primary);
  border-bottom: 1px solid var(--ops-line);
  background: linear-gradient(180deg, #fff, #edf6fc);
  color: var(--ops-ink);
}
.dispatch-queue-section > header small,
.dispatch-route-focus .dispatch-driver-identity small,
.dispatch-focus-layout > .dispatch-map-panel header small,
.dispatch-upcoming-board > header small { color: var(--ops-primary-strong); }
.dispatch-queue-section > header h2,
.dispatch-route-focus .dispatch-driver-identity strong,
.dispatch-focus-layout > .dispatch-map-panel header h2,
.dispatch-upcoming-board > header h2 { color: var(--ops-ink); }
.dispatch-route-focus .dispatch-driver-identity span,
.dispatch-focus-layout > .dispatch-map-panel header > div > span,
.dispatch-upcoming-board > header p { color: var(--ops-muted); }
.dispatch-route-focus .dispatch-driver-lane > header b { color: var(--ops-primary); }
.dispatch-route-focus .dispatch-driver-lane > header div small { color: var(--ops-muted); }
.dispatch-queue-section > header > span,
.dispatch-upcoming-board > header > span {
  background: var(--ops-primary);
  color: #fff;
  box-shadow: none;
}
.dispatch-route-actions { background: linear-gradient(180deg, #fff, #f4f8fb); }
.dispatch-optimize-route { background: linear-gradient(180deg, #168af0, var(--ops-primary)); }
.dispatch-stop-card,
.dispatch-upcoming-card {
  border-color: #bfd1de;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 49, 74, .06);
}
.dispatch-stop-card:hover,
.dispatch-upcoming-card:hover { border-color: #72a7ce; box-shadow: 0 5px 13px rgba(15, 49, 74, .11); }

/* Toasts sit above the workspace and need their own contrast, not the shared text color. */
.toast {
  z-index: 1000;
  background: #102c43;
  color: #fff !important;
  border-left-color: #168af0;
  box-shadow: 0 12px 28px rgba(8, 28, 44, .28);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.toast.error { background: #7b1f28; border-left-color: #ffb4ae; }
.toast.warning { background: #6f4a00; border-left-color: #ffd36b; }

@media (max-width: 720px) {
  .form-dialog .dialog-header-controls .job-entry-department span {
    min-width: 0;
    padding: 0 8px;
  }
}
