.office-action span,
.office-task-card span {
  text-transform: capitalize;
}

.office-hero {
  border: 1px solid #cfdae6;
  border-radius: 8px;
  background: #ffffff;
}

.office-hero {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.office-hero span,
.office-status span,
.office-action-card span,
.office-task-head span {
  color: #214ee5;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.office-hero h2,
.office-hero p {
  margin: 0;
}

.office-hero h2 {
  margin-top: 4px;
  color: #17212f;
  font-size: 30px;
  line-height: 1;
}

.office-hero p {
  margin-top: 8px;
  color: #44596b;
  line-height: 1.45;
}

.office-status {
  min-width: 140px;
  display: grid;
  gap: 6px;
  justify-items: end;
  padding: 14px;
  border-radius: 8px;
  background: #eaf7f1;
  border: 1px solid #addfca;
}

.office-status {
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.office-status:hover,
.office-status:focus-visible {
  border-color: #214ee5;
  box-shadow: 0 0 0 3px rgba(33, 78, 229, 0.12);
  outline: 0;
}

.office-status strong {
  color: #167a5b;
  font-size: 34px;
  line-height: 1;
}

.office-status small,
.office-task-page-head p {
  margin: 0;
  color: #44596b;
  font-size: 12px;
  font-weight: 850;
}

.office-task-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.office-task-page-head span {
  color: #214ee5;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.office-task-page-head strong {
  display: block;
  margin-top: 4px;
  color: #17212f;
  font-size: 22px;
}

.office-task-page-head button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: #214ee5;
  color: #ffffff;
  font-weight: 950;
  padding: 0 12px;
}

.office-action-list,
.office-task-list {
  display: grid;
  gap: 10px;
}

.office-action-card,
.office-task-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfdae6;
  border-left: 5px solid #214ee5;
  border-radius: 8px;
  background: #f7fbff;
}

.office-action-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.office-action-card.warn,
.office-task-card.overdue,
.office-task-card.due-soon {
  border-left-color: #b86b00;
  background: #fff8ed;
}

.office-action-card.good,
.office-task-card.done {
  border-left-color: #167a5b;
  background: #eaf7f1;
}

.office-action-card p,
.office-task-card p {
  margin: 4px 0 0;
  color: #44596b;
  line-height: 1.35;
}

.office-task-card .office-task-notes {
  white-space: pre-wrap;
}

.office-task-feedback {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #cfdae6;
  border-radius: 8px;
  background: #f7fbff;
}

.office-task-feedback dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
}

.office-task-feedback div {
  display: grid;
  gap: 3px;
}

.office-task-feedback dt {
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.office-task-feedback dd {
  margin: 0;
  color: #17212f;
  overflow-wrap: anywhere;
}

.office-task-feedback a {
  color: var(--brand-primary);
}

.office-task-card .office-task-feedback-message {
  margin: 0;
  color: #17212f;
  white-space: pre-wrap;
}

.office-action-card strong,
.office-task-head strong {
  display: block;
  margin-top: 3px;
  color: #17212f;
}

.office-action-card small,
.office-task-head small {
  display: block;
  margin-top: 3px;
  color: #607083;
  font-size: 12px;
}

.office-task-documents {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfdae6;
  border-radius: 8px;
  background: #ffffff;
}

.office-task-documents > strong {
  color: #17212f;
}

.office-task-documents > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.office-task-documents a {
  display: grid;
  gap: 4px;
  min-height: 66px;
  align-content: center;
  border: 1px solid #cfdae6;
  border-radius: 8px;
  background: #f7fbff;
  color: #17212f;
  padding: 9px;
  text-decoration: none;
}

.office-task-documents b,
.office-task-documents small {
  color: #607083;
  font-size: 12px;
}

.office-action-card button,
.office-task-update button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #214ee5;
  color: #ffffff;
  font-weight: 950;
  padding: 0 12px;
}

.office-task-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.office-task-head b {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(33, 78, 229, 0.12);
  color: #214ee5;
  font-size: 12px;
}

.office-task-form,
.office-task-update {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.office-task-update {
  padding-top: 10px;
  border-top: 1px solid #cfdae6;
}

@media (max-width: 680px) {
.office-hero,
.office-action-card,
.office-task-head,
.office-task-form,
.office-task-update {
    grid-template-columns: 1fr;
  }

.office-task-form,
.office-task-update {
    grid-template-columns: 1fr;
  }
}

/* Frostline command header treatment */
.office-status {
  background: linear-gradient(135deg, var(--frost-command), var(--frost-command-2));
  border-color: #284256;
  border-top: 1px solid #284256;
  color: #ffffff;
}

.office-status small,
.office-status strong {
  color: #ffffff;
}

.office-task-page-head button {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong));
  color: #ffffff;
}

.office-status {
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.18), transparent 52%),
    linear-gradient(135deg, var(--brand-command), var(--brand-command-2));
  border-color: color-mix(in srgb, var(--brand-primary) 28%, var(--brand-command-2));
  box-shadow: 0 14px 34px rgba(var(--brand-command-rgb), 0.16);
}

.office-action-card,
.office-task-card {
  border-color: var(--brand-border);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(var(--brand-command-rgb), 0.06);
}

/* Office queue brand cleanup */
.office-hero {
  border-color: var(--brand-border);
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.06), transparent 44%),
    #ffffff;
  box-shadow: 0 18px 42px rgba(var(--brand-command-rgb), 0.07);
}

.office-task-page-head {
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.18), transparent 52%),
    linear-gradient(135deg, var(--brand-command), var(--brand-command-2));
  border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--brand-command-2));
}

.office-task-page-head span,
.office-task-page-head strong,
.office-task-page-head p {
  color: #ffffff;
}

.office-status {
  border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--brand-command-2));
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong));
  box-shadow: 0 16px 34px rgba(var(--brand-primary-rgb), 0.22);
}

.office-status span,
.office-status strong,
.office-status small {
  color: #ffffff;
}

.office-action-card,
.office-task-card,
.office-action-card.warn,
.office-action-card.good,
.office-task-card.overdue,
.office-task-card.due-soon,
.office-task-card.done {
  border: 1px solid color-mix(in srgb, var(--brand-primary) 26%, var(--brand-command-2));
  border-left: 1px solid color-mix(in srgb, var(--brand-primary) 26%, var(--brand-command-2));
  background:
    linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.16), transparent 55%),
    linear-gradient(135deg, var(--brand-command), var(--brand-command-2));
  box-shadow: 0 14px 32px rgba(var(--brand-command-rgb), 0.14);
}

.office-action-card.warn,
.office-task-card.overdue,
.office-task-card.due-soon {
  border-color: color-mix(in srgb, var(--brand-warning) 58%, var(--brand-command-2));
}

.office-action-card.good,
.office-task-card.done {
  border-color: color-mix(in srgb, var(--brand-success) 58%, var(--brand-command-2));
}

.office-action-card span,
.office-task-head span,
.office-action-card strong,
.office-task-head strong,
.office-action-card small,
.office-task-head small,
.office-action-card p,
.office-task-card p {
  color: #ffffff;
}

.office-action-card small,
.office-task-head small,
.office-task-card p {
  opacity: 0.82;
}

.office-task-head b {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.office-action-card button,
.office-task-update button {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong));
  color: #ffffff;
}

.office-task-update {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.office-task-card .create-form label span,
.office-task-card .create-form span {
  color: rgba(255, 255, 255, 0.86);
}

.office-task-card .create-form input,
.office-task-card .create-form select,
.office-task-card .create-form textarea {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-text);
}

.office-task-documents {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.office-task-documents > strong,
.office-task-documents a,
.office-task-documents b,
.office-task-documents small {
  color: #ffffff;
}

.office-task-documents a {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

.office-status,
.office-task-page-head,
.office-action-card,
.office-action-card.warn,
.office-action-card.good,
.office-task-card,
.office-task-card.overdue,
.office-task-card.due-soon,
.office-task-card.done {
  background: var(--brand-command-gradient) !important;
  border-color: var(--brand-command-border) !important;
  border-top-color: var(--brand-command-border) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(var(--brand-command-rgb), 0.15) !important;
}

.office-status span,
.office-status small,
.office-status strong,
.office-task-page-head span,
.office-task-page-head strong,
.office-task-page-head p,
.office-action-card span,
.office-action-card strong,
.office-action-card small,
.office-action-card p,
.office-task-head span,
.office-task-head strong,
.office-task-head small,
.office-task-card p {
  color: #ffffff !important;
}

.office-task-head {
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid var(--brand-command-border) !important;
  border-radius: 8px !important;
  background: var(--brand-command-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(var(--brand-command-rgb), 0.14) !important;
}

.office-task-head span,
.office-task-head small,
.office-task-head strong {
  color: #ffffff !important;
}

.office-task-head b {
  min-width: 28px !important;
  min-height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong)) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(var(--brand-primary-rgb), 0.22) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  padding: 0 9px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* Office task board card cleanup */
.office-action-card,
.office-action-card.warn,
.office-action-card.good,
.office-task-card,
.office-task-card.overdue,
.office-task-card.due-soon,
.office-task-card.done {
  border: 1px solid var(--brand-border) !important;
  border-left: 5px solid var(--brand-primary) !important;
  background: #ffffff !important;
  color: var(--brand-text) !important;
  box-shadow: 0 10px 24px rgba(var(--brand-command-rgb), 0.06) !important;
}

.office-action-card.warn,
.office-task-card.overdue,
.office-task-card.due-soon {
  border-left-color: #ffcc00 !important;
}

.office-action-card.good,
.office-task-card.done {
  border-left-color: var(--brand-success) !important;
}

.office-task-head {
  min-height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--brand-text) !important;
  box-shadow: none !important;
}

.office-action-card span,
.office-action-card strong,
.office-action-card small,
.office-action-card p,
.office-task-head span,
.office-task-head strong,
.office-task-head small,
.office-task-card p,
.office-task-documents > strong,
.office-task-documents a,
.office-task-documents b,
.office-task-documents small,
.office-task-card .create-form label span,
.office-task-card .create-form span {
  color: var(--brand-text) !important;
}

.office-action-card small,
.office-task-head small,
.office-task-card p,
.office-task-documents b,
.office-task-documents small,
.office-task-card .create-form label span,
.office-task-card .create-form span {
  color: var(--brand-muted) !important;
  opacity: 1 !important;
}

.office-task-head b,
.office-priority-pill {
  min-width: 28px !important;
  min-height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 18%, var(--brand-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--brand-primary) 10%, #ffffff) !important;
  color: var(--brand-primary-strong) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  padding: 0 9px !important;
}

.office-priority-pill.priority-high {
  border-color: #ce2029 !important;
  background: #ce2029 !important;
  color: #ffffff !important;
}

.office-priority-pill.priority-normal {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary) !important;
  color: #ffffff !important;
}

.office-priority-pill.priority-low {
  border-color: color-mix(in srgb, var(--brand-command) 42%, var(--brand-border)) !important;
  background: color-mix(in srgb, var(--brand-command) 88%, #ffffff) !important;
  color: #ffffff !important;
}

.office-task-documents {
  border-color: var(--brand-border) !important;
  background: color-mix(in srgb, var(--brand-primary) 4%, #ffffff) !important;
}

.office-task-documents a {
  border-color: var(--brand-border) !important;
  background: #ffffff !important;
}

.office-task-update {
  border-top-color: var(--brand-border) !important;
}

.office-task-card .create-form input,
.office-task-card .create-form select,
.office-task-card .create-form textarea {
  border-color: var(--brand-border) !important;
  background: #ffffff !important;
  color: var(--brand-text) !important;
}

.office-task-page-head button {
  color: var(--brand-on-primary) !important;
}

.office-priority-pill {
  min-height: 26px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, var(--brand-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--brand-primary) 10%, #ffffff) !important;
  color: var(--brand-primary-strong) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  padding: 0 9px !important;
  white-space: nowrap !important;
}

.office-priority-pill.priority-normal {
  border-color: var(--brand-warning) !important;
  background: var(--brand-warning) !important;
  color: var(--brand-text) !important;
}

.office-priority-pill.priority-high {
  border-color: var(--brand-danger) !important;
  background: var(--brand-danger) !important;
  color: #ffffff !important;
}

.office-task-card,
.office-action-card {
  border-color: var(--brand-border) !important;
  background: var(--brand-surface) !important;
  color: var(--brand-text) !important;
  box-shadow: var(--theme-card-shadow) !important;
}

.office-task-card:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 42%, var(--brand-border)) !important;
  box-shadow: var(--theme-card-shadow-strong) !important;
}

.office-priority-pill {
  border-color: var(--brand-border) !important;
  background: color-mix(in srgb, var(--brand-command) 6%, #ffffff) !important;
  color: var(--brand-text) !important;
}

.workspace .office-active-panel {
  display: grid !important;
  gap: 10px !important;
}

.workspace .office-active-panel .office-action-list + .office-task-list {
  margin-top: 10px !important;
}

.workspace .office-safety-grid .office-action-card {
  border: 1px solid var(--brand-border) !important;
  border-left: 5px solid var(--brand-primary) !important;
  border-radius: 8px !important;
  background: var(--brand-surface) !important;
  color: var(--brand-text) !important;
  box-shadow: none !important;
}

.workspace .office-safety-grid .office-action-card.warn {
  border-left-color: var(--brand-danger) !important;
}

.workspace .office-safety-grid .office-action-card strong,
.workspace .office-safety-grid .office-action-card p {
  color: var(--brand-text) !important;
}

.workspace .office-safety-grid .office-action-card span,
.workspace .office-safety-grid .office-action-card small {
  color: var(--brand-muted) !important;
}

.workspace .office-safety-grid .office-action-card button {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary) !important;
  color: var(--brand-on-primary) !important;
  box-shadow: var(--theme-primary-shadow) !important;
}
