.job-attention-strip { display: none; }

body.auth-active .app-shell { display: none !important; }

.job-document-collection-head small { font-size: 13px; }
.job-document-collection-head strong { font-size: 13px; }
.job-document-file { min-height: 34px; padding: 7px 9px; }
.job-document-file b { padding: 4px 5px; font-size: 8px; }
.job-document-file span { max-width: 240px; font-size: 13px; }
.job-document-file em { font-size: 12px; }
.job-document-edit { padding: 7px 9px; font-size: 12px; }
.job-document-collection-actions button { min-height: 34px; padding: 6px 10px; font-size: 12px; }

.quote-job-style-panel {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid #0f7be0;
  border-radius: 7px;
  background: #fbfdff;
}
.quote-job-style-title {
  min-height: 40px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #168df1, #106eea);
  color: #fff;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.quote-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 14px;
}
.quote-detail {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #c6d7e5;
  border-radius: 5px;
  background: #f7fafc;
  padding: 7px 10px;
}
.quote-detail.span-two { grid-column: span 2; }
.quote-detail span {
  color: #365065;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.quote-detail strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-detail.span-two strong {
  white-space: normal;
  line-height: 1.35;
}
.quote-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px 14px;
}
.quote-document-card {
  min-height: 104px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #bcd0e1;
  border-left: 5px solid #168df1;
  border-radius: 6px;
  background: #f5faff;
  padding: 12px;
}
.quote-document-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.quote-document-card strong {
  display: block;
  color: #075db7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.quote-document-card span {
  display: block;
  margin-top: 2px;
  color: #556b7d;
  font-size: 12px;
  font-weight: 700;
}
.quote-document-card > button {
  white-space: nowrap;
}
.quote-doc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}
.quote-doc-chip,
.quote-doc-chip-action {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #9dc2e6;
  border-radius: 5px;
  background: #fff;
  color: #075db7;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}
.quote-doc-chip span {
  margin: 0;
  border-radius: 3px;
  background: #e92727;
  color: #fff;
  padding: 2px 5px;
  font-size: 8px;
  line-height: 1;
}
.quote-doc-chip.is-stale {
  border-color: #d9a12a;
  background: #fff8e6;
  color: #8a5a00;
}
.quote-doc-chip-action {
  background: #eef7ff;
}
.quote-doc-empty {
  color: #708292;
  font-size: 12px;
  font-weight: 700;
}

.quote-edit-form .quote-modal-document-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quote-edit-form .job-document-collection {
  min-width: 0;
}

.quote-edit-form .job-document-collection-head {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.quote-edit-form .job-document-collection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quote-edit-form .job-document-collection-actions button {
  min-height: 32px;
  padding-inline: 9px;
}

.quote-edit-form .job-file-toolbar {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.quote-edit-form .job-file-toolbar label {
  min-height: 34px;
  white-space: nowrap;
}

.quote-edit-form .source-file-list {
  min-width: 0;
}

.quote-edit-form .stored-file-list {
  min-width: 0;
}

.department-system-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.department-system-card {
  display: grid;
  gap: 10px;
  border: 1px solid #c9d8e6;
  border-left: 5px solid var(--department-accent, #106eea);
  border-radius: 7px;
  background: #fff;
  padding: 12px 13px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}

.department-system-card p,
.quote-command-hero p {
  margin: 0 0 2px;
  color: var(--empire-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.department-system-card h3 {
  margin: 0;
  font-size: 16px;
}

.department-system-card span {
  display: block;
  margin-top: 4px;
  color: #5f7080;
  font-size: 12px;
  line-height: 1.35;
}

.department-system-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #dde8f2;
  border-radius: 5px;
  overflow: hidden;
}

.department-system-card dl div {
  padding: 8px;
  border-right: 1px solid #dde8f2;
  background: #f7fbff;
}

.department-system-card dl div:last-child { border-right: 0; }
.department-system-card dt { color: #607484; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.department-system-card dd { margin: 2px 0 0; color: #0f172a; font-size: 13px; font-weight: 850; }
.department-system-card small { color: #607484; font-size: 11px; font-weight: 700; line-height: 1.35; }

.quote-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 10px;
  border: 1px solid #bfd0df;
  border-top: 5px solid var(--empire-blue);
  border-radius: 7px;
  background: #fff;
  padding: 15px 17px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}

.quote-command-hero h2 {
  margin: 0;
  font-size: 21px;
}

.quote-command-hero span {
  display: block;
  margin-top: 4px;
  color: #5f7080;
  font-size: 12px;
}

.quote-command-hero dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
}

.quote-command-hero dl div {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid #d2e1ef;
  border-radius: 5px;
  background: #f7fbff;
  padding: 9px 11px;
}

.quote-command-hero dt { color: #607484; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.quote-command-hero dd { margin: 0; color: #0f172a; font-size: 17px; font-weight: 900; }

.quote-stage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.quote-stage-strip article {
  border: 1px solid #d0dfeb;
  border-radius: 7px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
}

.quote-stage-strip span,
.quote-stage-strip small {
  display: block;
  color: #607484;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.quote-stage-strip strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.quote-stage-strip small {
  margin-top: 2px;
  color: var(--empire-blue-dark);
}

.quote-entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 12px;
}

.quote-entity-card {
  display: grid;
  gap: 10px;
  min-height: 210px;
  border: 1px solid #c9d8e6;
  border-left: 5px solid var(--department-accent, #106eea);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
  transition: transform .14s ease, box-shadow .14s ease;
}

.quote-entity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(15, 23, 42, .14);
}

.quote-entity-card header,
.quote-entity-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-entity-card p {
  margin: 0;
  color: #607484;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-entity-card h3 {
  margin: 1px 0 0;
  font-size: 19px;
}

.quote-card-customer {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-card-project {
  min-height: 34px;
  color: #405466;
  font-size: 12px;
  line-height: 1.35;
}

.quote-entity-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid #dde8f2;
  border-radius: 5px;
  overflow: hidden;
}

.quote-entity-card dl div {
  min-width: 0;
  padding: 7px;
  border-right: 1px solid #dde8f2;
  background: #f8fbfe;
}

.quote-entity-card dl div:last-child { border-right: 0; }
.quote-entity-card dt { color: #607484; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.quote-entity-card dd { margin: 2px 0 0; color: #0f172a; font-size: 12px; font-weight: 850; }

.quote-next-action {
  border: 1px solid #bdd6f0;
  border-radius: 999px;
  background: #eef6ff;
  padding: 4px 8px;
  color: #075ea8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-entity-card footer small {
  color: #607484;
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.quote-priority-stale .quote-next-action {
  border-color: #f3b7b7;
  background: #fff1f1;
  color: #a51616;
}

.quote-priority-accepted .quote-next-action {
  border-color: #9ed7af;
  background: #edf9f0;
  color: #17643d;
}

.quote-priority-sent .quote-next-action {
  border-color: #f4ce8f;
  background: #fff8e8;
  color: #7a5000;
}

.materials-department-cue {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid #d8e4ee;
  border-left: 5px solid var(--department-accent, var(--empire-blue));
  background: #f7fbff;
  padding: 10px 14px;
}

.materials-department-cue strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.materials-department-cue span {
  color: #607484;
  font-size: 12px;
  line-height: 1.35;
}

.material-ledger-row .material-name strong {
  overflow: visible;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.material-sku {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  border-radius: 4px;
  background: #eef6ff;
  padding: 3px 6px;
  color: #075ea8;
  font-size: 10px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .department-system-panel,
  .quote-stage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-command-hero { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .department-system-panel,
  .quote-stage-strip,
  .quote-command-hero dl { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .quote-customer-head { grid-template-columns: 1fr; }
  .quote-customer-actions { justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .quote-customer-meta { grid-template-columns: 1fr; }
}

/* Shared operational page system */
.workspace-page {
  display: grid;
  gap: 10px;
}

.workspace-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  border: 1px solid #c7d3dd;
  border-top: 4px solid var(--empire-blue);
  border-radius: 7px;
  background: #fff;
  padding: 8px 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}

.workspace-toolbar-title {
  min-width: 190px;
  display: grid;
  gap: 2px;
}

.workspace-toolbar-title strong {
  color: #0f172a;
  font: 800 15px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
}

.workspace-toolbar-title span {
  color: #607484;
  font-size: 11px;
  line-height: 1.35;
}

.workspace-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-summary-strip {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d2dce4;
  border-radius: 6px;
  background: #f7fafc;
}

.workspace-summary-strip > span {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-right: 1px solid #d2dce4;
  color: #607484;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.workspace-summary-strip > span:last-child { border-right: 0; }
.workspace-summary-strip strong { color: #132334; font-size: 13px; }

.workspace-record-count {
  flex: 0 0 auto;
  min-width: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  padding-left: 10px;
  border-left: 1px solid #d5dee5;
  color: #607484;
  line-height: 1.05;
}

.workspace-record-count strong { color: #0f172a; font-size: 17px; }
.workspace-record-count span { margin-top: 2px; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.workspace-surface { overflow: hidden; }
.workspace-surface .section-head { min-height: 50px; padding: 9px 13px; background: #f7fafc; }
.workspace-surface .section-head h2 { font-size: 15px; }

.production-toolbar.workspace-toolbar { margin-bottom: 0; border-top-width: 4px; }
.production-job-count.workspace-record-count { display: grid; min-width: 58px; }
.production-job-count.workspace-record-count strong { font-size: 17px; }

.customers-workspace .customer-list-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.system-record-table {
  border-collapse: separate;
  border-spacing: 0 7px;
  padding: 0 8px 7px;
  background: #edf2f6;
}

.system-record-table thead th {
  background: transparent;
  border-bottom: 0;
  padding-top: 7px;
  padding-bottom: 2px;
}

.system-record-table tbody td {
  height: 54px;
  vertical-align: middle;
  border-top: 1px solid #d6e0e7;
  border-bottom: 1px solid #d6e0e7;
  background: #fff;
}

.system-record-table tbody td:first-child {
  border-left: 4px solid var(--empire-blue);
  border-radius: 6px 0 0 6px;
}

.system-record-table tbody td:last-child {
  border-right: 1px solid #d6e0e7;
  border-radius: 0 6px 6px 0;
}

.system-record-table tbody tr:nth-child(even):not([class]) td { background: #fff; }
.system-record-table tbody tr:hover td { background: #eef6ff !important; }
.system-record-table tbody strong { color: #132334; font-size: 13px; }

.materials-workspace-toolbar .production-toolbar-controls {
  align-items: center;
  gap: 12px;
}

.materials-workspace-toolbar .materials-controls { align-items: center; }
.materials-workspace-toolbar .materials-controls > span { display: none; }

.materials-summary-strip {
  justify-self: stretch;
  border-color: #c7d3dd;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .04);
}

.materials-summary-strip > span {
  flex: 1 1 0;
  justify-content: center;
  min-height: 40px;
}

.delivery-command {
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}

.delivery-queue {
  display: grid;
  gap: 7px;
  padding: 7px;
  background: #edf2f6;
}

.delivery-queue-row {
  border: 1px solid #d6e0e7;
  border-left: 4px solid var(--empire-blue);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .04);
}

.reports-workspace .report-actions { margin-left: auto; }
.reports-workspace .report-metrics { gap: 7px; }
.reports-workspace .metric { min-height: 72px; border-top: 4px solid var(--empire-blue); }
.settings-workspace .content-grid { margin-top: 0; gap: 10px; }
.settings-workspace .surface { box-shadow: 0 3px 10px rgba(15, 23, 42, .06); }

.quote-entity-surface { padding-bottom: 7px; }
.quote-production-surface {
  padding: 8px;
  background: #edf2f6;
  border-radius: 7px;
}

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

.quote-production-head,
.quote-production-row {
  display: grid;
  grid-template-columns: 128px minmax(340px, 1fr) 150px 170px 116px 140px;
  gap: 8px;
  align-items: stretch;
}

.quote-production-head {
  padding: 0 11px 2px;
  color: #34536b;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-production-row {
  min-height: 76px;
  border: 1px solid #d5e0e8;
  border-left: 5px solid var(--department-accent, #106eea);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.quote-production-row:hover {
  border-color: #8eb9df;
  box-shadow: 0 5px 13px rgba(15, 23, 42, .1);
}

.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
}

.quote-number-cell {
  background: #f7fbff;
  border-radius: 2px 0 0 2px;
}

.quote-number-cell strong {
  color: #0b1f33;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.quote-number-cell span,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small {
  color: #526b80;
  font-size: 10px;
  font-weight: 800;
}

.quote-project-cell strong {
  color: #0b1f33;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
}

.quote-project-cell b {
  color: #0b1f33;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.quote-project-cell span {
  overflow: hidden;
  color: #182b3c;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong {
  color: #0b1f33;
  font-size: 13px;
  font-weight: 900;
}

.quote-status-select {
  width: 100%;
  min-height: 34px;
  font-size: 11px;
  font-weight: 900;
}

.quote-result-cell {
  grid-template-columns: minmax(72px, 1fr) auto;
  gap: 10px;
  align-items: center;
  justify-items: stretch;
  text-align: right;
}

.quote-result-cell > span {
  display: grid;
  min-width: 0;
  justify-items: end;
}

.quote-pdf-cell {
  justify-items: stretch;
}

.quote-pdf-cell .quote-doc-signal {
  width: 100%;
}

.quote-total-cell {
  align-content: center;
  justify-items: end;
  min-width: 0;
  text-align: right;
}

.quote-doc-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  width: 100%;
  border: 1px solid #bdd5ec;
  border-radius: 5px;
  background: #f7fbff;
  color: #075ca8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.quote-doc-signal span {
  border-radius: 3px;
  background: #e92727;
  color: #fff;
  padding: 3px 5px;
  font-size: 8px;
  line-height: 1;
}

.quote-doc-signal strong {
  font-size: 10px;
}

.quote-doc-signal.is-ready {
  border-color: #008260;
  background: #e8f8f1;
  color: #006b51;
}

.quote-doc-signal.is-stale {
  border-color: #de9b1f;
  background: #fff5dc;
  color: #8a5a00;
}

.quote-doc-signal.is-missing {
  border-color: #d8e2ea;
  background: #f4f7fa;
  color: #687b8b;
}

.quote-doc-signal.is-missing span {
  background: #9aa7b2;
}

.quote-action-cell button {
  min-height: 34px;
  width: 100%;
  padding-inline: 10px;
  white-space: nowrap;
}

.quote-result-cell strong,
.quote-result-cell small,
.quote-total-cell strong,
.quote-total-cell small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-entity-grid {
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 7px;
  background: #edf2f6;
}

.quote-entity-card {
  min-height: 78px;
  grid-template-columns: 145px minmax(240px, 1fr) minmax(300px, 360px) minmax(190px, 230px);
  grid-template-rows: auto auto;
  grid-template-areas:
    "quote customer metrics action"
    "quote project metrics action";
  gap: 2px 14px;
  align-items: center;
  border-radius: 6px;
  padding: 9px 11px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .05);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.quote-entity-card:hover {
  transform: none;
  border-color: #8eb9df;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .09);
}

.quote-entity-card header { grid-area: quote; display: grid; justify-content: start; }
.quote-entity-card header .badge { margin-top: 5px; width: fit-content; }
.quote-entity-card h3 { font-size: 16px; }
.quote-card-customer { grid-area: customer; font-size: 13px; }
.quote-card-project { grid-area: project; min-height: 0; }
.quote-entity-card dl { grid-area: metrics; align-self: stretch; }
.quote-entity-card footer { grid-area: action; display: grid; justify-items: end; align-content: center; }
.quote-next-action { border-radius: 5px; text-align: center; }

@media (max-width: 1260px) {
  .workspace-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .workspace-toolbar-actions { margin-left: auto; flex-wrap: wrap; }
  .quote-entity-card {
    grid-template-columns: 135px minmax(220px, 1fr) minmax(270px, 330px);
    grid-template-areas:
      "quote customer metrics"
      "quote project action";
  }
  .quote-entity-card footer { justify-items: start; }
  .quote-production-head { display: none; }
  .quote-production-row {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0;
  }
  .quote-date-cell,
  .quote-status-cell,
  .quote-pdf-cell,
  .quote-total-cell,
  .quote-result-cell,
  .quote-action-cell {
    padding-top: 0;
  }
  .quote-pdf-cell,
  .quote-total-cell {
    grid-column: 2;
  }
  .quote-result-cell {
    grid-column: 2;
    grid-template-columns: 1fr auto;
  }
}

/* Employee home hub */
.home-workspace {
  gap: 14px;
  max-width: 1760px;
}

.home-welcome {
  min-height: 168px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid #0e2d49;
  border-top: 5px solid #1489ef;
  border-radius: 10px;
  background:
    linear-gradient(110deg, rgba(20, 137, 239, .18), rgba(20, 137, 239, 0) 48%),
    linear-gradient(135deg, #071b2e 0%, #0b263f 58%, #061521 100%);
  padding: 22px 24px;
  box-shadow: 0 10px 28px rgba(7, 27, 46, .22);
}

.home-welcome p {
  margin: 0 0 3px;
  color: #4cadff;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.home-welcome h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3vw, 46px);
  letter-spacing: 0;
}

.home-welcome-copy > span {
  display: block;
  max-width: 620px;
  margin-top: 8px;
  color: #d7e3ed;
  font-size: 15px;
}

.home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 19px;
}

.home-quick-actions button {
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 850;
}

.home-clear {
  min-width: 290px;
  border: 1px solid #2f5978;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  padding: 16px;
  color: #fff;
}

.home-clear strong,
.home-clear span {
  display: block;
}

.home-clear span {
  margin-top: 5px;
  color: #c6d5e2;
}

.home-priority-job {
  width: min(530px, 46%);
  min-height: 108px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #356b95;
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  padding: 15px;
  color: #fff;
  text-align: left;
}
.home-priority-job:hover { border-color: #66b8ff; background: rgba(255, 255, 255, .1); }
.home-priority-icon {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  background: #1489ef url('../node_modules/lucide-static/icons/flag.svg') center / 24px no-repeat;
}
.home-priority-job span { min-width: 0; }
.home-priority-job small,
.home-priority-job strong,
.home-priority-job b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-priority-job small { margin-bottom: 4px; color: #7fc4ff; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.home-priority-job strong { font-size: 17px; }
.home-priority-job b { margin-top: 5px; color: #c6d5e2; font-size: 12px; }
.home-priority-job em { border: 1px solid #4cadff; border-radius: 7px; color: #bfe2ff; padding: 8px 10px; font-size: 11px; font-style: normal; font-weight: 850; white-space: nowrap; }

.home-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.home-metric {
  min-height: 104px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 13px;
  border: 1px solid #c8d8e5;
  border-left: 5px solid #1489ef;
  border-radius: 9px;
  background: #fff;
  padding: 14px;
  color: #132334;
  text-align: left;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .07);
}

.home-metric:hover { border-color: #83b8e4; background: #fff; transform: translateY(-1px); }
.home-metric.danger { border-left-color: #c51f1f; background: #fff4f3; }
.home-metric.quotes { border-left-color: #d7a21d; background: #fffaeb; }
.home-metric.dispatch { border-left-color: #168463; background: #effaf6; }
.home-metric-icon {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dceeff;
}
.home-metric-icon img { width: 19px; height: 19px; opacity: .78; }
.home-metric.danger .home-metric-icon { background: #ffdedd; }
.home-metric.quotes .home-metric-icon { background: #f9e8b6; }
.home-metric.dispatch .home-metric-icon { background: #cdeee1; }
.home-metric span { align-self: end; color: #405466; font-size: 13px; font-weight: 850; }
.home-metric strong { grid-row: 1 / 3; grid-column: 3; color: #0f172a; font-size: 34px; }
.home-metric small { color: #71808b; font-size: 11px; font-weight: 750; }

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr);
  gap: 12px;
  align-items: start;
}

.home-grid > .surface {
  overflow: hidden;
  border-radius: 9px;
}

.home-attention {
  grid-row: span 2;
}

.home-job-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #edf3f8;
}

.home-job-row {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 120px minmax(240px, 1fr) minmax(135px, 180px) 140px;
  gap: 14px;
  align-items: center;
  border: 1px solid #d4dfe7;
  border-left: 7px solid var(--job-status-color, #9dacb8);
  border-radius: 8px;
  background: #fff;
  padding: 10px 13px;
  color: #132334;
  text-align: left;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .06);
}

.home-job-row:hover { border-color: #83b8e4; background: #f7fbff; }
.home-job-row.is-overdue { border-left-color: #d22121; }
.home-job-row > strong { font-size: 15px; white-space: nowrap; }
.home-job-row > span { min-width: 0; }
.home-job-row b, .home-job-row small { display: block; }
.home-job-row b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.home-job-row small { margin-top: 3px; overflow: hidden; color: #607484; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-job-row em { overflow: hidden; border-radius: 6px; background: #edf3f7; padding: 7px 9px; font-size: 11px; font-style: normal; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.home-job-due { text-align: right; }
.home-job-row.is-overdue .home-job-due b,
.home-job-row.is-overdue .home-job-due small { color: #a51616; }

.home-queue-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f4f8fb;
}

.home-queue-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 104px 112px;
  gap: 10px;
  align-items: center;
  border: 1px solid #d2e0ea;
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
  color: #132334;
  text-align: left;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .05);
}

.home-queue-row:hover { border-color: #83b8e4; background: #f9fcff; }
.home-queue-row > strong { color: #005eb8; font-size: 14px; white-space: nowrap; }
.home-queue-row span,
.home-queue-row b,
.home-queue-row small { display: block; min-width: 0; }
.home-queue-row b,
.home-queue-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-queue-row b { font-size: 12px; }
.home-queue-row small { margin-top: 3px; color: #607484; font-size: 10px; }
.home-queue-row em {
  border-radius: 6px;
  background: #e8f1ff;
  color: #075db7;
  padding: 6px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.department-load-list { display: grid; padding: 8px 14px; }
.department-load-list button {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #dce5eb;
  background: transparent;
  padding: 8px 3px;
  color: #132334;
  text-align: left;
}
.department-load-list button:last-child { border-bottom: 0; }
.department-load-list button:hover { color: #075db7; }
.department-load-list strong, .department-load-list small { display: block; }
.department-load-list strong { font-size: 15px; }
.department-load-list small { margin-top: 3px; color: #607484; font-size: 11px; }
.department-load-list b { font-size: 17px; white-space: nowrap; }
.department-load-copy { flex: 1; min-width: 0; }
.department-load-meter {
  width: 100%;
  height: 6px;
  display: block;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 3px;
  background: #dfe8ee;
}
.department-load-meter i { width: var(--load); height: 100%; display: block; border-radius: inherit; background: #1489ef; }
.department-load-list button:nth-child(2) .department-load-meter i { background: #168463; }
.department-load-list button:nth-child(3) .department-load-meter i { background: #d7a21d; }

.home-document-pressure {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #d5e0e8;
  background: #f7fafc;
}

.home-document-pressure button {
  min-height: 63px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-right: 1px solid #d5e0e8;
  background: transparent;
  color: #405466;
}
.home-document-pressure button:last-child { border-right: 0; }
.home-document-pressure button:hover { background: #eef6ff; color: #075db7; }
.home-document-pressure span { font-size: 9px; font-weight: 800; text-align: center; }
.home-document-pressure strong { color: #132334; font-size: 18px; }

.home-activity { grid-column: 1 / -1; }
.home-activity .timeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.home-activity .timeline article { min-width: 0; }

@media (max-width: 1180px) {
  .home-metrics { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .home-grid { grid-template-columns: 1fr; }
  .home-attention { grid-row: auto; }
  .home-activity { grid-column: auto; }
  .home-activity .timeline { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .home-welcome { align-items: stretch; flex-direction: column; }
  .home-priority-job { width: 100%; }
  .home-metrics { grid-template-columns: 1fr; }
  .home-job-row { grid-template-columns: 92px minmax(0, 1fr); }
  .home-job-row > em { grid-column: 1; }
  .home-job-due { grid-column: 2; grid-row: 2; text-align: right; }
  .home-queue-row { grid-template-columns: 68px minmax(0, 1fr); }
  .home-queue-row em { grid-column: 1; }
  .home-document-pressure { grid-template-columns: 1fr; }
  .home-document-pressure button { border-right: 0; border-bottom: 1px solid #d5e0e8; }
}

/* Home command center */
.home-command-center {
  gap: 8px;
  max-width: 1780px;
}

.home-command-shell {
  overflow: hidden;
  border: 1px solid #c8d8e5;
  border-top: 4px solid #1489ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(13, 41, 64, .1);
}

.home-command-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 560px);
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(105deg, rgba(20, 137, 239, .24), rgba(20, 137, 239, 0) 46%),
    linear-gradient(135deg, #071b2e 0%, #0b263f 62%, #061521 100%);
  padding: 10px 12px;
  box-shadow: none;
}

.home-dashboard-controls {
  display: grid;
  grid-template-columns: minmax(420px, 620px) minmax(0, 1fr);
  justify-content: stretch;
  gap: 8px;
  align-items: stretch;
  border: 0;
  border-top: 1px solid #c8d8e5;
  border-radius: 0;
  background: #fff;
  padding: 6px;
  box-shadow: none;
}

.home-dashboard-controls .department-schedules {
  width: auto;
  min-width: 0;
  border: 1px solid #c9dbec;
  background: #f2f7fd;
  padding: 3px;
  box-shadow: none;
}

.home-dashboard-controls .department-schedules button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #405466;
  box-shadow: none;
}

.home-dashboard-controls .department-schedules button.active {
  border-color: #106eea;
  background: #106eea;
  color: #fff;
  box-shadow: 0 3px 8px rgba(16,110,234,.18);
}

.home-command-greeting p,
.home-command-greeting h2,
.home-command-greeting span {
  display: block;
  margin: 0;
}

.home-command-greeting p {
  color: #5db8ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-command-greeting h2 {
  margin-top: 4px;
  color: #fff;
  font-size: 22px;
  line-height: 1.05;
}

.home-command-greeting span {
  margin-top: 5px;
  color: #d1dde8;
  font-size: 11px;
  font-weight: 700;
}

.home-command-actions {
  display: none !important;
  flex-direction: column;
  gap: 8px;
}

.home-command-strip .home-command-tile:nth-child(n+5) {
  display: none;
}

.home-command-actions button {
  min-width: 104px;
  min-height: 34px;
  border-radius: 6px;
  font-weight: 900;
}

.home-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 6px;
  min-width: 0;
}

.home-command-tile {
  min-height: 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 8px;
  border: 1px solid rgba(139, 183, 220, .38);
  border-left: 4px solid #1489ef;
  border-radius: 7px;
  background: #fff;
  padding: 6px 10px;
  color: #132334;
  text-align: left;
  box-shadow: none;
}

.home-command-tile:hover {
  border-color: #83b8e4;
  background: #fbfdff;
  transform: translateY(-1px);
}

.home-command-tile span {
  color: #405466;
  font-size: 10px;
  font-weight: 900;
}

.home-command-tile strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: #071b2e;
  font-size: 18px;
  line-height: 1;
}

.home-command-tile small {
  color: #607484;
  font-size: 9px;
  font-weight: 750;
}

.home-command-tile.danger { border-left-color: #d21f1f; background: #fff7f7; }
.home-command-tile.due { border-left-color: #d7a21d; }
.home-command-tile.document { border-left-color: #7b61ff; }
.home-command-tile.people { border-left-color: #0f7dbf; }
.home-command-tile.quote { border-left-color: #d78719; background: #fffaf0; }
.home-command-tile.truck { border-left-color: #168463; background: #f2fbf7; }
.home-command-tile.active { border-left-color: #1489ef; }

.home-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  gap: 9px;
  align-items: start;
}

.home-command-grid > .surface,
.home-side-stack > .surface {
  overflow: hidden;
  border-radius: 9px;
}

.home-lane-primary {
  grid-row: auto;
}

.home-side-stack {
  display: grid;
  gap: 9px;
  min-width: 0;
  align-content: start;
}

.home-lane-list {
  display: grid;
  gap: 6px;
  padding: 7px;
  background: #edf3f8;
}

.home-lane-list.compact {
  background: #f5f9fc;
}

.home-task-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 96px minmax(220px, 1fr) minmax(112px, 138px) 124px;
  gap: 10px;
  align-items: center;
  border: 1px solid #d0dce6;
  border-left: 5px solid #1489ef;
  border-radius: 7px;
  background: #fff;
  padding: 6px 10px;
  color: #132334;
  text-align: left;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}

.home-task-row:hover {
  border-color: #83b8e4;
  background: #fbfdff;
}

.home-task-row.is-late { border-left-color: #d21f1f; }
.home-estimate-task { border-left-color: #d78719; }
.home-dispatch-task { border-left-color: #168463; }

.home-task-row > strong {
  color: #071b2e;
  font-size: 13px;
  white-space: nowrap;
}

.home-task-row span,
.home-task-row b,
.home-task-row small {
  display: block;
  min-width: 0;
}

.home-task-row b,
.home-task-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-row b { font-size: 12px; }
.home-task-row small {
  margin-top: 2px;
  color: #607484;
  font-size: 10px;
}

.home-task-row em {
  overflow: hidden;
  border-radius: 5px;
  background: #e8f1ff;
  color: #075db7;
  padding: 6px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-task-meta {
  text-align: right;
}

.home-task-row.is-late .home-task-meta b,
.home-task-row.is-late .home-task-meta small {
  color: #a51616;
}

.home-department-load-list {
  display: grid;
  gap: 6px;
  padding: 7px;
  background: #f5f9fc;
}

.home-department-load-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid #ccdbe6;
  border-left: 5px solid #1489ef;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  color: #132334;
  text-align: left;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}

.home-department-load-row:hover {
  border-color: #83b8e4;
  background: #fbfdff;
}

.home-department-load-row.active {
  border-color: #1489ef;
  background: #f1f8ff;
}

.home-department-load-row span,
.home-department-load-row strong,
.home-department-load-row small {
  display: block;
  min-width: 0;
}

.home-department-load-row strong {
  color: #071b2e;
  font-size: 13px;
}

.home-department-load-row small {
  overflow: hidden;
  margin-top: 2px;
  color: #405466;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-department-load-row b {
  color: #071b2e;
  font-size: 14px;
  white-space: nowrap;
}

.home-department-load-row em {
  grid-column: 1 / -1;
  color: #607484;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.home-department-load-row .department-load-meter {
  grid-column: 1 / -1;
  height: 6px;
}

.home-command-center .home-priority-job {
  width: 100%;
  min-height: 76px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
}

.home-command-center .home-priority-icon {
  width: 38px;
  height: 38px;
  background-size: 20px;
}

.home-command-center .home-priority-job strong {
  font-size: 14px;
}

.home-command-center .home-priority-job b {
  margin-top: 3px;
  font-size: 11px;
}

.home-command-center .home-priority-job em {
  padding: 6px 8px;
  font-size: 10px;
}

.home-command-center .home-activity {
  grid-column: 1 / -1;
}

.home-command-center .home-activity .timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

@media (max-width: 1220px) {
  .home-command-hero,
  .home-dashboard-controls { grid-template-columns: 1fr; }
  .home-command-strip { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .home-command-grid { grid-template-columns: 1fr; }
  .home-lane-primary { grid-row: auto; }
  .home-command-center .home-activity { grid-column: auto; }
}

@media (max-width: 780px) {
  .home-command-strip { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .home-task-row { grid-template-columns: 92px minmax(0, 1fr); }
  .home-task-row em { grid-column: 1; }
  .home-task-meta { grid-column: 2; grid-row: 2; }
  .home-command-center .home-activity .timeline { grid-template-columns: 1fr; }
}

/* Shared form entry controls */
.source-form .source-label,
.source-form .job-entry-field > span,
.form-dialog .field > span {
  color: #24384a;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.source-form .source-control,
.form-dialog .field input,
.form-dialog .field select,
.form-dialog .field textarea,
.source-form .source-repeat-table input,
.source-form .source-repeat-table select,
.source-form .source-repeat-table textarea,
.source-form .source-totals input {
  border: 1px solid #a9bac8;
  border-radius: 5px;
  background: #f7fafc;
  color: #142433;
  box-shadow: 0 1px 2px rgba(15, 35, 52, .06), inset 0 1px 0 rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.source-form input.source-control,
.source-form select.source-control,
.form-dialog .field input,
.form-dialog .field select {
  min-height: 38px;
  padding: 7px 10px;
}

.source-form textarea.source-control,
.form-dialog .field textarea,
.source-form .source-repeat-table textarea {
  padding: 9px 10px;
  line-height: 1.42;
}

.source-form .source-control:hover,
.form-dialog .field input:hover,
.form-dialog .field select:hover,
.form-dialog .field textarea:hover,
.source-form .source-repeat-table input:hover,
.source-form .source-repeat-table select:hover,
.source-form .source-repeat-table textarea:hover {
  border-color: #7f9db5;
  background: #fff;
}

.source-form .source-control:focus,
.form-dialog .field input:focus,
.form-dialog .field select:focus,
.form-dialog .field textarea:focus,
.source-form .source-repeat-table input:focus,
.source-form .source-repeat-table select:focus,
.source-form .source-repeat-table textarea:focus {
  outline: 0;
  border-color: #1688f0;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 136, 240, .14), 0 2px 4px rgba(15, 35, 52, .08);
}

.source-form .source-control::placeholder,
.form-dialog .field input::placeholder,
.form-dialog .field textarea::placeholder,
.source-form .source-repeat-table textarea::placeholder {
  color: #7b8c9a;
  font-weight: 500;
  opacity: 1;
}

.source-form .source-control[readonly],
.form-dialog .field input[readonly],
.source-form .source-repeat-table input[readonly] {
  border-color: #c6d2db;
  background: #eaf0f4;
  color: #506474;
  box-shadow: none;
}

.job-entry-reference-form .source-card-body {
  background: #fbfdff;
}

.job-entry-reference-form .job-entry-field textarea.source-control {
  min-height: 76px;
}

.source-form .source-control,
.form-dialog .field input:not([type="email"]):not([type="url"]):not([type="password"]),
.form-dialog .field select,
.form-dialog .field textarea,
.source-form .source-repeat-table input,
.source-form .source-repeat-table select,
.source-form .source-repeat-table textarea {
  text-transform: uppercase;
}

.email-compose-form input,
.email-compose-form textarea {
  text-transform: none !important;
}

/* Cohesion pass: one Empire workspace language across sections */
.workspace-page {
  gap: 12px;
}

.workspace-toolbar,
.production-toolbar.workspace-toolbar,
.materials-workspace-toolbar {
  min-height: 64px;
  align-items: center;
  border-color: #b9c8d4;
  border-top-width: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
  box-shadow: 0 5px 14px rgba(15, 35, 52, .075);
}

.workspace-toolbar-title strong {
  font-size: 16px;
  letter-spacing: 0;
}

.workspace-surface,
.delivery-command,
.quote-production-surface,
.materials-surface {
  border-color: #c3d0da;
  border-radius: 8px;
  background: #edf3f7;
  box-shadow: 0 5px 15px rgba(15, 35, 52, .075);
}

.production-toolbar-controls {
  align-items: center;
  gap: 14px;
}

.department-filter-group,
.status-filter-group {
  position: relative;
}

.department-filter-group + .status-filter-group {
  padding-left: 16px;
}

.department-filter-group + .status-filter-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #c8d4dd;
}

.department-schedules,
.queue-filters,
.job-layout-toggle {
  gap: 3px;
  border-color: #c4d1dc;
  border-radius: 6px;
  background: #f2f7fd;
  padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.department-schedules button,
.queue-filters button,
.job-layout-toggle button {
  min-height: 36px;
  border-radius: 5px;
  padding: 7px 12px;
  color: #405466;
  font-size: 13px;
  font-weight: 700;
}

.department-schedules button.active,
.queue-filters button.active,
.job-layout-toggle button.active {
  border-color: #106eea;
  background: #106eea;
  color: #fff;
  box-shadow: 0 3px 8px rgba(16,110,234,.18);
}

.workspace-record-count {
  min-width: 70px;
  border-left-color: #c8d4dd;
}

.workspace-record-count strong {
  font-size: 20px;
}

.fab-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.fab-table thead th,
.quote-production-head {
  color: #29465d;
  font-size: 9px;
  letter-spacing: 0;
}

.fab-table .fab-job-row td {
  height: 70px;
  border-top-color: rgba(32, 48, 60, .16);
  border-bottom-color: rgba(32, 48, 60, .22);
}

.fab-table .fab-job-row:hover td {
  filter: brightness(.985);
}

.quote-production-surface {
  padding: 9px;
}

.quote-production-list {
  gap: 8px;
}

.quote-production-head,
.quote-production-row {
  grid-template-columns: 132px minmax(360px, 1fr) 148px 176px 116px 140px;
}

.quote-production-row {
  min-height: 72px;
  border-color: #cfdbe4;
  border-left-width: 5px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(15, 35, 52, .06);
}

.quote-production-row:hover {
  background: #fbfdff;
  border-color: #8bb7df;
  box-shadow: 0 7px 16px rgba(15, 35, 52, .11);
}

.quote-project-cell strong,
.quote-number-cell strong {
  font-size: 15px;
}

.quote-project-cell span,
.quote-project-cell b {
  line-height: 1.3;
}

.system-record-table {
  border-spacing: 0 8px;
  padding: 0 8px 8px;
}

.system-record-table tbody td {
  height: 62px;
  border-color: #cfdbe4;
  box-shadow: 0 2px 5px rgba(15, 35, 52, .04);
}

.system-record-table tbody td:first-child {
  border-left-width: 5px;
  border-radius: 7px 0 0 7px;
}

.system-record-table tbody td:last-child {
  border-radius: 0 7px 7px 0;
}

.system-record-table tbody tr:hover td {
  background: #f7fbff !important;
  border-color: #9bc1e2;
}

.delivery-queue {
  gap: 8px;
  padding: 8px;
}

.delivery-queue-row {
  min-height: 72px;
  border-color: #cfdbe4;
  border-left-width: 5px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(15, 35, 52, .06);
}

.materials-summary-strip {
  border-radius: 8px;
}

.source-card,
.job-entry-reference-form .source-card,
.work-order-reference-form .source-card,
.form-dialog.reference-header-dialog .source-card {
  border-color: #0d7ff2;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: none;
}

.source-card > h3,
.job-entry-reference-form .source-card > h3,
.work-order-reference-form .source-card > h3,
.form-dialog.reference-header-dialog .source-card > h3,
.form-dialog.reference-header-dialog .form-section-title {
  min-height: 39px;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #1688f0, #0758d9);
  color: #fff;
  letter-spacing: 0;
}

.source-card-body,
.job-entry-reference-form .source-card-body,
.work-order-reference-form .source-card-body {
  background: #fbfdff;
}

.form-dialog.reference-header-dialog {
  border-radius: 21px;
  box-shadow: 0 24px 70px rgba(7, 18, 31, .28);
}

.form-dialog.reference-header-dialog header {
  min-height: 70px;
  background: #fff;
  border-bottom: 1px solid #d7e0e7;
}

.form-dialog.reference-header-dialog header h2 {
  color: #091827;
  font-size: 24px;
  font-weight: 600;
}

.form-dialog.reference-header-dialog .dialog-body {
  background: #f5f8fb;
}

.form-dialog.reference-header-dialog footer {
  background: rgba(255,255,255,.96);
  border-top: 1px solid #d7e0e7;
}

.document-preview {
  width: min(1080px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  border: 1px solid #b7c6d2;
  border-radius: 21px;
  padding: 0;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 18, 31, .3);
}

.document-preview::backdrop {
  background: rgba(7, 18, 31, .58);
}

.document-preview-toolbar {
  min-height: 70px;
  padding: 12px 20px;
  border-bottom: 1px solid #d7e0e7;
  background: #fff;
  color: #091827;
}

.document-preview-toolbar strong {
  font: 600 24px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
}

.document-preview-toolbar .secondary,
.document-preview-toolbar .primary {
  min-height: 34px;
}

.document-preview-toolbar [data-close-dialog] {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border: 2px solid #0b69a5;
  border-radius: 50%;
  background: #fff;
  padding: 0;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}

.document-preview-toolbar [data-close-dialog]::after {
  content: "\00d7";
  color: #46545d;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
}

.document-preview-body {
  background: #f5f8fb;
}

/* Spreadsheet density pass */
.workspace-page {
  gap: 8px;
}

.workspace-toolbar.production-toolbar,
.workspace-toolbar.materials-workspace-toolbar {
  min-height: 46px;
  padding: 6px 10px;
}

.department-filter-group + .status-filter-group {
  padding-left: 12px;
}

.department-schedules,
.queue-filters,
.job-layout-toggle {
  gap: 2px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
}

.department-schedules button,
.queue-filters button,
.job-layout-toggle button {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.workspace-record-count {
  min-width: 54px;
}

.workspace-record-count strong {
  font-size: 17px;
}

.workspace-record-count span {
  font-size: 8px;
}

.fab-sheet-scroll {
  padding-bottom: 2px;
}

.fab-table {
  min-width: 1060px;
  border-spacing: 0 4px;
  font-size: 13px;
}

.fab-table .fab-col-job { width: 112px; }
.fab-table .fab-col-date { width: 104px; }
.fab-table .fab-col-time { width: 74px; }
.fab-table .fab-col-status { width: 172px; }
.fab-table .fab-col-docs { width: 82px; }
.fab-table .fab-col-tech { width: 144px; }
.fab-table .fab-col-hours { width: 54px; }

.fab-table th,
.data-table.fab-table thead th {
  height: 24px;
  padding: 2px 9px 4px;
  font-size: 8px;
}

.fab-table th:nth-child(2),
.fab-table td:nth-child(2) {
  left: 112px;
}

.fab-table .fab-job-row {
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, .11));
}

.fab-table .fab-job-row td {
  height: 54px;
  padding: 5px 9px;
}

.fab-table .fab-job-row td:first-child {
  border-left-width: 4px;
  border-radius: 6px 0 0 6px;
}

.fab-table .fab-job-row td:last-child {
  border-radius: 0 6px 6px 0;
}

.fab-job-number strong {
  font-size: 15px;
}

.fab-row-customer {
  font-size: 15px;
  line-height: 1.05;
}

.fab-row-reference {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.05;
}

.fab-row-description {
  margin-top: 1px !important;
  font-size: 10px !important;
  line-height: 1.15;
}

.fab-due-date strong,
.fab-due-time strong {
  font-size: 12px;
  line-height: 1.1;
}

.fab-due-date small {
  margin-top: 2px;
  font-size: 9px;
}

.fab-status {
  min-height: 30px;
  padding: 3px 7px;
  font-size: 11px;
}

.fab-doc-indicator {
  width: 29px;
  height: 33px;
  margin-right: 2px;
  border-radius: 4px;
}

.fab-doc-indicator > span {
  font-size: 13px;
}

.fab-doc-indicator small {
  font-size: 7px;
}

.fab-doc-indicator.is-current::after,
.fab-doc-indicator.is-stale::after,
.fab-doc-indicator.is-draft::after {
  width: 12px;
  height: 12px;
  top: -4px;
  right: -4px;
  font-size: 8px;
}

.fab-assigned-tech strong {
  max-width: 132px;
  font-size: 11px;
  line-height: 1.18;
}

.fab-hours strong {
  font-size: 12px;
}

.quote-production-surface {
  padding: 6px;
}

.quote-production-list {
  gap: 5px;
}

.quote-production-head,
.quote-production-row {
  grid-template-columns: 122px minmax(340px, 1fr) 132px 158px 96px 122px;
  gap: 5px;
}

.quote-production-row {
  min-height: 58px;
  border-left-width: 4px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 35, 52, .06);
}

.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 5px 8px;
}

.quote-number-cell strong,
.quote-project-cell strong {
  font-size: 14px;
  line-height: 1.05;
}

.quote-project-cell b,
.quote-project-cell span {
  font-size: 10px;
  line-height: 1.15;
}

.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong {
  font-size: 12px;
}

.quote-number-cell span,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small {
  font-size: 9px;
}

.quote-status-select,
.quote-doc-signal {
  min-height: 30px;
  font-size: 10px;
}

.quote-doc-signal span {
  padding: 2px 4px;
  font-size: 7px;
}

.home-command-center {
  gap: 7px;
}

.home-command-shell {
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(13, 41, 64, .08);
}

.home-command-hero {
  min-height: 68px;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 540px);
  padding: 8px 10px;
}

.home-command-greeting h2 {
  font-size: 20px;
}

.home-command-greeting span {
  margin-top: 3px;
  font-size: 10px;
}

.home-command-center .home-priority-job {
  min-height: 54px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  padding: 7px 9px;
}

.home-command-center .home-priority-icon {
  width: 32px;
  height: 32px;
}

.home-dashboard-controls {
  grid-template-columns: minmax(360px, 600px) minmax(0, 1fr);
  gap: 6px;
  padding: 5px;
}

.home-dashboard-controls .department-schedules button {
  min-height: 32px;
}

.home-command-strip {
  gap: 5px;
}

.home-command-tile {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 6px;
}

.home-command-tile strong {
  font-size: 16px;
}

.home-command-tile span,
.home-command-tile small {
  font-size: 9px;
}

.home-command-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 7px;
}

.home-lane-list,
.home-lane-list.compact,
.home-department-load-list {
  gap: 4px;
  padding: 5px;
}

.home-task-row {
  min-height: 38px;
  grid-template-columns: 86px minmax(190px, 1fr) minmax(100px, 126px) 104px;
  gap: 8px;
  padding: 4px 8px;
}

.home-task-row > strong {
  font-size: 12px;
}

.home-task-row b {
  font-size: 11px;
}

.home-task-row small,
.home-task-row em {
  font-size: 9px;
}

.home-department-load-row {
  min-height: 45px;
  padding: 6px 8px;
}

.home-department-load-row .department-load-meter {
  height: 4px;
}

/* Crisp production grid readability */
.fab-sheet-scroll {
  background: #eef3f7;
}

.fab-table {
  border-spacing: 0 2px;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

.fab-table th,
.data-table.fab-table thead th {
  height: 25px;
  background: #e6f1f9 !important;
  border-right: 1px solid #b9cad8;
  border-bottom: 1px solid #8fb4cf;
  color: #123049 !important;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fab-table th:nth-child(2),
.fab-table td:nth-child(2) {
  box-shadow: 1px 0 0 rgba(0, 0, 0, .22);
}

.fab-table .fab-job-row {
  filter: none;
}

.fab-table .fab-job-row td {
  height: 56px;
  border-top: 1px solid rgba(0, 0, 0, .22);
  border-right: 1px solid rgba(0, 0, 0, .18);
  border-bottom: 1px solid rgba(0, 0, 0, .24);
  box-shadow: none;
}

.fab-table .fab-job-row td:first-child {
  border-left-width: 3px;
  border-radius: 4px 0 0 4px;
}

.fab-table .fab-job-row td:last-child {
  border-radius: 0 4px 4px 0;
}

.fab-job-number strong,
.fab-row-customer,
.fab-row-reference,
.fab-row-description,
.fab-due-date strong,
.fab-due-date small,
.fab-due-time strong,
.fab-assigned-tech strong,
.fab-hours strong {
  font-family: Arial, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.fab-job-number strong {
  font-size: 15px;
  font-weight: 800;
}

.fab-row-customer {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.05;
}

.fab-row-reference {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
}

.fab-row-description {
  margin-top: 1px !important;
  font-size: 10px !important;
  font-weight: 500;
  line-height: 1.1;
}

.fab-status {
  min-height: 31px;
  border-color: #8f9aa3;
  border-radius: 2px;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.fab-doc-indicator {
  border-radius: 3px;
  box-shadow: none;
}

.fab-doc-indicator.is-missing {
  opacity: .38;
}

/* Dashboard-aligned production rows */
.jobs-workspace .fab-sheet:not(.fab-card-surface) {
  padding: 6px;
  border: 0;
  background: #eef3f7;
  box-shadow: none;
}

.job-production-list {
  display: grid;
  gap: 6px;
  background: #eef3f7;
}

.job-production-list.is-empty {
  padding: 12px;
  border: 1px solid #c9d7e3;
  border-radius: 6px;
  background: #fff;
}

.job-production-row {
  display: grid;
  grid-template-columns: 112px minmax(360px, 1fr) 116px 164px 84px minmax(128px, 148px) 54px;
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid rgba(5, 21, 37, .28);
  border-left: 12px solid color-mix(in srgb, var(--job-status-color, #1784ea) 82%, #000 18%);
  border-radius: 4px;
  background: var(--job-row-bg, #fff);
  box-shadow: 0 1px 1px rgba(15, 35, 55, .12);
  color: var(--job-row-ink, #03101f);
  font-family: Arial, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-row.is-late {
  border-left-color: #d60000;
}

.job-production-row:hover,
.job-production-row:focus-visible {
  border-color: rgba(5, 21, 37, .5);
  border-left-color: color-mix(in srgb, var(--job-status-color, #1784ea) 72%, #000 28%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42), 0 2px 5px rgba(15, 35, 55, .16);
  outline: none;
}

.job-production-row.is-late:hover,
.job-production-row.is-late:focus-visible {
  border-left-color: #d60000;
}

.job-production-row > div {
  min-width: 0;
  padding: 6px 10px;
}

.job-production-row.status-office_queue {
  background: #fff;
}

.job-production-number strong,
.job-production-project strong,
.job-production-project b,
.job-production-project span,
.job-production-date strong,
.job-production-date small,
.job-production-date em,
.job-production-tech strong,
.job-production-hours strong {
  font-family: Arial, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.job-production-number strong {
  display: block;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.job-production-project strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
}

.job-production-project b {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--job-row-ink, #03101f);
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.05;
}

.job-production-project span {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--job-row-muted, #03101f);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.12;
}

.job-production-date strong,
.job-production-date small,
.job-production-date em {
  display: block;
  white-space: nowrap;
}

.job-production-date strong {
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.05;
}

.job-production-date small {
  margin-top: 2px;
  color: var(--job-row-muted, #526471);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.05;
}

.job-production-date small.warning-text {
  color: var(--job-row-muted, #526471) !important;
}

.job-production-date em {
  margin-top: 2px;
  color: var(--job-row-ink, #071424);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.05;
}

.job-production-status .fab-status {
  width: 100%;
}

.job-production-docs.fab-docs {
  justify-content: center;
  gap: 4px;
}

.job-production-tech strong {
  display: block;
  white-space: normal;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.14;
}

.job-production-hours {
  text-align: center;
}

.job-production-hours strong {
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .job-production-row {
    grid-template-columns: 100px minmax(300px, 1fr) 104px 154px 76px 120px 48px;
  }

  .job-production-row > div {
    padding-right: 7px;
    padding-left: 7px;
  }
}

/* Dashboard job-scale alignment */
.home-command-center {
  font-size: 13px;
}

.home-command-shell {
  border-top-width: 4px;
}

.home-dashboard-controls .department-schedules button {
  min-height: 36px;
  font-size: 13px;
}

.home-command-tile {
  min-height: 42px;
}

.home-command-tile strong {
  font-size: 22px;
}

/* Five operating departments plus the all-departments view. */
@media (min-width: 1201px) {
  .home-dashboard-controls {
    grid-template-columns: minmax(650px, 760px) minmax(0, 1fr);
  }

  .home-dashboard-controls .department-schedules {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr .78fr .68fr 1fr;
  }

  .home-dashboard-controls .department-schedules button {
    min-width: 0;
    justify-content: center;
    padding-right: 8px;
    padding-left: 8px;
  }
}

.home-command-tile span {
  font-size: 11px;
}

.home-command-tile small {
  font-size: 10px;
}

.home-task-row {
  min-height: 54px;
  grid-template-columns: 108px minmax(220px, 1fr) minmax(132px, 150px) 118px;
  gap: 10px;
  padding: 6px 10px;
}

.home-task-row > strong {
  font-size: 15px;
}

.home-task-row b {
  font-size: 14px;
  line-height: 1.05;
}

.home-task-row small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.15;
}

.home-task-row em {
  min-height: 28px;
  padding: 6px 9px;
  font-size: 10px;
}

.home-task-meta b {
  font-size: 12px;
}

.home-department-load-row {
  min-height: 54px;
}

/* Full-system spreadsheet density pass */
.workspace-toolbar,
.production-toolbar.workspace-toolbar,
.materials-workspace-toolbar {
  min-height: 42px;
  gap: 10px;
  border-top-width: 3px;
  border-radius: 6px;
  padding: 5px 8px;
}

.workspace-toolbar-title {
  min-width: 142px;
  gap: 0;
}

.workspace-toolbar-title strong {
  font-size: 13px;
}

.workspace-toolbar-title span {
  font-size: 9px;
  line-height: 1.2;
}

.workspace-toolbar-actions {
  gap: 5px;
}

.workspace-toolbar-actions .primary,
.workspace-toolbar-actions .secondary,
.customer-list-actions .primary,
.customer-list-actions .secondary {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.workspace-summary-strip > span {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 9px;
}

.workspace-summary-strip strong {
  font-size: 12px;
}

.workspace-surface,
.surface {
  border-radius: 6px;
}

.workspace-surface .section-head,
.section-head {
  min-height: 38px;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px 6px 0 0;
}

.workspace-surface .section-head h2,
.section-head h2 {
  font-size: 13px;
}

.section-head p {
  margin-top: 1px;
  font-size: 9px;
}

.data-table {
  font-size: 11px;
}

.data-table thead th {
  padding: 5px 7px;
  font-size: 8px;
}

.data-table tbody td {
  padding: 5px 7px;
}

.data-table small {
  margin-top: 1px;
  font-size: 9px;
}

.system-record-table {
  border-spacing: 0 4px;
  padding: 0 5px 5px;
}

.system-record-table thead th {
  padding: 4px 7px 2px;
}

.system-record-table tbody td {
  height: 42px;
  padding: 4px 7px;
}

.system-record-table tbody td:first-child {
  border-left-width: 4px;
  border-radius: 5px 0 0 5px;
}

.system-record-table tbody td:last-child {
  border-radius: 0 5px 5px 0;
}

.system-record-table tbody strong {
  font-size: 12px;
  line-height: 1.15;
}

.system-record-table .compact-select,
.delivery-status-select {
  min-height: 28px;
  padding: 3px 7px;
  font-size: 10px;
}

.record-row-scroll {
  background: #edf2f6;
}

.customer-list-actions {
  gap: 5px;
}

.customer-list-actions label {
  gap: 1px;
  font-size: 8px;
}

.customer-list-actions select {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 11px;
}

.materials-workspace-toolbar .production-toolbar-controls {
  gap: 7px;
}

.materials-controls {
  gap: 6px;
}

.materials-controls label {
  gap: 1px;
  font-size: 8px;
}

.materials-controls select {
  min-width: 138px;
  min-height: 30px;
  padding: 4px 7px;
  font-size: 10px;
}

.materials-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.materials-summary-strip > span {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 8px;
}

.materials-summary-strip strong {
  font-size: 12px;
}

.materials-db-scroll {
  max-height: calc(100vh - 230px);
  padding: 5px;
}

.materials-db-table {
  min-width: 1040px;
  border-spacing: 0 4px;
  font-size: 11px;
}

.materials-db-table thead th {
  padding: 4px 7px 2px;
  font-size: 8px;
}

.materials-db-table th:nth-child(1) { width: 265px; }
.materials-db-table th:nth-child(2) { width: 205px; }
.materials-db-table th:nth-child(3) { width: 110px; }
.materials-db-table th:nth-child(4),
.materials-db-table th:nth-child(5) { width: 82px; }
.materials-db-table th:nth-child(6) { width: 132px; }
.materials-db-table th:nth-child(7) { width: 165px; }
.materials-db-table th:nth-child(8) { width: 92px; }

.materials-db-table tbody td {
  height: 48px;
  padding: 5px 7px;
}

.materials-db-table .material-name strong {
  font-size: 12px;
  line-height: 1.12;
}

.materials-db-table .material-name small,
.material-basis-cell small,
.material-vendor-cell small,
.material-money-cell small,
.material-spec-cell small {
  margin-top: 1px;
  font-size: 8px;
}

.material-spec-cell strong,
.material-basis-cell strong,
.material-vendor-cell strong {
  font-size: 10px;
  line-height: 1.12;
}

.material-money-cell strong,
.material-sell-price strong {
  font-size: 12px;
}

.materials-db-table .row-actions {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 2px;
}

.materials-db-table .row-actions .text-button {
  min-height: 25px;
  padding: 3px 6px;
  font-size: 9px;
}

.delivery-command {
  border-radius: 6px;
}

.delivery-queue-head,
.delivery-queue-row {
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 1fr) 104px 142px 126px;
  gap: 6px;
}

.delivery-queue-head {
  padding: 5px 9px 2px;
  font-size: 8px;
}

.delivery-queue {
  gap: 4px;
  padding: 5px;
}

.delivery-queue-row {
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}

.delivery-job button {
  font-size: 12px;
}

.delivery-job strong,
.delivery-destination strong,
.delivery-date strong {
  font-size: 11px;
  line-height: 1.12;
}

.delivery-job span,
.delivery-destination span,
.delivery-date span {
  font-size: 9px;
}

.delivery-job small,
.delivery-destination small {
  font-size: 8px;
}

.delivery-document-actions {
  gap: 3px;
}

.delivery-pdf-button,
.delivery-create-button,
.delivery-document-actions .text-button {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 9px;
}

.reports-workspace .report-metrics {
  gap: 5px;
  margin-bottom: 7px;
}

.reports-workspace .metric {
  min-height: 52px;
  padding: 7px 9px;
  border-radius: 6px;
  border-top-width: 3px;
}

.reports-workspace .metric span {
  font-size: 9px;
}

.reports-workspace .metric strong {
  font-size: 17px;
}

.settings-workspace .content-grid {
  gap: 7px;
}

.settings-workspace .surface {
  border-radius: 6px;
}

.settings-workspace .surface h3 {
  padding: 8px 10px;
  font-size: 13px;
}

.settings-list {
  padding: 2px 10px 7px;
}

.settings-list > div {
  padding: 6px 0;
}

.settings-list span,
.settings-list strong,
.settings-workspace p {
  font-size: 11px;
}

.settings-actions {
  padding: 7px 10px;
}

.settings-actions .primary,
.settings-actions .secondary {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.pilot-checklist > div {
  min-height: 30px;
  grid-template-columns: 18px 1fr auto;
  gap: 5px;
  padding: 4px 8px;
}

.pilot-checklist strong,
.pilot-checklist small {
  font-size: 10px;
}

/* Cohesive readable record rows */
.job-production-list,
.quote-production-list,
.record-row-scroll {
  background: #eef3f7;
}

.job-production-row,
.quote-production-row {
  min-height: 56px;
  border: 1px solid #c7d5e1;
  border-left: 10px solid color-mix(in srgb, var(--job-status-color, var(--department-accent, #1784ea)) 86%, #000 14%);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 35, 55, .08);
  color: #061525;
  font-family: Arial, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-row {
  grid-template-columns: 112px minmax(380px, 1fr) 116px 164px 84px minmax(128px, 148px) 54px;
}

.job-production-row.is-late {
  border-left-color: #d60000;
}

.job-production-row:hover,
.job-production-row:focus-visible,
.quote-production-row:hover,
.quote-production-row:focus-visible {
  background: #f8fbff;
  border-color: #94b9d8;
  box-shadow: 0 2px 6px rgba(15, 35, 55, .12);
  outline: none;
}

.job-production-row.is-late:hover,
.job-production-row.is-late:focus-visible {
  border-left-color: #d60000;
}

.job-production-row > div,
.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 5px 9px;
}

.job-production-number strong,
.job-production-project strong,
.quote-number-cell strong,
.quote-project-cell strong {
  color: #061525;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.job-production-project b,
.quote-project-cell b {
  color: #061525;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.1;
}

.job-production-project span,
.quote-project-cell span,
.quote-number-cell span,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small {
  color: #21384c;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.15;
}

.job-production-date strong,
.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong,
.job-production-tech strong,
.job-production-hours strong {
  color: #061525;
  font-weight: 900;
  letter-spacing: 0;
}

.job-production-date small {
  color: #354a5e;
}

.job-production-date small.warning-text {
  color: #b50000 !important;
}

.job-production-date em {
  color: #061525;
}

.job-production-row .compact-select,
.quote-production-row .compact-select,
.quote-status-select {
  min-height: 28px;
  border-color: #aebfce;
  background: #fff;
  color: #061525;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customers-workspace .system-record-table {
  border-spacing: 0 5px;
  background: #eef3f7;
}

.customers-workspace .system-record-table thead th {
  color: #2e4a60;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customers-workspace .system-record-table tbody tr {
  text-transform: uppercase;
}

.customers-workspace .system-record-table tbody td {
  height: 42px;
  border-color: #c7d5e1;
  background: #fff;
  color: #061525;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0;
}

.customers-workspace .system-record-table tbody td:first-child {
  border-left: 8px solid var(--empire-blue);
  border-radius: 5px 0 0 5px;
}

.customers-workspace .system-record-table tbody strong {
  color: #061525;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.customers-workspace .system-record-table tbody small {
  color: #486074;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

/* Dashboard-grade readable rows */
.job-production-list,
.quote-production-list {
  gap: 6px;
  padding: 6px;
  background: #edf3f8;
}

.job-production-row,
.quote-production-row {
  min-height: 62px;
  border: 1px solid #d4dfe7;
  border-left: 8px solid color-mix(in srgb, var(--job-status-color, var(--department-accent, #1784ea)) 88%, #000 12%);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .055);
  color: #132334;
  font-family: Arial, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-row {
  grid-template-columns: 118px minmax(470px, 1fr) 126px 154px 78px minmax(132px, 154px) 50px;
}

.job-production-row:nth-child(even),
.quote-production-row:nth-child(even) {
  background: #f8fbfd;
}

.job-production-row:hover,
.job-production-row:focus-visible,
.quote-production-row:hover,
.quote-production-row:focus-visible {
  background: #f7fbff;
  border-color: #83b8e4;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .08);
}

.job-production-row.status-office_queue {
  border-left-color: #b9c3cc;
}

.job-production-row > div,
.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 7px 10px;
}

.job-production-number strong,
.quote-number-cell strong {
  color: #061525;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.job-production-project strong,
.quote-project-cell strong {
  color: #061525;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: 0;
}

.job-production-project b,
.quote-project-cell b {
  margin-top: 2px;
  color: #132334;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.job-production-project span,
.quote-project-cell span,
.quote-number-cell span,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small {
  margin-top: 2px;
  color: #607484;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: 0;
}

.job-production-date strong,
.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong,
.job-production-tech strong,
.job-production-hours strong {
  color: #061525;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.job-production-date small {
  color: #607484;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.12;
}

.job-production-date small.warning-text {
  color: #b50000 !important;
}

.job-production-date em {
  color: #061525;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.1;
}

.job-production-tech strong {
  white-space: normal;
}

.job-production-row .compact-select,
.quote-production-row .compact-select,
.quote-status-select {
  min-height: 30px;
  border-color: #b8c8d6;
  background: #fff;
  color: #061525;
  font-size: 10.5px;
  font-weight: 850;
}

.job-production-docs.fab-docs {
  gap: 4px;
}

.customers-workspace .system-record-table tbody td {
  color: #132334;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 650;
}

.customers-workspace .system-record-table tbody strong {
  color: #061525;
  font-size: 14px;
  font-weight: 850;
}

/* Unified record typography and density
   This is the final source of truth for list rows after the iterative UI passes above. */
:root {
  --emp-font: "Arial", "Segoe UI", sans-serif;
  --emp-ink: #061525;
  --emp-body: #102335;
  --emp-muted: #4c6072;
  --emp-line: #b9ccdc;
  --emp-row: #ffffff;
  --emp-row-alt: #f7fafc;
  --emp-row-hover: #eef7ff;
  --emp-control: #ffffff;
  --emp-blue: #087de8;
}

body,
button,
input,
select,
textarea {
  font-family: var(--emp-font);
  letter-spacing: 0;
}

button,
input,
select,
textarea,
.compact-select,
.text-button,
.primary,
.secondary {
  color: var(--emp-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

input,
select,
textarea,
.compact-select {
  min-height: 32px;
  border-color: #aebfce;
  background-color: var(--emp-control);
  text-transform: uppercase;
}

input::placeholder,
textarea::placeholder {
  color: #697c8d;
  text-transform: uppercase;
}

.page-heading p,
.workspace-toolbar-title span,
.surface .section-head span,
.workspace-record-count span,
.data-table thead th,
.system-record-table thead th,
.materials-db-table thead th,
.job-production-header,
.quote-production-header {
  color: #12324b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-heading h1,
.workspace-toolbar-title strong,
.surface .section-head h2 {
  color: var(--emp-ink);
  font-weight: 850;
  letter-spacing: 0;
}

.department-schedules button,
.queue-filters button,
.job-layout-toggle button {
  min-height: 34px;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.job-production-list,
.quote-production-list {
  gap: 5px;
  padding: 5px;
  background: #eef4f8;
}

.job-production-header,
.quote-production-header,
.data-table thead th,
.system-record-table thead th,
.materials-db-table thead th {
  border-bottom: 1px solid #9db8cc;
  background: #e9f2f8 !important;
  color: #12324b !important;
}

.job-production-row,
.quote-production-row {
  min-height: 54px;
  border: 1px solid var(--emp-line);
  border-left: 9px solid color-mix(in srgb, var(--job-status-color, var(--department-accent, var(--emp-blue))) 88%, #000 12%);
  border-radius: 6px;
  background: var(--emp-row);
  box-shadow: 0 1px 2px rgba(8, 31, 51, .045);
  color: var(--emp-body);
  font-family: var(--emp-font);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-row {
  grid-template-columns: 108px minmax(470px, 1fr) 116px 148px 76px minmax(138px, 168px) 48px;
}

.quote-production-row {
  grid-template-columns: 132px minmax(410px, 1fr) 120px 150px 118px 130px;
}

.job-production-row:nth-child(even),
.quote-production-row:nth-child(even) {
  background: var(--emp-row-alt);
}

.job-production-row:hover,
.job-production-row:focus-visible,
.quote-production-row:hover,
.quote-production-row:focus-visible {
  border-color: #83b8e4;
  background: var(--emp-row-hover);
  box-shadow: 0 2px 6px rgba(8, 31, 51, .075);
  outline: none;
}

.job-production-row.is-late {
  border-left-color: color-mix(in srgb, var(--job-status-color, #d20a0a) 88%, #000 12%);
}

.job-production-row.status-office_queue {
  border-left-color: #bfc7ce;
}

.job-production-row > div,
.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 6px 9px;
}

.job-production-number strong,
.quote-number-cell strong,
.home-job-row > strong,
.home-task-row > strong,
.home-queue-row > strong {
  color: var(--emp-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.job-production-project strong,
.quote-project-cell strong,
.home-job-row b,
.home-task-row b,
.delivery-job strong,
.delivery-destination strong,
.system-record-table tbody strong,
.materials-db-table .material-name strong {
  color: var(--emp-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-project b,
.quote-project-cell b {
  display: block;
  margin-top: 1px;
  color: var(--emp-ink);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-project span,
.quote-project-cell span,
.home-job-row small,
.home-task-row small,
.delivery-job span,
.delivery-destination span,
.system-record-table tbody small,
.materials-db-table small,
.materials-db-table .material-spec {
  display: block;
  margin-top: 1px;
  color: var(--emp-body);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-date strong,
.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong,
.job-production-hours strong,
.job-production-tech strong,
.system-record-table tbody td,
.materials-db-table tbody td {
  color: var(--emp-ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
}

.job-production-date small,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small,
.job-production-date em {
  color: var(--emp-muted);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-production-date small.warning-text,
.job-production-row.is-late .job-production-date small {
  color: #b00000 !important;
}

.job-production-status select,
.quote-status-cell select,
.delivery-status-select,
.fab-status,
.quote-status-select {
  min-height: 31px;
  color: var(--emp-ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.job-production-docs,
.quote-pdf-cell {
  gap: 4px;
}

.job-production-tech,
.job-production-tech strong,
.job-production-tech span {
  color: var(--emp-ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: normal;
}

.job-production-hours {
  color: var(--emp-ink);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.stored-pdf-link,
.record-file-state,
.job-doc-icon,
.quote-pdf-cell button {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.system-record-table,
.materials-db-table {
  border-collapse: separate;
  border-spacing: 0 5px;
  color: var(--emp-ink);
  font-family: var(--emp-font);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.system-record-table tbody tr,
.materials-db-table tbody tr,
.delivery-queue-row,
.record-list > button {
  min-height: 48px;
  border: 1px solid var(--emp-line);
  border-left: 7px solid var(--emp-blue);
  border-radius: 6px;
  background: var(--emp-row);
  color: var(--emp-ink);
  box-shadow: 0 1px 2px rgba(8, 31, 51, .04);
  text-transform: uppercase;
}

.system-record-table tbody tr:nth-child(even),
.materials-db-table tbody tr:nth-child(even),
.delivery-queue-row:nth-child(even),
.record-list > button:nth-child(even) {
  background: var(--emp-row-alt);
}

.system-record-table tbody tr:hover td,
.materials-db-table tbody tr:hover td,
.delivery-queue-row:hover,
.record-list > button:hover {
  background: var(--emp-row-hover) !important;
}

.system-record-table tbody td,
.materials-db-table tbody td {
  border-color: #dce7ef;
  padding: 7px 9px;
  line-height: 1.2;
}

.home-job-row,
.home-task-row,
.home-queue-row {
  min-height: 46px;
  color: var(--emp-ink);
  font-family: var(--emp-font);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-job-row b,
.home-task-row b,
.home-queue-row b {
  color: var(--emp-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-job-row small,
.home-task-row small,
.home-queue-row small {
  color: var(--emp-body);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  .job-production-row,
  .quote-production-row {
    min-height: 56px;
  }
}

/* Readability correction
   Restore the dashboard-like type balance after the broad typography pass above. */
body {
  color: #0f172a;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
}

button,
h1,
h2,
h3,
h4,
.brand,
.user-block,
.page-heading,
.workspace-toolbar-title,
.department-schedules,
.queue-filters,
.job-layout-toggle {
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

input,
select,
textarea,
.compact-select,
.line-input,
.form-dialog input,
.form-dialog select,
.form-dialog textarea {
  color: #0f172a;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

button,
.text-button,
.primary,
.secondary {
  font-weight: 750;
}

.sidebar {
  background: #f2f6fa;
  color: #132235;
}

.sidebar nav button {
  color: #172334;
  font-size: 13px;
  font-weight: 800;
}

.sidebar nav button:hover {
  background: #e2f0ff;
  color: #064f9e;
}

.sidebar nav button.active {
  background: var(--empire-blue);
  color: #fff;
}

.sidebar .user-block {
  background: #f2f6fa;
}

.job-production-row,
.quote-production-row {
  color: #071727;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
}

.job-production-row:nth-child(even),
.quote-production-row:nth-child(even) {
  background: #f8fbfe;
}

.job-production-row > div,
.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 5px 9px;
}

.job-production-number strong,
.quote-number-cell strong {
  color: #061525;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.job-production-project strong,
.quote-project-cell strong,
.home-job-row b,
.home-task-row b,
.home-queue-row b,
.delivery-job strong,
.delivery-destination strong,
.materials-db-table .material-name strong,
.system-record-table tbody strong {
  color: #061525;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.05;
}

.job-production-project b,
.quote-project-cell b {
  color: #061525;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.08;
}

.job-production-project span,
.quote-project-cell span,
.home-job-row small,
.home-task-row small,
.home-queue-row small,
.delivery-job span,
.delivery-destination span,
.materials-db-table small,
.materials-db-table .material-spec,
.system-record-table tbody small {
  color: #263a4d;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.job-production-date strong,
.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong,
.job-production-hours strong {
  color: #061525;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.08;
}

.job-production-date small,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small,
.job-production-date em {
  color: #334b62;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.1;
}

.job-production-row.is-late .job-production-date small,
.job-production-date small.warning-text {
  color: #b00000 !important;
  font-weight: 800;
}

.job-production-status select,
.quote-status-cell select,
.delivery-status-select,
.fab-status,
.quote-status-select {
  color: #061525;
  font-size: 11px;
  font-weight: 750;
}

.job-production-tech,
.job-production-tech strong,
.job-production-tech span {
  color: #061525;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.18;
}

.job-production-hours {
  color: #061525;
  font-size: 11px;
  font-weight: 800;
}

.stored-pdf-link,
.record-file-state,
.job-doc-icon,
.quote-pdf-cell button {
  font-size: 9px;
  font-weight: 750;
}

.system-record-table,
.materials-db-table {
  color: #071727;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.system-record-table tbody td,
.materials-db-table tbody td {
  color: #071727;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.home-job-row,
.home-task-row,
.home-queue-row {
  color: #061525;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
}

/* Legibility pass
   Final system layer: dashboard-style type balance across every record list. */
:root {
  --emp-readable-font: "Open Sans", "Segoe UI", Arial, sans-serif;
  --emp-readable-display: "Poppins", "Segoe UI", Arial, sans-serif;
  --emp-readable-ink: #061525;
  --emp-readable-muted: #31485d;
  --emp-readable-soft: #f8fbfe;
  --emp-readable-line: #bfd1e0;
}

html,
body {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-font);
  font-weight: 400;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

input,
select,
textarea,
button,
.compact-select,
.line-input {
  font-family: var(--emp-readable-font);
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
.page-heading,
.workspace-toolbar-title,
.panel-title,
.section-title,
.brand {
  font-family: var(--emp-readable-display);
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar {
  background: #e7eff7;
  border-right: 1px solid #b9cad9;
  color: #0f2235;
}

.sidebar nav button {
  color: #13283b;
  font-family: var(--emp-readable-display);
  font-size: 13px;
  font-weight: 700;
  opacity: 1;
}

.sidebar nav button svg,
.sidebar nav button i {
  color: inherit;
  opacity: 1;
  stroke-width: 2.1;
}

.sidebar nav button:hover {
  background: #d8ebff;
  color: #075fb7;
}

.sidebar nav button.active {
  background: var(--empire-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 118, 224, .22);
}

.sidebar .user-block {
  background: #e7eff7;
  color: #10263a;
}

.job-production-row,
.quote-production-row,
.home-job-row,
.home-task-row,
.home-queue-row {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-font) !important;
  font-size: 10.75px;
  font-weight: 500 !important;
  letter-spacing: 0;
  line-height: 1.18;
  text-transform: uppercase;
}

.job-production-row,
.quote-production-row {
  min-height: 54px;
  background: #fff;
  border-color: var(--emp-readable-line);
  box-shadow: 0 1px 3px rgba(8, 31, 51, .07);
}

.job-production-row:nth-child(even),
.quote-production-row:nth-child(even) {
  background: var(--emp-readable-soft);
}

.job-production-row:hover,
.job-production-row:focus-visible,
.quote-production-row:hover,
.quote-production-row:focus-visible {
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px #89bdf3, 0 2px 6px rgba(8, 31, 51, .1);
  transform: none;
}

.job-production-row > div,
.quote-number-cell,
.quote-project-cell,
.quote-date-cell,
.quote-status-cell,
.quote-pdf-cell,
.quote-total-cell,
.quote-result-cell,
.quote-action-cell {
  padding: 5px 9px;
}

.job-production-number strong,
.quote-number-cell strong,
.home-job-row > b:first-child,
.home-task-row > b:first-child,
.home-queue-row > b:first-child {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-display);
  font-size: 15px;
  font-weight: 800 !important;
  line-height: 1;
}

.job-production-project strong,
.quote-project-cell strong,
.home-job-row b,
.home-task-row b,
.home-queue-row b,
.delivery-job strong,
.delivery-destination strong,
.materials-db-table .material-name strong,
.system-record-table tbody strong {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-display);
  font-size: 13.5px;
  font-weight: 800 !important;
  line-height: 1.05;
}

.job-production-project b,
.quote-project-cell b {
  color: #071727;
  font-size: 10.25px;
  font-weight: 700 !important;
  line-height: 1.08;
}

.job-production-project span,
.quote-project-cell span,
.home-job-row small,
.home-task-row small,
.home-queue-row small,
.delivery-job span,
.delivery-destination span,
.materials-db-table small,
.materials-db-table .material-spec,
.system-record-table tbody small {
  color: var(--emp-readable-muted);
  font-size: 10px;
  font-weight: 500 !important;
  line-height: 1.22;
}

.job-production-date strong,
.quote-date-cell strong,
.quote-total-cell strong,
.quote-result-cell strong,
.job-production-hours strong {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-display);
  font-size: 11.75px;
  font-weight: 800 !important;
  line-height: 1.05;
}

.job-production-date small,
.job-production-date em,
.quote-date-cell small,
.quote-total-cell small,
.quote-result-cell small {
  color: var(--emp-readable-muted);
  font-size: 9.5px;
  font-weight: 550 !important;
  line-height: 1.12;
}

.job-production-row.is-late .job-production-date small,
.job-production-date small.warning-text {
  color: #b00000 !important;
  font-weight: 800 !important;
}

.job-production-status select,
.quote-status-cell select,
.delivery-status-select,
.fab-status,
.quote-status-select {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-display);
  font-size: 11px;
  font-weight: 700 !important;
}

.job-production-tech,
.job-production-tech strong,
.job-production-tech span,
.job-production-hours {
  color: var(--emp-readable-ink);
  font-size: 11px;
  font-weight: 700 !important;
  line-height: 1.18;
}

.stored-pdf-link,
.record-file-state,
.job-doc-icon,
.quote-pdf-cell button {
  font-size: 9px;
  font-weight: 700 !important;
}

.system-record-table,
.materials-db-table {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-font) !important;
  font-size: 11px;
  font-weight: 500 !important;
  text-transform: uppercase;
}

.system-record-table tbody tr,
.materials-db-table tbody tr,
.delivery-queue-row,
.record-list > button {
  background: #fff;
  border-color: var(--emp-readable-line);
  box-shadow: 0 1px 2px rgba(8, 31, 51, .05);
}

.system-record-table tbody tr:nth-child(even),
.materials-db-table tbody tr:nth-child(even),
.delivery-queue-row:nth-child(even),
.record-list > button:nth-child(even) {
  background: var(--emp-readable-soft);
}

.system-record-table tbody td,
.materials-db-table tbody td {
  color: var(--emp-readable-ink);
  font-size: 11px;
  font-weight: 500 !important;
  line-height: 1.2;
  padding: 7px 9px;
}

.customers-workspace .system-record-table tbody strong {
  font-size: 13.5px;
}

/* Rail and button correction
   Hover should not change the status/dept rail, and primary buttons stay white on blue. */
.job-production-row,
.quote-production-row {
  --record-rail-color: color-mix(in srgb, var(--job-status-color, var(--department-accent, var(--empire-blue))) 88%, #000 12%);
  border-left-color: var(--record-rail-color) !important;
}

.job-production-row.status-office_queue {
  --record-rail-color: #bfc7ce;
}

.job-production-row:hover,
.job-production-row:focus-visible,
.quote-production-row:hover,
.quote-production-row:focus-visible {
  border-top-color: var(--emp-readable-line) !important;
  border-right-color: var(--emp-readable-line) !important;
  border-bottom-color: var(--emp-readable-line) !important;
  border-left-color: var(--record-rail-color) !important;
}

.job-production-row.is-late,
.job-production-row.is-late:hover,
.job-production-row.is-late:focus-visible {
  border-left-color: var(--record-rail-color) !important;
}

.primary,
button.primary,
.app-action.primary,
.form-dialog .primary,
.document-preview-toolbar .primary {
  color: #fff !important;
}

.primary:hover,
.primary:focus-visible,
button.primary:hover,
button.primary:focus-visible {
  color: #fff !important;
}

/* Spreadsheet color rows restored
   Jobs need full status color at a glance, not just a narrow rail. */
.job-production-row {
  --row-fill: var(--job-status-color, #fff);
  --row-ink: var(--emp-readable-ink);
  --row-muted: #10263a;
  --record-rail-color: color-mix(in srgb, var(--row-fill) 88%, #000 12%);
  background: var(--row-fill) !important;
  color: var(--row-ink) !important;
  border-left-color: var(--record-rail-color) !important;
}

.job-production-row:nth-child(even),
.job-production-row:hover,
.job-production-row:focus-visible {
  background: var(--row-fill) !important;
  border-top-color: var(--emp-readable-line) !important;
  border-right-color: var(--emp-readable-line) !important;
  border-bottom-color: var(--emp-readable-line) !important;
  border-left-color: var(--record-rail-color) !important;
}

.job-production-row.status-office_queue {
  --row-fill: #fff;
  --record-rail-color: #c3cbd2;
}

.job-production-row.status-on_hold {
  --row-fill: #d30000;
  --record-rail-color: #a80000;
  --row-ink: #fff;
  --row-muted: rgba(255, 255, 255, .88);
}

.job-production-row.status-awaiting_po,
.job-production-row.status-qc_review {
  --row-fill: #3b94b8;
  --record-rail-color: #216f8d;
}

.job-production-row.status-plasma {
  --row-fill: #8ea0c7;
  --record-rail-color: #62769f;
}

.job-production-row.status-shop_queue {
  --row-fill: #c9c9c9;
  --record-rail-color: #9b9b9b;
}

.job-production-row.status-assembly {
  --row-fill: #ffff5a;
  --record-rail-color: #d6d62d;
}

.job-production-row.status-mat_incoming {
  --row-fill: #ffd18a;
  --record-rail-color: #c98f35;
}

.job-production-row.status-paint {
  --row-fill: #00d2fc;
  --record-rail-color: #0097b8;
}

.job-production-row.status-complete,
.job-production-row.status-completed,
.job-production-row.status-shipped {
  --row-fill: #58f563;
  --record-rail-color: #18a226;
}

.job-production-row .job-production-number strong,
.job-production-row .job-production-project strong,
.job-production-row .job-production-project b,
.job-production-row .job-production-date strong,
.job-production-row .job-production-date em,
.job-production-row .job-production-tech,
.job-production-row .job-production-tech strong,
.job-production-row .job-production-hours strong {
  color: var(--row-ink) !important;
}

.job-production-row .job-production-project span,
.job-production-row .job-production-date small {
  color: var(--row-muted) !important;
}

.job-production-row.is-late .job-production-date small,
.job-production-row .job-production-date small.warning-text {
  color: #b00000 !important;
}

.job-production-row.status-on_hold.is-late .job-production-date small,
.job-production-row.status-on_hold .job-production-date small.warning-text {
  color: #fff !important;
}

.job-production-row .compact-select,
.job-production-row .fab-status,
.job-production-row .stored-pdf-link,
.job-production-row .job-doc-icon {
  color: #061525 !important;
}

/* Unified spreadsheet legibility system
   Keep the restored full-color rows, but make records read with the same
   compact, crisp rhythm across the app. */
:root {
  --empire-data-font: Arial, "Roboto", sans-serif;
  --empire-data-ink: #061525;
  --empire-data-muted: #18334c;
  --empire-data-line: rgba(74, 103, 126, 0.34);
  --empire-row-shadow: 0 1px 2px rgba(15, 35, 52, 0.08);
}

html,
body,
button,
input,
select,
textarea {
  letter-spacing: 0 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: auto;
  font-kerning: normal;
}

body,
.app-shell,
.page-shell,
.workbench-shell {
  font-family: var(--empire-data-font) !important;
}

.btn-primary,
.primary-button,
.app-primary-button,
.global-action.primary,
.topbar-actions .primary-button,
button.primary,
button[class*="primary"],
.button-primary {
  color: #fff !important;
  text-shadow: none !important;
}

.side-nav,
.side-nav button,
.side-nav a,
.app-nav,
.app-nav button {
  color: #102236 !important;
  font-weight: 700 !important;
}

.job-production-row,
.home-job-row,
.quote-record,
.quote-row,
.customer-record,
.customer-directory-row,
.material-row,
.material-record,
.record-row,
.record-list-row,
.record-table tbody tr,
.production-list-row {
  font-family: var(--empire-data-font) !important;
  text-transform: uppercase;
  letter-spacing: 0 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: auto;
  font-size: 11px !important;
  line-height: 1.06 !important;
}

.job-production-row {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(16, 37, 56, 0.28) !important;
  box-shadow: var(--empire-row-shadow) !important;
  overflow: hidden !important;
}

.job-production-row > *,
.job-production-row .job-production-number,
.job-production-row .job-production-project,
.job-production-row .job-production-date,
.job-production-row .job-production-status,
.job-production-row .job-production-docs,
.job-production-row .job-production-tech,
.job-production-row .job-production-hours {
  min-height: 0 !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  align-items: center !important;
}

.job-production-row .job-production-number strong,
.job-production-row .job-production-project strong,
.home-job-row .home-job-number,
.home-job-row strong,
.quote-record strong,
.customer-record strong,
.material-record strong,
.record-row strong,
.record-list-row strong {
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.03 !important;
  letter-spacing: 0 !important;
}

.job-production-row .job-production-project span,
.job-production-row .job-production-project small,
.home-job-row small,
.quote-record small,
.customer-record small,
.material-record small,
.record-row small,
.record-list-row small {
  font-size: 9.5px !important;
  font-weight: 650 !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

.job-production-row .job-production-date strong,
.job-production-row .job-production-date em,
.job-production-row .job-production-tech,
.job-production-row .job-production-hours strong {
  font-size: 10.5px !important;
  font-weight: 800 !important;
  line-height: 1.02 !important;
}

.job-production-row .job-production-date small {
  font-size: 8.75px !important;
  font-weight: 800 !important;
  line-height: 1.02 !important;
}

.job-production-row .compact-select,
.job-production-row .fab-status,
.job-production-row select,
.record-row select,
.quote-record select {
  height: 24px !important;
  min-height: 24px !important;
  padding: 1px 8px !important;
  border-radius: 2px !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

.job-production-row .job-doc-icon,
.job-production-row .doc-status-icon,
.job-production-row .stored-pdf-link {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 3px !important;
  font-size: 8px !important;
  line-height: 1 !important;
}

.job-production-row:hover,
.job-production-row:hover *,
.home-job-row:hover,
.quote-record:hover,
.customer-record:hover,
.material-record:hover,
.record-row:hover {
  text-shadow: none !important;
  filter: none !important;
}

.job-production-row:hover {
  transform: none !important;
}

.job-production-row.status-on_hold,
.job-production-row.status-on_hold * {
  color: #fff !important;
}

.job-production-row.status-on_hold .compact-select,
.job-production-row.status-on_hold .fab-status,
.job-production-row.status-on_hold select,
.job-production-row.status-on_hold .job-doc-icon,
.job-production-row.status-on_hold .stored-pdf-link {
  color: #061525 !important;
}

.job-production-row.status-plasma,
.job-production-row.status-qc_review,
.job-production-row.status-shop_queue,
.job-production-row.status-assembly,
.job-production-row.status-material_incoming,
.job-production-row.status-mat_incoming,
.job-production-row.status-os_cutting,
.job-production-row.status-saw_cutting,
.job-production-row.status-laser,
.job-production-row.status-paint,
.job-production-row.status-complete,
.job-production-row.status-completed,
.job-production-row.status-shipped {
  color: #061525 !important;
}

.record-table thead th,
.customer-directory thead th,
.materials-page thead th,
.quotes-page thead th,
.jobs-page thead th {
  background: #eaf4fb !important;
  color: #0b2742 !important;
  font-family: var(--empire-data-font) !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.record-table tbody td,
.customer-directory tbody td,
.materials-page tbody td,
.quotes-page tbody td {
  font-family: var(--empire-data-font) !important;
  color: var(--empire-data-ink) !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.home-job-row {
  min-height: 36px !important;
  padding: 5px 9px !important;
  border-radius: 4px !important;
  box-shadow: var(--empire-row-shadow) !important;
}

.home-job-row .status-pill,
.quote-record .status-pill,
.record-row .status-pill {
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 8px !important;
  border-radius: 3px !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

/* Spreadsheet-like production row scale */
.fab-table {
  border-spacing: 0 6px !important;
}

.fab-table .fab-job-row td {
  height: 66px !important;
  padding: 7px 10px !important;
  vertical-align: middle;
}

.fab-row-customer {
  font-size: 15px;
  line-height: 1.12;
}

.fab-row-reference,
.fab-row-description {
  overflow: hidden;
  line-height: 1.2;
  white-space: normal;
}

.fab-row-reference {
  display: -webkit-box !important;
  margin-top: 3px;
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.fab-row-description {
  display: -webkit-box !important;
  margin-top: 3px !important;
  font-size: 11px !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.job-production-list {
  gap: 5px;
}

.job-production-row {
  min-height: 64px !important;
  height: 64px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.job-production-row .job-production-number strong,
.job-production-row .job-production-project strong,
.job-production-row .job-production-project span,
.job-production-row .job-production-project b {
  line-height: 1.14 !important;
}

.job-production-row .job-production-number strong,
.job-production-row .job-production-project strong {
  font-size: 14px !important;
}

.job-production-row .job-production-project b {
  font-size: 11.5px !important;
  font-weight: 800 !important;
}

.job-production-row .job-production-project span {
  font-size: 11px !important;
  font-weight: 650 !important;
}

.job-production-row .job-production-date strong,
.job-production-row .job-production-date em,
.job-production-row .job-production-tech,
.job-production-row .job-production-tech strong,
.job-production-row .job-production-hours strong {
  font-size: 12px !important;
}

/* Cross-workspace typography normalization.
   These named components previously carried their own one-off mini type scales. */
.home-command-greeting p,
.home-command-greeting span,
.home-command-tile span,
.home-command-tile small,
.home-task-row small,
.home-task-row em,
.home-queue-row small,
.home-job-row small,
.home-department-load-row small,
.home-department-load-row span,
.delivery-job span,
.delivery-destination span,
.delivery-date span,
.delivery-job small,
.delivery-destination small,
.quote-detail,
.quote-description,
.quote-terms,
.quote-doc-chip span,
.record-file-state,
.detail-list span,
.summary-ledger span,
.pilot-checklist span {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
  line-height: 1.28 !important;
}

.home-command-greeting h2,
.home-command-tile strong,
.home-priority-job strong,
.home-task-row > strong,
.home-task-row b,
.home-queue-row > strong,
.home-queue-row b,
.home-job-row > strong,
.home-job-row b,
.home-department-load-row strong,
.delivery-job strong,
.delivery-destination strong,
.delivery-date strong,
.quote-job-style-title,
.quote-document-card h3,
.quote-entity-card h3,
.quote-doc-chip b,
.detail-list strong,
.summary-ledger strong,
.pilot-checklist strong {
  color: var(--emp-readable-ink) !important;
  font-family: var(--emp-readable-display) !important;
  font-size: 13px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.15 !important;
}

.home-command-greeting h2 {
  font-size: 18px !important;
}

.home-command-tile span,
.home-command-tile small,
.home-task-row small,
.home-queue-row small,
.home-job-row small,
.delivery-job small,
.delivery-destination small,
.quote-doc-chip span,
.record-file-state {
  text-transform: uppercase;
}

.home-metric span,
.home-metric small,
.metric span,
.job-summary-stat span,
.workspace-summary-strip span,
.workspace-record-count span,
.department-system-card dt,
.quote-command-hero dt,
.quote-entity-card dt,
.home-document-pressure span {
  color: var(--emp-type-muted) !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.15 !important;
  letter-spacing: 0;
}

.home-metric strong,
.metric strong,
.job-summary-stat strong,
.workspace-summary-strip strong,
.workspace-record-count strong,
.department-system-card dd,
.quote-command-hero dd,
.quote-entity-card dd {
  color: var(--emp-readable-ink) !important;
  font-family: var(--emp-readable-display) !important;
  font-weight: var(--emp-type-primary) !important;
}

.home-metric strong,
.metric strong,
.job-summary-stat strong {
  font-size: 18px !important;
  line-height: 1.05 !important;
}

.form-dialog .field > span,
.form-dialog .form-section-title,
.form-dialog .source-card > h3,
.document-preview-toolbar strong,
.job-document-collection-head strong,
.job-document-file span {
  color: var(--emp-readable-ink) !important;
  font-size: 13px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.2 !important;
}

.job-document-collection-head small,
.job-document-file em,
.form-dialog .field .help-text,
.form-dialog .field small,
.document-preview small {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
  line-height: 1.3 !important;
}

.form-dialog .field input,
.form-dialog .field select,
.form-dialog .field textarea,
.compact-select,
.delivery-status-select,
.fab-status,
.status-pill,
.badge,
.quote-department-badge,
.record-file-state,
.job-doc-icon,
.doc-status-icon,
.stored-pdf-link {
  font-weight: var(--emp-type-action) !important;
}

.compact-select,
.delivery-status-select,
.fab-status,
.status-pill,
.badge,
.quote-department-badge {
  font-size: 11px !important;
}

.job-production-row .job-doc-icon small,
.job-production-row .doc-status-icon small,
.job-production-row .stored-pdf-link small {
  font-size: 8px !important;
  line-height: 1 !important;
}

/* Dashboard header is a dark surface: never inherit page-body ink here. */
.home-command-hero {
  background:
    linear-gradient(105deg, rgba(20, 137, 239, .28), rgba(20, 137, 239, 0) 48%),
    linear-gradient(135deg, #061b30 0%, #0b2b48 62%, #061825 100%) !important;
}

.home-command-hero .home-command-greeting p {
  color: #8ed1ff !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
}

.home-command-hero .home-command-greeting h2 {
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.1 !important;
}

.home-command-hero .home-command-greeting span {
  color: #d6e7f5 !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
}

.home-command-hero .home-priority-job,
.home-command-hero .home-clear {
  border-color: #4a83ad !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #ffffff !important;
}

.home-command-hero .home-priority-job:hover {
  border-color: #8dcaff !important;
  background: rgba(255, 255, 255, .14) !important;
}

.home-command-hero .home-priority-job small {
  color: #91d2ff !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
}

.home-command-hero .home-priority-job strong,
.home-command-hero .home-clear strong {
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: var(--emp-type-primary) !important;
}

.home-command-hero .home-priority-job b,
.home-command-hero .home-clear span {
  color: #d6e7f5 !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
}

.home-command-hero .home-priority-job em {
  border-color: #79bfff !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
}

/* Unified operations workspace shell.
   Home is a dashboard; every other section uses this shared record-management frame. */
.workspace-page:not(.home-workspace) {
  --ops-line: #bfd3e4;
  --ops-soft: #f4f8fb;
  --ops-panel: #ffffff;
  --ops-blue: #0878e8;
  gap: 8px;
}

.workspace-page:not(.home-workspace) .workspace-toolbar,
.workspace-page:not(.home-workspace) .production-toolbar.workspace-toolbar,
.workspace-page:not(.home-workspace) .materials-workspace-toolbar {
  min-height: 56px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ops-line) !important;
  border-top: 3px solid var(--ops-blue) !important;
  border-radius: 7px !important;
  background: var(--ops-panel) !important;
  padding: 8px 12px !important;
  box-shadow: 0 2px 7px rgba(10, 39, 62, .07) !important;
}

.workspace-page:not(.home-workspace) .workspace-toolbar-title {
  min-width: 190px;
}

.workspace-page:not(.home-workspace) .workspace-toolbar-title strong,
.workspace-page:not(.home-workspace) .workspace-toolbar-title b {
  color: var(--emp-readable-ink) !important;
  font-size: 18px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.1 !important;
}

.workspace-page:not(.home-workspace) .workspace-toolbar-title span {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
  line-height: 1.25 !important;
}

.workspace-page:not(.home-workspace) .workspace-summary-strip,
.workspace-page:not(.home-workspace) .workspace-record-count {
  border-color: var(--ops-line) !important;
  background: var(--ops-soft) !important;
}

.workspace-page:not(.home-workspace) .workspace-summary-strip > span {
  min-height: 34px;
  color: var(--emp-type-muted) !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-action) !important;
}

.workspace-page:not(.home-workspace) .workspace-summary-strip strong,
.workspace-page:not(.home-workspace) .workspace-record-count strong {
  color: var(--emp-readable-ink) !important;
  font-size: 16px !important;
  font-weight: var(--emp-type-primary) !important;
}

.workspace-page:not(.home-workspace) .workspace-surface,
.workspace-page:not(.home-workspace) .surface:not(.fab-sheet) {
  border: 1px solid var(--ops-line) !important;
  border-radius: 7px !important;
  background: var(--ops-panel) !important;
  box-shadow: 0 2px 7px rgba(10, 39, 62, .06) !important;
}

.workspace-page:not(.home-workspace) .section-head,
.workspace-page:not(.home-workspace) .workspace-surface .section-head {
  min-height: 46px;
  align-items: center;
  border-bottom: 1px solid var(--ops-line) !important;
  background: #f8fbfd !important;
  padding: 8px 12px !important;
}

.workspace-page:not(.home-workspace) .section-head h2,
.workspace-page:not(.home-workspace) .workspace-surface > h3 {
  color: var(--emp-readable-ink) !important;
  font-size: 16px !important;
  font-weight: var(--emp-type-primary) !important;
}

.workspace-page:not(.home-workspace) .section-head p {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
}

.workspace-page:not(.home-workspace) .department-schedules,
.workspace-page:not(.home-workspace) .production-filter-group,
.workspace-page:not(.home-workspace) .job-layout-toggle,
.workspace-page:not(.home-workspace) .materials-controls,
.workspace-page:not(.home-workspace) .customer-list-actions,
.workspace-page:not(.home-workspace) .queue-filters {
  border-color: var(--ops-line) !important;
  background: var(--ops-soft) !important;
  box-shadow: none !important;
}

.workspace-page:not(.home-workspace) .department-schedules button,
.workspace-page:not(.home-workspace) .production-filter-group button,
.workspace-page:not(.home-workspace) .job-layout-toggle button {
  color: #24445e !important;
  font-size: 12px !important;
  font-weight: var(--emp-type-action) !important;
}

.workspace-page:not(.home-workspace) .department-schedules button.active,
.workspace-page:not(.home-workspace) .production-filter-group button.active,
.workspace-page:not(.home-workspace) .job-layout-toggle button.active {
  background: var(--ops-blue) !important;
  border-color: var(--ops-blue) !important;
  color: #ffffff !important;
}

.workspace-page:not(.home-workspace) .materials-controls label,
.workspace-page:not(.home-workspace) .customer-list-actions label,
.workspace-page:not(.home-workspace) .job-sort-control {
  color: #294a64 !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
}

.workspace-page:not(.home-workspace) .materials-controls select,
.workspace-page:not(.home-workspace) .customer-list-actions select,
.workspace-page:not(.home-workspace) .job-sort-control select,
.workspace-page:not(.home-workspace) .compact-select,
.workspace-page:not(.home-workspace) .delivery-status-select {
  border-color: #a9c1d4 !important;
  background: #ffffff !important;
  color: #16344d !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-action) !important;
}

/* Every record list uses the same quiet, high-contrast sheet. */
.quote-production-row,
.system-record-table tbody tr,
.materials-db-table tbody tr,
.delivery-queue-row,
.record-list > button {
  border-color: var(--ops-line, var(--emp-readable-line)) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(10, 39, 62, .05) !important;
}

.quote-production-row:nth-child(even),
.system-record-table tbody tr:nth-child(even),
.materials-db-table tbody tr:nth-child(even),
.delivery-queue-row:nth-child(even),
.record-list > button:nth-child(even) {
  background: #f8fbfd !important;
}

.quote-production-row,
.system-record-table tbody td,
.materials-db-table tbody td,
.delivery-queue-row,
.record-list > button {
  min-height: 64px !important;
  color: var(--emp-readable-ink) !important;
}

.quote-production-row:hover,
.system-record-table tbody tr:hover td,
.materials-db-table tbody tr:hover td,
.delivery-queue-row:hover,
.record-list > button:hover {
  background: #edf7ff !important;
}

.quote-production-row strong,
.system-record-table tbody strong,
.materials-db-table tbody strong,
.delivery-queue-row strong,
.record-list > button strong {
  color: var(--emp-readable-ink) !important;
  font-size: 13px !important;
  font-weight: var(--emp-type-primary) !important;
}

.quote-production-row small,
.quote-production-row span,
.system-record-table tbody small,
.materials-db-table tbody small,
.materials-db-table .material-spec,
.delivery-queue-row small,
.delivery-queue-row span,
.record-list > button small {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
}

.data-table thead th,
.system-record-table thead th,
.materials-db-table thead th {
  height: 32px !important;
  background: #eaf4fb !important;
  border-bottom-color: #a8c5dc !important;
  color: #1b425f !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
}

.materials-workspace .materials-summary-strip {
  border-color: var(--ops-line) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(10, 39, 62, .04) !important;
}

.materials-workspace .materials-summary-strip > span {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
}

.reports-workspace .metric,
.settings-workspace .surface {
  border-color: var(--ops-line) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 7px rgba(10, 39, 62, .06) !important;
}

/* Blue form-section bars always carry light text. */
.form-dialog .form-section-title,
.form-dialog .source-card > h3,
.form-dialog.reference-header-dialog .source-card > h3,
.form-dialog.reference-header-dialog .form-section-title,
.job-entry-reference-form .source-card > h3,
.work-order-reference-form .source-card > h3,
.material-reference-form .source-card > h3,
.material-count-reference-form .source-card > h3,
.invoice-reference-form .source-card > h3,
.purchase-reference-form .source-card > h3,
.material-quote-reference-form .source-card > h3 {
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.15 !important;
}

/* Department selector in dialog headers: a clear segmented control, not tiny tabs. */
.form-dialog .dialog-header-controls {
  justify-content: center;
}

.form-dialog .dialog-header-controls .job-entry-department > div {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(106px, 1fr));
  gap: 3px;
  border: 1px solid #a9c5da;
  border-radius: 7px;
  background: #edf5fb;
  padding: 3px;
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

.form-dialog .dialog-header-controls .job-entry-department label span {
  min-width: 0;
  min-height: 34px;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #24445e;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: var(--emp-type-action);
  line-height: 1;
  transition: background-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.form-dialog .dialog-header-controls .job-entry-department label:hover span {
  background: #dbeaf6;
  color: #075aa9;
}

.form-dialog .dialog-header-controls .job-entry-department label small {
  min-width: 18px;
  border-radius: 9px;
  background: #d5e4ef;
  color: #37576f;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: var(--emp-type-primary);
  line-height: 1;
  text-align: center;
}

.form-dialog .dialog-header-controls .job-entry-department input:checked + span {
  background: #0878e8;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 94, 190, .25);
}

.form-dialog .dialog-header-controls .job-entry-department input:checked + span small {
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.form-dialog .dialog-header-controls .job-entry-department input:focus-visible + span {
  outline: 2px solid #0b5fb1;
  outline-offset: 2px;
}

/* Delivery details are entered with the invoice and DEL/TX records, not Job Edit. */
.job-entry-reference-form .job-shipping-card {
  display: none !important;
}

.job-production-row .job-production-date small {
  font-size: 10px !important;
}

.job-production-row .compact-select,
.job-production-row .fab-status,
.job-production-row select {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 10.5px !important;
}

.job-production-row .job-doc-icon,
.job-production-row .doc-status-icon,
.job-production-row .stored-pdf-link {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  font-size: 9px !important;
}

/* Apply the approved production-row scale to every operational list. */
.quote-production-row,
.home-job-row {
  min-height: 64px !important;
  height: 64px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.system-record-table,
.materials-db-table {
  border-spacing: 0 5px !important;
}

.system-record-table tbody td,
.materials-db-table tbody td {
  height: 64px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 11px !important;
  line-height: 1.14 !important;
}

.quote-production-row .quote-number-cell strong,
.quote-production-row .quote-project-cell strong,
.system-record-table tbody strong,
.materials-db-table .material-name strong,
.home-job-row > strong,
.home-job-row b {
  font-size: 14px !important;
  line-height: 1.14 !important;
}

.quote-production-row .quote-project-cell b,
.quote-production-row .quote-total-cell strong,
.system-record-table tbody td,
.materials-db-table tbody td {
  font-weight: 700 !important;
}

.quote-production-row .quote-number-cell span,
.quote-production-row .quote-project-cell span,
.quote-production-row .quote-date-cell small,
.quote-production-row .quote-total-cell small,
.system-record-table tbody small,
.materials-db-table .material-name small,
.materials-db-table small,
.materials-db-table .material-spec,
.home-job-row small {
  font-size: 11px !important;
  line-height: 1.14 !important;
}

.quote-production-row .quote-date-cell strong,
.quote-production-row .quote-date-cell em,
.quote-production-row .quote-total-cell strong,
.home-job-row em,
.home-job-row .home-job-due b,
.system-record-table .text-button,
.materials-db-table .text-button {
  font-size: 12px !important;
  line-height: 1.14 !important;
}

.quote-production-row .compact-select,
.quote-production-row select,
.system-record-table .compact-select,
.system-record-table select,
.materials-db-table .compact-select,
.materials-db-table select {
  height: 28px !important;
  min-height: 28px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
}

.system-record-table .badge,
.materials-db-table .badge {
  min-height: 24px !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

/* Readable type system
   Shared operational hierarchy for dashboards, tables, forms, and dialogs. */
:root {
  --emp-type-primary: 800;
  --emp-type-action: 700;
  --emp-type-data: 600;
  --emp-type-support: 600;
  --emp-type-muted: #29445d;
}

.workspace-page,
.form-dialog,
.record-header,
.document-preview,
.search-results,
.toast,
.empty-state {
  color: var(--emp-readable-ink);
  font-family: var(--emp-readable-font);
}

.workspace-toolbar-title strong,
.workspace-toolbar-title b,
.section-head h2,
.workspace-surface > h3,
.record-header h1,
.form-dialog h2,
.document-preview h2 {
  font-family: var(--emp-readable-display);
  font-weight: var(--emp-type-primary) !important;
  letter-spacing: 0;
}

.workspace-toolbar-title span,
.section-head p,
.record-header p,
.workspace-summary-strip span,
.workspace-record-count span,
.empty-state p,
.form-dialog header p,
.document-preview header p {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
  line-height: 1.3 !important;
}

.workspace-toolbar-title strong,
.section-head h2,
.workspace-surface > h3 {
  font-size: 16px !important;
  line-height: 1.15 !important;
}

.workspace-summary-strip strong,
.workspace-record-count strong,
.metric strong,
.settings-list strong {
  color: var(--emp-readable-ink) !important;
  font-weight: var(--emp-type-primary) !important;
}

.data-table thead th,
.record-table thead th,
.customer-directory thead th,
.materials-page thead th,
.quotes-page thead th,
.jobs-page thead th {
  color: #173a59 !important;
  font-size: 10px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.15 !important;
}

.data-table tbody td,
.record-table tbody td,
.customer-directory tbody td,
.materials-page tbody td,
.quotes-page tbody td,
.jobs-page tbody td {
  color: var(--emp-readable-ink) !important;
  font-size: 12px !important;
  font-weight: var(--emp-type-data) !important;
  line-height: 1.25 !important;
}

.data-table tbody td small,
.record-table tbody td small,
.customer-directory tbody td small,
.materials-page tbody td small,
.quotes-page tbody td small,
.jobs-page tbody td small,
.delivery-queue-row small,
.settings-list span {
  color: var(--emp-type-muted) !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-support) !important;
  line-height: 1.28 !important;
}

.data-table tbody td strong,
.record-table tbody td strong,
.customer-directory tbody td strong,
.materials-page tbody td strong,
.quotes-page tbody td strong,
.jobs-page tbody td strong,
.delivery-queue-row strong,
.settings-list strong {
  color: var(--emp-readable-ink) !important;
  font-family: var(--emp-readable-display);
  font-size: 13px !important;
  font-weight: var(--emp-type-primary) !important;
  line-height: 1.12 !important;
}

.workspace-page label,
.form-dialog label,
.workspace-page .control-label,
.form-dialog .control-label,
.filter-label {
  color: #26455f !important;
  font-size: 11px !important;
  font-weight: var(--emp-type-action) !important;
  line-height: 1.2 !important;
}

.workspace-page input,
.workspace-page select,
.workspace-page textarea,
.form-dialog input,
.form-dialog select,
.form-dialog textarea,
.workspace-page button,
.form-dialog button,
.search-results button {
  font-size: 12px;
  font-weight: var(--emp-type-action);
}

.workspace-page input,
.workspace-page select,
.workspace-page textarea,
.form-dialog input,
.form-dialog select,
.form-dialog textarea {
  color: var(--emp-readable-ink) !important;
  line-height: 1.2;
}

.text-button,
.back-button,
.search-results button,
.row-actions .text-button {
  color: #075aa9 !important;
  font-weight: var(--emp-type-action) !important;
}

.danger-link,
.warning-text {
  font-weight: var(--emp-type-primary) !important;
}

/* Keep the established production-sheet balance tighter than generic tables. */
.job-production-row .job-production-number strong,
.job-production-row .job-production-project strong {
  font-size: 14px !important;
}

.job-production-row .job-production-project b,
.job-production-row .job-production-project span,
.job-production-row .job-production-date small {
  font-size: 11px !important;
}

.job-production-row .job-production-date strong,
.job-production-row .job-production-date em,
.job-production-row .job-production-tech,
.job-production-row .job-production-tech strong,
.job-production-row .job-production-hours strong {
  font-size: 12px !important;
}
/* Menu and form-dialog polish: quieter hierarchy, stronger document readability. */
.form-dialog .form-section-title,
.form-dialog .source-card > h3,
.form-dialog.reference-header-dialog .source-card > h3,
.form-dialog.reference-header-dialog .form-section-title {
  min-height: 36px !important;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #1687e9 0%, #0d70d6 100%) !important;
  padding: 0 13px !important;
  letter-spacing: .01em;
}

.form-dialog .dialog-header-controls .job-entry-department > div {
  gap: 2px;
  border-color: #c4d7e7;
  background: #f6f9fc;
  padding: 2px;
  box-shadow: none;
}

.form-dialog .dialog-header-controls .job-entry-department label span {
  min-height: 32px;
  color: #38556d;
  padding-inline: 10px;
}

.form-dialog .dialog-header-controls .job-entry-department label:hover span {
  background: #e8f2fa;
  color: #075aa9;
}

.form-dialog .dialog-header-controls .job-entry-department label small {
  background: #e3edf5;
  color: #4c6579;
}

.form-dialog .job-document-collection {
  background: #f8fbfe;
}

.form-dialog .job-document-collection-head small {
  color: #24516f !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
}

.form-dialog .job-document-collection-head strong {
  color: #102b42 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

.form-dialog .job-document-collection-head + .job-document-list,
.form-dialog .job-document-collection .job-document-list {
  color: #536d82;
  font-size: 12px;
  font-weight: 650;
}

.form-dialog .destructive[data-action="delete-job"] {
  min-height: 32px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #b42318 !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.form-dialog .destructive[data-action="delete-job"]:hover {
  background: #fff1f0 !important;
  color: #8f1d14 !important;
}

.form-dialog .destructive[data-action="delete-job"]:focus-visible {
  outline: 2px solid #d92d20;
  outline-offset: 2px;
}
/* Deliveries / Transfers dispatch board */
.delivery-command-workspace { gap: 9px; }
.delivery-command-toolbar .workspace-toolbar-title { min-width: 260px; }
.delivery-summary-strip { min-width: 280px; }
.delivery-summary-strip > span { flex: 1 1 0; justify-content: center; }
.delivery-command-surface { overflow: hidden; }
.delivery-command-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid #c7d7e5;
  background: #f8fbfe;
  padding: 8px 12px;
}
.delivery-view-toggle,
.delivery-filter-group {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #bfd3e4;
  border-radius: 6px;
  background: #ffffff;
}
.delivery-view-toggle button,
.delivery-filter-group button {
  min-height: 32px;
  border: 0;
  border-right: 1px solid #d3e1ec;
  background: transparent;
  color: #38556d;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
}
.delivery-view-toggle button:last-child,
.delivery-filter-group button:last-child { border-right: 0; }
.delivery-view-toggle button.active,
.delivery-filter-group button.active {
  background: #0878e8;
  color: #ffffff;
}
.delivery-view-toggle button:hover:not(.active),
.delivery-filter-group button:hover:not(.active) { background: #eaf4fb; color: #075aa9; }
.delivery-reset-button { margin-left: auto; }

.delivery-dispatch-list { padding: 8px; background: #eef3f7; }
.delivery-dispatch-head,
.delivery-dispatch-row {
  display: grid;
  grid-template-columns: 1.2fr 1.35fr .8fr .9fr .95fr auto;
  gap: 10px;
  align-items: center;
}
.delivery-dispatch-head {
  padding: 2px 11px 5px;
  color: #38566e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.delivery-dispatch-row {
  min-height: 76px;
  margin-top: 6px;
  border: 1px solid #c8d8e5;
  border-left: 5px solid #0878e8;
  border-radius: 7px;
  background: #ffffff;
  padding: 8px 10px;
  box-shadow: 0 1px 4px rgba(10, 39, 62, .05);
}
.delivery-dispatch-row.is-complete { border-left-color: #3e8a61; background: #fbfdfc; opacity: .78; }
.delivery-dispatch-row strong,
.delivery-dispatch-row b { color: #122b40; font-size: 12px; font-weight: 850; }
.delivery-dispatch-row span,
.delivery-dispatch-row small { display: block; color: #526f85; font-size: 10px; font-weight: 650; line-height: 1.25; }
.delivery-dispatch-job,
.delivery-dispatch-destination,
.delivery-dispatch-date,
.delivery-dispatch-assignment { min-width: 0; display: grid; gap: 2px; }
.delivery-dispatch-job .text-button { width: fit-content; padding: 0; font-size: 13px !important; }
.delivery-dispatch-destination strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-dispatch-status .delivery-status-select { min-width: 130px; }
.delivery-dispatch-actions { display: flex; justify-content: flex-end; gap: 6px; }
.delivery-dispatch-actions a,
.delivery-dispatch-actions button { min-height: 31px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
.delivery-empty { display: grid; gap: 4px; padding: 32px 18px; text-align: center; color: #49657a; }
.delivery-empty strong { color: #17324a; }

.delivery-day-board { display: grid; gap: 10px; padding: 10px; background: #eef3f7; }
.delivery-day-board-note {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c7d8e6;
  border-radius: 6px;
  background: #f8fbfe;
  padding: 8px 10px;
  color: #506d82;
  font-size: 11px;
  font-weight: 650;
}
.delivery-day-board-note strong { color: #0878e8; font-size: 17px; }
.delivery-day-card {
  overflow: hidden;
  border: 1px solid #c5d7e5;
  border-top: 4px solid #0878e8;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(10, 39, 62, .05);
}
.delivery-day-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid #d3e0e9;
  background: #f8fbfe;
}
.delivery-day-card header small { display: block; color: #506d82; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.delivery-day-card header h2 { margin: 2px 0; color: #132d43; font-size: 17px; line-height: 1.1; }
.delivery-day-card header span { color: #58758a; font-size: 11px; font-weight: 650; }
.delivery-day-actions { display: flex; gap: 7px; }
.delivery-day-actions a,
.delivery-day-actions button { min-height: 32px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
.delivery-driver-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 9px; padding: 9px; }
.delivery-driver-lane { overflow: hidden; border: 1px solid #d1dfe9; border-radius: 6px; background: #fbfdff; }
.delivery-driver-lane-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 9px; border-bottom: 1px solid #dce7ee; background: #edf6fc; }
.delivery-driver-lane-head strong { color: #17334a; font-size: 12px; font-weight: 850; }
.delivery-driver-lane-head span,
.delivery-driver-lane-head small { color: #4f6c81; font-size: 10px; font-weight: 700; }
.delivery-driver-lane-head small { grid-column: 1 / -1; }
.delivery-stop-list { display: grid; gap: 5px; padding: 6px; }
.delivery-stop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  width: 100%;
  border: 1px solid #d5e2eb;
  border-left: 3px solid #55a1db;
  border-radius: 4px;
  background: #ffffff;
  padding: 7px;
  text-align: left;
}
.delivery-stop:hover { border-color: #87bde5; background: #f4faff; }
.delivery-stop b { color: #0869c5; font-size: 11px; font-weight: 900; }
.delivery-stop strong { overflow: hidden; color: #17334a; font-size: 11px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.delivery-stop span { grid-column: 1 / 3; overflow: hidden; color: #557187; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.delivery-stop em { grid-column: 3; grid-row: 1 / 3; color: #3e6988; font-size: 9px; font-style: normal; font-weight: 800; text-align: right; }

@media (max-width: 1180px) {
  .delivery-command-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .delivery-dispatch-head { display: none; }
  .delivery-dispatch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-dispatch-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .delivery-command-controls { align-items: stretch; flex-wrap: wrap; }
  .delivery-reset-button { margin-left: 0; }
  .delivery-dispatch-row { grid-template-columns: 1fr; }
  .delivery-day-card > header { align-items: flex-start; flex-direction: column; }
}

/* Administrator-only pilot readiness */
.pilot-readiness-card {
  overflow: hidden;
  padding: 0 !important;
  border-top-color: #f59e0b !important;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.pilot-readiness-card.is-ready { border-top-color: #16875c !important; }

.pilot-readiness-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(120deg, #0a3556, #0b69ad);
}

.pilot-readiness-card > header small {
  display: block;
  margin-bottom: 3px;
  color: #8fd0ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.pilot-readiness-card > header h3 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 20px;
}

.pilot-readiness-card > header p {
  margin: 2px 0 0;
  color: #dceffd;
  font-size: 12px;
}

.pilot-readiness-score {
  min-width: 100px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, .28);
  text-align: right;
}

.pilot-readiness-score strong,
.pilot-readiness-score span { display: block; }
.pilot-readiness-score strong { font: 800 27px/1 Poppins, sans-serif; }
.pilot-readiness-score span { margin-top: 4px; color: #dceffd; font-size: 10px; font-weight: 800; }

.pilot-readiness-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  border-bottom: 1px solid #cbdce8;
  background: #edf6fc;
}

.pilot-readiness-status strong { color: #123b59; font-size: 13px; }
.pilot-readiness-status span { color: #567086; font-size: 10px; }

.pilot-readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px;
}

.pilot-readiness-check {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  min-height: 70px;
  padding: 9px;
  border: 1px solid #cbdce8;
  border-left: 4px solid #d39414;
  border-radius: 6px;
  background: #fff;
}

.pilot-readiness-check.is-ready { border-left-color: #16875c; }
.pilot-readiness-check > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #d39414;
  font-weight: 900;
}
.pilot-readiness-check.is-ready > span { background: #16875c; }
.pilot-readiness-check strong,
.pilot-readiness-check small,
.pilot-readiness-check em { display: block; }
.pilot-readiness-check strong { color: #112d43; font-size: 11px; }
.pilot-readiness-check small { margin-top: 2px; color: #526d82; font-size: 9px; line-height: 1.35; }
.pilot-readiness-check em { margin-top: 5px; color: #9a5b00; font-size: 9px; font-style: normal; font-weight: 800; }

.pilot-readiness-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 14px;
}
.pilot-readiness-card > footer span { margin-left: auto; color: #6b8091; font-size: 9px; }
.pilot-readiness-card > footer code { color: #234963; font-weight: 800; }

@media (max-width: 980px) {
  .pilot-readiness-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .pilot-readiness-card > header,
  .pilot-readiness-status,
  .pilot-readiness-card > footer { align-items: flex-start; flex-direction: column; }
  .pilot-readiness-score { padding: 0; border: 0; text-align: left; }
  .pilot-readiness-grid { grid-template-columns: 1fr; }
  .pilot-readiness-card > footer span { margin-left: 0; }
}
