/* Workflow ecosystem layer */
.workflow-tone-danger,
.workflow-tone-blocked {
  border-color: #f0b7b7;
  background: #fff1f1;
  color: #a51616;
}
.workflow-tone-schedule,
.workflow-tone-assignment,
.workflow-tone-materials {
  border-color: #f0d28a;
  background: #fff9e9;
  color: #7a5000;
}
.workflow-tone-complete,
.workflow-tone-quality {
  border-color: #a9d9b5;
  background: #effaf2;
  color: #17643d;
}
.workflow-tone-production,
.workflow-tone-documents,
.workflow-tone-ready {
  border-color: #b9d5ef;
  background: #eef6ff;
  color: #075ea8;
}
.fab-table thead th {
  border: 0;
  background: transparent;
  color: #102a43;
  padding-top: 11px;
  padding-bottom: 9px;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.job-command-center {
  display: grid;
  grid-template-columns: minmax(300px, .75fr) minmax(430px, 1.25fr) auto;
  gap: 10px;
  margin: 0 0 10px;
  border-color: #bfd0df;
  border-left: 4px solid var(--department-accent, #106eea);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  padding: 10px;
  box-shadow: 0 3px 10px rgba(15, 35, 52, .065);
}
.job-command-primary,
.job-command-system,
.job-command-blockers {
  min-width: 0;
}
.job-command-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 4px;
}
.job-command-copy { min-width: 0; }
.job-command-copy p {
  margin: 0;
  color: var(--department-accent, #106eea);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.job-command-copy h2 {
  overflow: hidden;
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-command-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}
.job-command-system,
.job-command-blockers {
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #d2e0eb;
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}
.job-command-system strong,
.job-command-blockers strong {
  color: #0f172a;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}
.job-document-chain {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(128px, 1.45fr) 1fr;
  gap: 6px;
}
.doc-chain-item {
  display: grid;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d5e2ed;
  border-radius: 7px;
  background: #f8fbff;
  color: #0f172a;
  padding: 6px 7px;
  text-align: left;
  text-decoration: none;
  appearance: none;
}
button.doc-chain-item {
  cursor: pointer;
}
button.doc-chain-item:hover {
  border-color: #75afe9;
  box-shadow: 0 3px 10px rgba(16, 110, 234, .12);
}
.doc-chain-item b {
  color: #0f172a;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
}
.doc-chain-item em {
  margin-top: 2px;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.doc-chain-current {
  border-color: #9bcdf3;
  background: #eaf6ff;
}
.doc-chain-current em { color: #075ea8; }
.doc-chain-stale {
  border-color: #f0b7b7;
  background: #fff1f1;
}
.doc-chain-stale em { color: #a51616; }
.doc-chain-draft {
  border-color: #f0d28a;
  background: #fff9e9;
}
.doc-chain-draft em { color: #7a5000; }
.doc-chain-missing {
  border-style: dashed;
  background: #f8fafc;
}
.doc-chain-missing em { color: #64748b; }
.job-command-blockers span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid #d5e2ed;
  border-radius: 5px;
  background: #f7fafc;
  color: #526b80;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
}
.job-command-center.workflow-tone-danger .job-command-blockers span,
.job-command-center.workflow-tone-blocked .job-command-blockers span {
  border-color: #efb5b5;
  background: #fff2f2;
  color: #9f1515;
}
@media (max-width: 1180px) {
  .job-command-center { grid-template-columns: 1fr; }
  .job-command-primary { padding: 2px; }
}
@media (max-width: 760px) {
  .job-document-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Compact staged job readiness */
.job-readiness {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-top: 1px solid #d5e2ed;
  padding: 8px 4px 0;
}
.job-readiness-heading {
  display: grid;
  gap: 2px;
}
.job-readiness-heading strong {
  color: #0f172a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.job-readiness-heading span {
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
}
.job-readiness-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.job-readiness-stage {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 7px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d5e2ed;
  border-radius: 7px;
  background: #f8fafc;
  padding: 6px 7px;
}
.job-readiness-stage > span {
  grid-row: 1 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e5edf5;
  color: #526b80;
  font-size: 9px;
  font-weight: 950;
}
.job-readiness-stage strong {
  overflow: hidden;
  align-self: end;
  color: #23394d;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-readiness-stage em {
  overflow: hidden;
  align-self: start;
  color: #64748b;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-readiness-stage.is-complete {
  border-color: #acd9bb;
  background: #f1faf4;
}
.job-readiness-stage.is-complete > span {
  background: #d9f2e1;
  color: #17643d;
}
.job-readiness-stage.is-complete em { color: #17643d; }
.job-readiness-stage.is-current {
  border-color: #85bdf1;
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px rgba(16, 110, 234, .08);
}
.job-readiness-stage.is-current > span {
  background: #106eea;
  color: #fff;
}
.job-readiness-stage.is-current em { color: #075ea8; }
.job-readiness-stage.is-attention {
  border-color: #e9b45f;
  background: #fff8e8;
}
.job-readiness-stage.is-attention > span {
  background: #f4a62a;
  color: #fff;
}
.job-readiness-stage.is-attention em { color: #7a5000; }
.job-readiness-stage.is-upcoming {
  border-style: dashed;
  opacity: .78;
}
@media (max-width: 980px) {
  .job-readiness { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .job-readiness-stages { grid-template-columns: 1fr; }
}


/* Operations inbox: the shared next-action surface across Empire workspaces. */
.operations-inbox {
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #b7cce0;
  border-top: 4px solid #087ff0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(24, 56, 86, .09);
}
.operations-inbox > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #cfdeeb;
  background: linear-gradient(90deg, #f7fbff, #eef6fd);
}
.operations-inbox > header p {
  margin: 0 0 2px;
  color: #0872d8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}
.operations-inbox > header h2 { margin: 0; color: #15283b; font-size: 18px; line-height: 1.1; }
.operations-inbox > header > div > span { display: block; margin-top: 4px; color: #586f84; font-size: 12px; }
.operations-inbox-metrics { display: flex; flex: 0 0 auto; overflow: hidden; border: 1px solid #b7cce0; border-radius: 6px; background: #fff; }
.operations-inbox-metrics > span {
  min-width: 66px;
  padding: 7px 10px;
  border-left: 1px solid #d5e1ec;
  color: #60758a;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}
.operations-inbox-metrics > span:first-child { border-left: 0; }
.operations-inbox-metrics strong { display: block; color: #0c5fae; font-size: 17px; line-height: 1; }
.operations-inbox-list { display: grid; }
.operations-inbox-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 130px 118px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid #dbe5ee;
  border-left: 4px solid #8ba3b8;
  background: #fff;
}
.operations-inbox-row:last-child { border-bottom: 0; }
.operations-inbox-row:hover { background: #f7fbff; }
.operations-inbox-row.priority-critical { border-left-color: #ce2029; background: linear-gradient(90deg, #fff7f7, #fff 22%); }
.operations-inbox-row.priority-high { border-left-color: #f0a000; }
.operations-inbox-row.priority-low { border-left-color: #9cb3c6; }
.operations-inbox-kind { color: #0872d8; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.operations-inbox-copy { min-width: 0; }
.operations-inbox-copy strong,
.operations-inbox-copy b,
.operations-inbox-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-inbox-copy strong { color: #172b3e; font-size: 13px; }
.operations-inbox-copy b { margin-top: 2px; color: #324d66; font-size: 11px; }
.operations-inbox-copy small { margin-top: 2px; color: #718397; font-size: 10px; }
.operations-inbox-meta { display: grid; justify-items: start; gap: 4px; color: #536b80; font-size: 10px; font-weight: 700; }
.operations-inbox-owner { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-inbox-owner.is-mine { padding: 3px 7px; border-radius: 999px; color: #08704a; background: #dff7ec; }
.operations-inbox-owner.is-unassigned { color: #9a5c00; }
.operations-inbox-action { width: 100%; min-height: 34px; border-color: #9dbbd6; color: #075aa7; background: #f8fbff; font-weight: 800; }
.operations-inbox-action:hover { border-color: #087ff0; background: #eaf5ff; }
.operations-inbox > footer { padding: 8px 14px; border-top: 1px solid #dbe5ee; color: #667c90; background: #f7fafc; font-size: 10px; }
.operations-inbox-clear { display: flex; align-items: center; gap: 12px; padding: 22px 16px; color: #176745; }
.operations-inbox-clear > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #dff7ec; font-weight: 900; }
.operations-inbox-clear strong, .operations-inbox-clear small { display: block; }
.operations-inbox-clear small { margin-top: 2px; color: #64798d; }

@media (max-width: 820px) {
  .operations-inbox { margin: 8px 0; border-radius: 7px; }
  .operations-inbox > header { align-items: flex-start; padding: 12px; }
  .operations-inbox > header > div > span { display: none; }
  .operations-inbox > header h2 { font-size: 16px; }
  .operations-inbox-metrics > span { min-width: 48px; padding: 6px; }
  .operations-inbox-row {
    grid-template-columns: 55px minmax(0, 1fr) 92px;
    gap: 8px;
    min-height: 0;
    padding: 10px 9px;
  }
  .operations-inbox-copy small { white-space: normal; line-height: 1.25; }
  .operations-inbox-meta { display: none; }
  .operations-inbox-action { min-height: 32px; padding: 5px 7px; font-size: 10px; }
}


/* Multi-user edit protection */
.edit-conflict-banner {
  position: sticky;
  z-index: 8;
  top: -1px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin: 0 0 12px;
  border: 1px solid #e0a327;
  border-left: 5px solid #d78a00;
  border-radius: 6px;
  padding: 11px 12px;
  color: #3d2a08;
  background: #fff8e8;
  box-shadow: 0 5px 16px rgba(80, 51, 0, .12);
}
.edit-conflict-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c97800;
  font: 800 17px/1 "Poppins", sans-serif;
}
.edit-conflict-copy strong,
.edit-conflict-copy span { display: block; }
.edit-conflict-copy strong { font-size: 13px; }
.edit-conflict-copy span { margin-top: 2px; color: #6b4d19; font-size: 11px; font-weight: 600; }
.edit-conflict-copy details { margin-top: 5px; font-size: 11px; }
.edit-conflict-copy summary { cursor: pointer; color: #815400; font-weight: 800; }
.edit-conflict-copy ul { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; padding-left: 17px; }
.edit-conflict-banner > button { min-height: 34px; white-space: nowrap; border-color: #c97800; color: #704700; background: #fff; }

@media (max-width: 720px) {
  .edit-conflict-banner { grid-template-columns: 30px minmax(0, 1fr); }
  .edit-conflict-banner > button { grid-column: 1 / -1; width: 100%; }
}
