:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #dfe5ee;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --canvas: #f5f7fb;
  --primary: #2f6fed;
  --primary-dark: #2458c7;
  --primary-soft: #edf4ff;
  --green: #2f855a;
  --green-dark: #18794e;
  --green-soft: #edf8f1;
  --cyan: #2f6fed;
  --cyan-soft: #edf4ff;
  --red: #e5484d;
  --red-soft: #fff1f0;
  --yellow: #e78a08;
  --yellow-soft: #fff8e8;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-synthesis: none;
}

/* Production-order material incident UI Contract r5 */
.material-incident-panel {
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.material-incident-panel .section-heading {
  align-items: flex-start;
  margin-bottom: 9px;
}

.material-incident-panel .section-heading h3 {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-panel .section-heading p,
.material-incident-row > small,
.material-incident-row > p {
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.material-incident-row {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.material-incident-row:first-of-type {
  border-top: 0;
}

.material-incident-row > header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.material-incident-row > header > strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-row .status-red { color: #dc2626; background: #fef2f2; }
.material-incident-row .status-green { color: #167743; background: #f0fdf4; }
.material-incident-row .status-neutral { color: #475569; background: #f1f5f9; }

.material-incident-row > header > small {
  flex-basis: 100%;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.material-incident-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px 12px;
}

.material-incident-facts span {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

.material-incident-facts strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.material-incident-row.state-held .material-incident-facts span:nth-child(3) strong {
  color: #dc2626;
}

.material-incident-row.state-recovered .material-incident-facts span:nth-child(5) strong {
  color: #16a34a;
}

.material-incident-actions,
.material-incident-manage .dialog-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.material-incident-task-input-list {
  display: grid;
  gap: 8px;
}

.material-incident-task-input-list > h3 {
  margin: 0;
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-task-input-list > p {
  margin: -3px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.material-incident-task-input {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) minmax(90px, .55fr) minmax(98px, .7fr) minmax(164px, 1fr) minmax(128px, .8fr) minmax(106px, .6fr);
  align-items: end;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.material-incident-task-input > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.material-incident-task-input strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-task-input small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

/* Material incident two-step field workflow r7 */
/* An unassigned-only incident has no personnel table to fill a fixed-height panel. */
dialog.dialog-material-incident-workflow:not(:has([data-material-incident-task-row])) {
  height: fit-content;
}
.dialog-material-incident-workflow:not(:has([data-material-incident-task-row])) .dialog-body,
.dialog-material-incident-workflow:not(:has([data-material-incident-task-row])) .material-incident-workflow {
  height: auto;
}
.dialog-material-incident-workflow:not(:has([data-material-incident-task-row])) .material-incident-task-head {
  display: none;
}
dialog.dialog-material-incident-workflow {
  width: min(1240px, calc(100vw - 28px));
  height: min(740px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
}

.dialog-material-incident-workflow .dialog-header {
  min-height: 56px;
  padding: 10px 18px;
  background: #ffffff;
}

.dialog-material-incident-workflow .dialog-header h2 {
  color: #172033;
  font-size: 18px;
  font-weight: 700;
}

.dialog-material-incident-workflow .dialog-body {
  height: calc(100% - 56px);
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.material-incident-workflow {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  background: #ffffff;
}

.material-incident-workflow [hidden] {
  display: none !important;
}

.material-incident-facts-step,
.material-incident-review-step {
  min-height: 0;
  padding: 12px 18px 0;
}

.material-incident-facts-step {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.material-incident-basics {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(210px, .75fr) minmax(250px, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.material-incident-basic-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.material-incident-basic-field + .material-incident-basic-field {
  padding-left: 14px;
  border-left: 1px solid #e2e8f0;
}

.material-incident-basic-field > strong {
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.material-incident-basic-field > strong small {
  color: #8090a5;
  font-size: 11px;
  font-weight: 500;
}

.material-incident-basic-field > input,
.material-incident-basic-field > select,
.material-time-panel > input,
.material-time-panel > select,
.material-incident-return-qty > input {
  height: 36px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}

.material-time-choice {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.material-segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: fit-content;
  max-width: 100%;
  padding: 2px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}

.material-segmented-control label {
  min-width: 0;
  cursor: pointer;
}

.material-segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-segmented-control span {
  display: block;
  padding: 5px 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  border-radius: 5px;
}

.material-segmented-control input:checked + span {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 1px 2px rgba(47, 111, 237, .18);
}

.material-segmented-control input:focus-visible + span {
  outline: 2px solid rgba(47, 111, 237, .28);
  outline-offset: 1px;
}

.material-time-panel,
.material-half-day-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  min-width: 0;
}

.material-time-panel[data-material-time-panel="exact"] {
  grid-template-columns: minmax(0, 1fr);
}

.material-incident-workflow .material-incident-task-input-list {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  border: 1px solid #dfe5ee;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.material-incident-workflow .material-incident-task-input-list > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 12px;
  background: #ffffff;
}

.material-incident-workflow .material-incident-task-input-list h3 {
  margin: 0;
  color: #172033;
  font-size: 15px;
  font-weight: 700;
}

.material-incident-workflow .material-incident-task-input-list header p {
  margin: 2px 0 0;
  color: #8090a5;
  font-size: 12px;
}

.material-incident-return-modes {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.material-incident-return-modes .button {
  min-height: 32px;
  color: #46556b;
  background: #ffffff;
}

.material-incident-return-modes .button.is-active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.material-incident-task-head,
.material-incident-workflow .material-incident-task-input {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) minmax(92px, .55fr) minmax(100px, .6fr) minmax(210px, 1.15fr) minmax(310px, 1.65fr);
  align-items: center;
  gap: 0;
}

.material-incident-task-head {
  min-height: 36px;
  padding: 0 12px;
  color: #5d6b80;
  font-size: 12px;
  font-weight: 700;
  background: #f8fafc;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #dfe5ee;
}

.material-incident-task-head > span,
.material-incident-workflow .material-incident-task-input > * {
  min-width: 0;
  padding-right: 12px;
}

.material-incident-task-head > span + span,
.material-incident-workflow .material-incident-task-input > * + * {
  padding-left: 12px;
  border-left: 1px solid #edf1f6;
}

.material-incident-personnel-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.material-incident-workflow .material-incident-task-input {
  min-height: 70px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #e6ebf2;
  border-radius: 0;
  background: #ffffff;
}

.material-incident-workflow .material-incident-task-input:last-child {
  border-bottom: 0;
}

.material-incident-worker,
.material-incident-remaining,
.material-known-start {
  display: grid;
  gap: 2px;
}

.material-incident-workflow .material-incident-worker strong,
.material-incident-workflow .material-incident-remaining strong,
.material-known-start strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-worker small,
.material-known-start small,
.material-incident-remaining span,
.material-incident-return-qty > span,
.material-known-start > span {
  color: #8090a5;
  font-size: 11px;
  line-height: 1.35;
}

.material-incident-remaining > span,
.material-incident-return-qty > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.material-incident-return-qty {
  display: grid;
  gap: 3px;
}

.material-incident-return-qty input[readonly] {
  color: #172033;
  background: #f8fafc;
}

.material-incident-start-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.material-incident-start-state legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.material-incident-start-state label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.material-incident-start-state input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--primary);
}

.material-incident-start-time {
  min-width: 0;
}

.material-incident-start-time .material-time-choice {
  gap: 5px;
}

.material-incident-start-time .material-segmented-control span {
  padding: 4px 8px;
  font-size: 11px;
}

.material-incident-start-time .material-time-panel > input,
.material-incident-start-time .material-time-panel > select {
  height: 32px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
}

.material-incident-form-error {
  margin: 0 18px;
  padding: 0;
}

.material-incident-form-error:not(:empty) {
  padding: 7px 10px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff7f7;
}

.material-incident-fixed-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 9px 18px;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid #dfe5ee;
}

.material-incident-fixed-footer > strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
}

.material-incident-footer-step {
  position: absolute;
  left: 50%;
  color: #7a8799;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transform: translateX(-50%);
}

.material-incident-fixed-footer .dialog-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  padding: 0;
}

.material-incident-fixed-footer .button {
  min-width: 104px;
  min-height: 38px;
}

.material-incident-review-step {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.material-incident-review-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 18px;
  min-height: 46px;
  padding: 9px 12px;
  color: #5d6b80;
  font-size: 13px;
  background: #f5f8fc;
  border-radius: 7px;
}

.material-incident-review-context span + span {
  padding-left: 18px;
  border-left: 1px solid #cfd8e5;
}

.material-incident-review-context strong {
  color: #172033;
  font-weight: 700;
}

.material-incident-review-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
}

.material-incident-review-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.material-incident-review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  color: #526176;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  background: #f8fafc;
  border-bottom: 1px solid #dfe5ee;
}

.material-incident-review-table td {
  padding: 11px 12px;
  color: #314056;
  font-size: 13px;
  line-height: 1.5;
  vertical-align: top;
  border-bottom: 1px solid #e6ebf2;
}

.material-incident-review-table th + th,
.material-incident-review-table td + td {
  border-left: 1px solid #edf1f6;
}

.material-incident-review-table th:first-child { width: 19%; }
.material-incident-review-table th:nth-child(2) { width: 44%; }
.material-incident-review-table th:nth-child(3) { width: 37%; }

.material-incident-review-table td:first-child {
  display: grid;
  gap: 2px;
}

.material-incident-review-table td:first-child strong {
  color: #172033;
  font-size: 14px;
}

.material-incident-review-table td:first-child small {
  color: #8090a5;
  font-size: 11px;
}

.material-incident-review-result {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
}

.material-incident-review-result-key,
.material-incident-review-continuation-key {
  color: #172033;
  font-size: inherit;
  font-weight: 700;
}

.material-incident-unchanged-note {
  margin: 0;
  padding: 10px 12px;
  color: #526176;
  font-size: 12px;
  line-height: 1.5;
  background: #edf4ff;
  border-radius: 7px;
}

.material-resume-preview {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.material-resume-preview li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.material-resume-preview strong { color: #172033; font-size: 14px; }
.material-resume-preview span { color: #64748b; font-size: 13px; }

/* Personal scheduling active/completed density contract r6 */
.personal-plan-summary-heading {
  gap: 12px;
  min-height: 44px;
  padding-block: 6px;
}

.personal-plan-summary-heading .personal-plan-heading-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
  min-width: 0;
}

.personal-plan-status-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.personal-plan-summary-heading [data-personal-plan-progress] {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  color: var(--muted);
}

.personal-plan-summary-heading [data-personal-plan-progress] i {
  font-style: normal;
  white-space: nowrap;
}

.personal-plan-summary-heading [data-personal-plan-progress] i + i::before {
  content: "·";
  margin-inline: 6px;
  color: #a0aec0;
}

.personal-plan-dialog .personal-assignment-projection {
  gap: 3px;
}

.personal-plan-dialog .personal-assignment-projection > em[hidden],
.personal-plan-dialog .personal-plan-auto-preview[hidden],
.personal-plan-dialog [data-personal-assignment-head][hidden],
.personal-plan-dialog [data-personal-assignment-empty][hidden],
.personal-plan-dialog [data-personal-unfinished][hidden],
.personal-plan-dialog [data-personal-unfinished-check][hidden] {
  display: none;
}

@media (min-width: 1181px) {
  .personal-plan-dialog .schedule-sticky-actions > div { margin-right: 324px; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .personal-plan-dialog .schedule-sticky-actions > div { margin-right: 294px; }
}

@media (max-width: 900px) {
  .personal-plan-dialog .schedule-sticky-actions > div { margin-right: 0; }
  .completed-personal-assignment-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .completed-personal-assignment-row > span { grid-column: 1 / -1; }
  .completed-personal-assignment-row time {
    text-align: right;
  }
}

/* 已确认的页面级可选语义色：仅供机工与产能、安排生产本轮采用，不改全站默认主题。 */
.app-shell.view-personal_capacity,
.app-shell.view-schedule {
  --ink: #172033;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --canvas: #F6F8FB;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --green: #16A34A;
  --green-dark: #166534;
  --green-soft: #F0FDF4;
  --yellow: #EA8A15;
  --yellow-soft: #FFF7ED;
  --red: #DC2626;
  --red-soft: #FEF2F2;
}

/* 共享顶栏 Material UI Contract r4：所有业务页复用同一套桌面外壳和控件规格。 */
.app-shell .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 56px;
  align-items: center;
  gap: 16px;
  padding: 8px 18px;
}

.app-shell .topbar > .page-intro {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.app-shell .topbar .page-title-row {
  flex: 0 0 auto;
}

.app-shell .topbar h1 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.app-shell .topbar p {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .topbar .top-actions {
  width: auto;
  flex: 0 0 auto;
  gap: 10px;
  flex-wrap: nowrap;
}

.app-shell .topbar .button {
  display: inline-flex;
  height: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
  border-radius: 5px;
  font-size: 13px;
  white-space: nowrap;
}

.app-shell .topbar .button svg,
.app-shell .topbar .button > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.app-shell .topbar .connection-button:not(.is-compact) {
  display: inline-flex;
  height: 38px;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.app-shell .topbar .connection-button:not(.is-compact):hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.app-shell .topbar .connection-button:not(.is-compact)::before {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
}

.app-shell.view-today #today-topbar-freshness .workbench-freshness > .button {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

@media (max-width: 1180px) {
  .app-shell .topbar p {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell .topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }

  .app-shell .topbar .top-actions {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app-shell .topbar .top-actions .connection,
  .app-shell .topbar .top-actions .button-secondary,
  .app-shell .topbar .top-actions .button-primary,
  .app-shell .topbar .top-actions .screen-mode-button {
    display: inline-flex;
    flex: 0 0 auto;
  }
}

/* 数据概览 r1：统一指标带、三组运营事实和低优先级折叠信息。 */
.insights-workspace {
  gap: 12px;
}

.insights-workspace .horizon-toolbar {
  min-height: 54px;
  padding: 8px 10px;
  background: var(--surface);
}

.insights-workspace .horizon-toolbar > span {
  margin: 0;
  white-space: nowrap;
}

.insights-overview-section {
  padding: 16px 18px 14px;
}

.insights-workspace .insights-band-heading {
  min-height: 30px;
  margin-bottom: 8px;
}

.insights-workspace .insights-band-heading > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.insights-workspace .insights-band-heading h2,
.insights-workspace .insights-analysis-panel h2 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.insights-workspace .insights-band-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.insights-workspace .insights-metric-band {
  min-height: 94px;
  gap: 0;
}

.insights-workspace .insights-metric-band.is-current {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insights-workspace .insights-metric-band.is-period {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insights-workspace .insights-metric-band .metric-tile {
  min-height: 94px;
  justify-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
}

.insights-workspace .insights-metric-band .metric-tile:first-child {
  border-left: 0;
}

.insights-workspace .insights-metric-band .metric-tile span {
  color: #475569;
  font-size: 14px;
  font-weight: 400;
}

.insights-workspace .insights-metric-band .metric-tile strong {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.insights-workspace .insights-metric-band .metric-tile.tone-blue strong {
  color: var(--primary-dark);
}

.insights-workspace .insights-metric-band .metric-tile.tone-green strong {
  color: var(--green-dark);
}

.insights-workspace .insights-metric-band .metric-tile.tone-red strong {
  color: var(--red);
}

.insights-workspace .insight-grid {
  align-items: stretch;
  gap: 12px;
}

.insights-workspace .insights-analysis-panel {
  display: flex;
  min-height: 218px;
  flex-direction: column;
  padding: 16px 18px;
}

.insights-workspace .insights-analysis-panel .section-heading {
  min-height: 48px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.insights-workspace .insights-analysis-panel .section-heading p {
  font-size: 13px;
}

.insights-workspace .insights-analysis-panel .plain-stat-list {
  flex: 1;
  gap: 0;
}

.insights-workspace .insights-analysis-panel .plain-stat-list > div,
.insights-workspace .insights-analysis-panel .schedule-stat-link {
  min-height: 52px;
  padding: 10px 0;
  color: #475569;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 14px;
}

.insights-workspace .insights-analysis-panel .plain-stat-list > div:last-child,
.insights-workspace .insights-analysis-panel .schedule-stat-link:last-child {
  border-bottom: 0;
}

.insights-workspace .insights-analysis-panel .plain-stat-list strong,
.insights-workspace .insights-analysis-panel .schedule-stat-link strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.insights-workspace .insights-analysis-panel .schedule-stat-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
}

.insights-workspace .insights-analysis-panel .schedule-stat-link strong {
  color: var(--primary-dark);
}

.insights-workspace .insights-analysis-panel .schedule-stat-link svg {
  width: 18px;
  height: 18px;
  color: var(--primary-dark);
}

.insights-workspace .insights-analysis-panel .schedule-stat-link:hover,
.insights-workspace .insights-analysis-panel .schedule-stat-link:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-soft);
  outline: 2px solid rgba(47, 111, 237, 0.16);
  outline-offset: 2px;
}

.insights-workspace .insights-definition-panel,
.insights-workspace .insights-audit-panel {
  padding: 0 18px;
}

.insights-workspace .insights-definition-panel summary,
.insights-workspace .insights-audit-panel summary {
  min-height: 52px;
}

.insights-workspace .insights-definition-panel summary::after,
.insights-workspace .insights-audit-panel summary::after {
  content: none;
}

.insights-details-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.insights-details-title svg,
.insights-details-chevron {
  width: 18px;
  height: 18px;
}

.insights-details-chevron {
  flex: 0 0 18px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.insights-workspace details[open] .insights-details-chevron {
  transform: rotate(180deg);
}

.insights-workspace .insights-definition-panel .compact-details-body,
.insights-workspace .insights-audit-panel .compact-details-body {
  padding: 14px 0 16px;
}

@media (max-width: 1180px) {
  .insights-workspace .insights-metric-band.is-current,
  .insights-workspace .insights-metric-band.is-period {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-workspace .insights-metric-band .metric-tile:nth-child(odd) {
    border-left: 0;
  }

  .insights-workspace .insights-metric-band .metric-tile:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .insights-workspace .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-workspace .insights-analysis-panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .insights-workspace .horizon-toolbar {
    align-items: stretch;
  }

  .insights-workspace .horizon-toolbar > span {
    white-space: normal;
  }

  .insights-workspace .insight-grid {
    grid-template-columns: 1fr;
  }

  .insights-workspace .insights-analysis-panel:last-child {
    grid-column: auto;
  }

  .insights-workspace .insights-metric-band .metric-tile {
    min-height: 82px;
    padding: 12px 10px;
  }

  .insights-workspace .insights-metric-band .metric-tile strong {
    font-size: 24px;
  }

  .insights-workspace .insights-definition-panel summary small,
  .insights-workspace .insights-audit-panel summary small {
    display: none;
  }
}

/* 今日工作高保真实现：参考图的紧凑总控台密度，只覆盖今日工作视图。 */
.app-shell.view-today {
  grid-template-columns: 194px minmax(0, 1fr);
}

.view-today .sidebar {
  padding: 10px 14px 12px;
}

.view-today .brand {
  min-height: 42px;
  padding: 0 2px 10px;
}

.view-today .brand-mark.small {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.view-today .sidebar nav {
  gap: 12px;
}

.view-today .nav-group {
  gap: 3px;
}

.view-today .nav-group-items {
  gap: 3px;
}

.view-today .nav-group-label {
  padding: 4px 10px 3px;
  font-size: 10.5px;
}

.view-today .nav-group-summary {
  min-height: 24px;
  padding: 0 10px;
  font-size: 10.5px;
}

.view-today .nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.view-today .nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.view-today .topbar {
  min-height: 56px;
  padding: 8px 18px;
}

.view-today .topbar h1 {
  font-size: 26px;
  letter-spacing: -.02em;
}

.view-today .topbar p {
  display: none;
}

.view-today .top-actions {
  gap: 10px;
  flex-wrap: nowrap;
}

.view-today .connection-button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.view-today #today-topbar-freshness {
  min-width: 0;
}

.view-today #today-topbar-freshness .workbench-freshness {
  min-height: 30px;
  gap: 5px;
  white-space: nowrap;
}

.view-today #today-topbar-freshness .workbench-freshness > span {
  display: none;
}

.view-today #today-topbar-freshness .workbench-business-date {
  display: none;
}

.view-today #today-topbar-freshness .workbench-freshness > .button {
  width: 28px;
  min-height: 28px;
  margin-left: 0;
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.view-today #today-topbar-freshness .workbench-freshness > .button span {
  display: none;
}

.view-today .top-actions .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding-inline: 15px;
  font-size: 13px;
  white-space: nowrap;
}

.view-today .top-actions .button svg,
.view-today #today-topbar-freshness .button svg {
  width: 14px;
  height: 14px;
}

.view-today .page-content {
  gap: 12px;
  max-width: none;
  padding: 8px 16px 28px;
}

.view-today .workbench-shell {
  gap: 12px;
}

.view-today .content-section.workbench-module {
  padding: 0;
  border-color: #d8e0eb;
  border-color: #d6dee9;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.035);
}

.view-today .workbench-freshness {
  min-height: 24px;
  gap: 6px;
  padding: 0;
  font-size: 11px;
}

.view-today .workbench-freshness > .button {
  min-height: 26px;
  padding-inline: 10px;
}

.view-today .workbench-summary-strip {
  gap: 14px;
}

.view-today .workbench-summary-item {
  display: grid;
  min-height: 42px;
  grid-template-columns: 27px max-content max-content minmax(0, 1fr) 14px;
  align-content: center;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-left-width: 1px;
  border-radius: 6px;
}

.view-today .workbench-summary-icon {
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  padding: 5px;
  color: #fff;
  background: var(--primary);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
}

.view-today .tone-action .workbench-summary-icon {
  color: #fff;
  background: var(--red);
}

.view-today .tone-risk .workbench-summary-icon {
  color: #fff;
  background: #f0a11a;
}

.view-today .tone-wait .workbench-summary-icon {
  color: #fff;
  background: #8793a5;
}

.view-today .workbench-summary-item > span:not(.workbench-summary-icon) {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 800;
}

.view-today .workbench-summary-item strong {
  font-size: 17px;
}

.view-today .workbench-summary-item small {
  justify-self: end;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-summary-chevron {
  width: 14px;
  height: 14px;
  color: #a6b0bf;
}

.view-today .workbench-command-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

.view-today .workbench-command-rail {
  gap: 12px;
}

.view-today .workbench-action-module {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.view-today .workbench-action-module .workbench-module-footer {
  margin-top: auto;
}

.view-today .workbench-module-heading,
.view-today .workbench-module-heading.compact {
  min-height: 42px;
  align-items: center;
  padding: 8px 13px;
}

.view-today .workbench-command-grid .module-kicker,
.view-today .workbench-operation-module .module-kicker,
.view-today .workbench-timeline-module .module-kicker {
  display: none;
}

.view-today .workbench-module-heading h2 {
  margin-top: 0;
  font-size: 16.5px;
  line-height: 1.25;
}

.view-today .workbench-module-heading p {
  display: none;
}

.view-today .workbench-module-heading > strong {
  font-size: 15px;
}

.view-today .module-kicker {
  margin-bottom: 1px;
  font-size: 10px;
}

.view-today .workbench-action-item {
  min-height: 88px;
  gap: 11px;
  padding: 9px 13px;
}

.view-today .workbench-priority {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.view-today .workbench-action-item:not(.tone-overdue) .workbench-priority {
  background: #f59e0b;
}

.view-today .workbench-item-body {
  gap: 3px;
}

.view-today .workbench-item-primary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.view-today .workbench-item-body h3 {
  flex: 0 0 auto;
  font-size: 13.5px;
}

.view-today .workbench-item-body p {
  overflow: hidden;
  max-width: 640px;
  color: #657187;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-item-meta {
  gap: 6px;
  font-size: 11px;
}

.view-today .workbench-order-link strong {
  font-size: 14px;
}

.view-today .workbench-order-link span,
.view-today .workbench-order-link small {
  font-size: 11.5px;
}

.view-today .workbench-item-actions .button {
  min-height: 32px;
  padding-inline: 11px;
  font-size: 12px;
}

.view-today .workbench-module-footer {
  min-height: 34px;
  align-items: center;
  padding: 4px 10px;
}

.view-today .workbench-module-footer .button {
  min-height: 28px;
  border-color: transparent;
  background: transparent;
  font-size: 11.5px;
}

.view-today .workbench-risk-group {
  min-height: 58px;
  padding: 4px 12px;
  border-left-width: 3px;
}

.view-today .workbench-risk-group.tone-high {
  background: #fff;
}

.view-today .workbench-risk-content {
  gap: 4px;
}

.view-today .workbench-risk-titles,
.view-today .workbench-risk-detail-list {
  margin: 0;
  padding-left: 18px;
}

.view-today .workbench-risk-titles {
  display: grid;
  gap: 2px;
  color: #5d687b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.view-today .workbench-risk-titles li::marker {
  color: var(--red);
}

.view-today .workbench-risk-detail-list {
  gap: 3px;
}

.view-today .workbench-risk-detail-list li {
  padding-top: 3px;
}

.view-today .workbench-risk-detail-list small {
  display: block;
}

.view-today .workbench-change-list article {
  min-height: 76px;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 12px;
}

.view-today .workbench-change-list article.impact-important {
  background: #fff;
}

.view-today .workbench-change-list h3 {
  font-size: 13px;
}

.view-today .workbench-change-list p {
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-operation-module {
  overflow-x: auto;
}

.view-today .workbench-operation-head {
  min-width: 900px;
  grid-template-columns: 96px 112px minmax(150px, 1fr) minmax(130px, 0.9fr) 86px minmax(135px, 0.9fr) 88px;
  gap: 8px;
  padding: 7px 12px;
  font-size: 11.5px;
}

.view-today .workbench-operation-list {
  min-width: 900px;
}

.view-today .workbench-operation-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.view-today .workbench-operation-group:last-child {
  border-bottom: 0;
}

.view-today .workbench-operation-worker {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 2px;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
}

.view-today .workbench-operation-worker strong {
  font-size: 13.5px;
}

.view-today .workbench-operation-worker small {
  color: var(--muted);
  font-size: 11px;
}

.view-today .workbench-operation-row {
  min-height: 54px;
  grid-template-columns: 112px minmax(150px, 1fr) minmax(130px, 0.9fr) 86px minmax(135px, 0.9fr) 88px;
  gap: 8px;
  padding: 7px 12px;
}

.view-today .workbench-operation-product {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-operation-plan,
.view-today .workbench-operation-progress {
  gap: 2px;
}

.view-today .workbench-operation-plan strong,
.view-today .workbench-operation-expected {
  font-size: 12px;
}

.view-today .workbench-operation-progress span {
  font-size: 11px;
}

.view-today .workbench-operation-progress .today-task-progress-bar {
  height: 4px;
}

.view-today .workbench-operation-status {
  padding: 3px 7px;
  font-size: 11px;
}

.view-today .workbench-timeline-module .workbench-module-heading {
  float: left;
  width: 360px;
  border-bottom: 0;
}

.view-today .workbench-timeline-module .workbench-module-heading > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.view-today .workbench-timeline-conclusion {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-time-controls {
  min-height: 44px;
  padding: 6px 12px 6px 0;
}

.view-today .workbench-load-detail-link {
  min-height: 30px;
  padding-inline: 9px;
  color: var(--primary-dark);
  border-color: transparent;
}

.view-today .workbench-time-stepper {
  margin-left: auto;
}

.view-today .workbench-time-stepper strong {
  min-width: 188px;
  font-size: 12px;
}

.view-today .workbench-time-presets button {
  min-height: 30px;
  padding-inline: 10px;
  font-size: 12px;
}

.view-today .workbench-load-conclusion {
  min-height: 30px;
  padding: 4px 12px;
  background: #f5f8fd;
}

.view-today .workbench-load-conclusion strong {
  font-size: 12px;
}

.view-today .workbench-load-conclusion .button {
  min-height: 26px;
  padding-inline: 9px;
  font-size: 10px;
}

.view-today .workbench-day-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 8px;
  padding: 10px;
}

.view-today .workbench-day-card {
  min-height: 112px;
  gap: 6px;
  padding: 9px 10px;
  border-top-width: 3px;
}

.view-today .workbench-day-load {
  gap: 1px;
}

.view-today .workbench-day-load strong {
  font-size: 22px;
}

.view-today .workbench-day-load small {
  color: var(--muted);
  font-size: 10.5px;
}

.view-today .workbench-load-meter {
  display: block;
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 999px;
}

.view-today .workbench-load-meter i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.view-today .semantic-today .workbench-load-meter i {
  background: var(--green);
}

.view-today .workbench-load-meter.tone-conflict i {
  background: var(--red);
}

.view-today .workbench-day-facts {
  font-size: 10.5px;
}

.view-today .workbench-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.view-today .workbench-bottom-toggle {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: max-content minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 9px 13px;
  color: var(--ink);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.view-today .workbench-bottom-toggle > .module-kicker {
  grid-row: 1 / span 2;
  align-self: center;
}

.view-today .workbench-bottom-toggle > strong,
.view-today .workbench-bottom-toggle > small {
  grid-column: 2;
}

.view-today .workbench-bottom-toggle > strong {
  font-size: 14px;
}

.view-today .workbench-bottom-toggle > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-today .workbench-bottom-toggle > b {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--primary);
  font-size: 12px;
}

@media (max-width: 1180px) {
  .app-shell.view-today {
    grid-template-columns: 152px minmax(0, 1fr);
  }

  .view-today .workbench-command-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.95fr);
  }

  .view-today .workbench-item-body p {
    max-width: 400px;
  }
}

@media (max-width: 980px) {
  .view-today .workbench-command-grid,
  .view-today .workbench-bottom-grid {
    grid-template-columns: 1fr;
  }

  .view-today .workbench-command-rail {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .view-today .sidebar {
    padding: 8px 10px;
  }

  .view-today .brand {
    display: none;
  }

  .view-today .nav-item {
    min-height: 34px;
  }

  .view-today .nav-group-summary {
    min-height: 34px;
  }

  .view-today .topbar {
    min-height: 54px;
    padding: 8px 10px;
  }

  .view-today #today-topbar-freshness {
    display: none;
  }

  .view-today .topbar p {
    display: none;
  }

  .view-today .page-content {
    padding: 8px 10px 18px;
  }

  .view-today .workbench-command-rail {
    grid-template-columns: 1fr;
  }

  .view-today .workbench-timeline-module .workbench-module-heading {
    float: none;
    width: auto;
    border-bottom: 1px solid var(--line);
  }

  .view-today .workbench-time-controls {
    padding: 7px 10px;
  }
}

@media (max-width: 620px) {
  .view-today .workbench-freshness {
    min-height: 22px;
  }

  .view-today .workbench-freshness > small {
    flex: 1 1 100%;
  }

  .view-today .workbench-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .view-today .workbench-summary-item {
    min-height: 48px;
    grid-template-columns: 22px minmax(0, 1fr) auto 12px;
    gap: 5px;
    padding: 6px 8px;
  }

  .view-today .workbench-summary-icon {
    width: 21px;
    height: 21px;
    border-radius: 4px;
    font-size: 9px;
  }

  .view-today .workbench-summary-item small {
    display: none;
  }

  .view-today .workbench-action-item {
    min-height: 82px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .view-today .workbench-action-item > .workbench-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .view-today .workbench-item-primary {
    display: grid;
    gap: 1px;
  }

  .view-today .workbench-item-body p {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .view-today .workbench-operation-module {
    overflow: visible;
  }

  .view-today .workbench-operation-head {
    display: none;
  }

  .view-today .workbench-operation-list {
    min-width: 0;
  }

  .view-today .workbench-operation-group {
    grid-template-columns: 1fr;
  }

  .view-today .workbench-operation-worker {
    padding: 7px 10px;
    background: var(--surface-subtle);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .view-today .workbench-operation-row {
    min-height: 96px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 9px;
    padding: 8px 10px;
  }

  .view-today .workbench-operation-product,
  .view-today .workbench-operation-plan,
  .view-today .workbench-operation-progress {
    grid-column: 1 / -1;
  }

  .view-today .workbench-operation-expected {
    grid-column: 1;
  }

  .view-today .workbench-operation-status {
    grid-column: 2;
    grid-row: 1;
  }

  .view-today .workbench-time-stepper {
    margin-left: 0;
  }

  .view-today .workbench-time-stepper strong {
    min-width: 0;
  }

  .view-today .workbench-day-grid {
    grid-auto-columns: minmax(142px, 68vw);
  }

  .view-today .workbench-bottom-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
  }

  .view-today .workbench-bottom-toggle > .module-kicker {
    grid-column: 1;
    grid-row: 1;
  }

  .view-today .workbench-bottom-toggle > strong {
    grid-column: 1;
    grid-row: 2;
  }

  .view-today .workbench-bottom-toggle > small {
    display: none;
  }

  .view-today .workbench-bottom-toggle > b {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* 今日工作 V1：首屏按管理优先级分配空间，完整明细进入展开层或专业页面。 */
.workbench-shell { display: grid; gap: 12px; }

.workbench-freshness {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  color: var(--green-dark);
  font-size: 12px;
}

.workbench-freshness > i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.workbench-freshness > span { font-weight: 800; }
.workbench-freshness > small { color: var(--muted); }
.workbench-freshness > .button { margin-left: auto; min-height: 28px; }
.workbench-freshness.is-stale { padding: 7px 10px; color: #a1282f; background: var(--red-soft); border: 1px solid #efb2b0; border-radius: 6px; }
.workbench-freshness.is-stale > i { background: var(--red); }

.workbench-summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.workbench-summary-item {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 2px;
  padding: 11px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}
.workbench-summary-item:hover { border-color: var(--line-strong); box-shadow: 0 3px 12px rgba(15, 23, 42, .06); }
.workbench-summary-item.tone-action { border-left-color: var(--red); }
.workbench-summary-item.tone-risk { border-left-color: var(--yellow); }
.workbench-summary-item.tone-observe { border-left-color: var(--cyan); }
.workbench-summary-item.tone-wait { border-left-color: #8190a5; }
.workbench-summary-item span,
.workbench-summary-item small { color: var(--muted); }
.workbench-summary-item strong { font-size: 24px; line-height: 1.1; }

.workbench-module { padding: 0; overflow: hidden; }
.workbench-module-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.workbench-module-heading.compact { padding: 12px 14px; }
.workbench-module-heading h2 { margin-top: 2px; font-size: 18px; }
.workbench-module-heading p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.workbench-module-heading > strong { flex: 0 0 auto; font-size: 17px; }
.workbench-module-heading > strong small { color: var(--muted); font-size: 11px; font-weight: 500; }
.module-kicker { display: inline-flex; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.module-kicker.action { color: var(--red); }
.module-kicker.risk { color: #a46800; }
.module-kicker.observe,
.module-kicker.timeline { color: var(--cyan); }
.module-kicker.wait { color: #667085; }
.module-kicker.change { color: var(--green-dark); }

.workbench-command-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); align-items: start; gap: 12px; }
.workbench-command-main { display: grid; align-content: start; gap: 12px; min-width: 0; }
.workbench-command-rail { display: grid; gap: 12px; }
.workbench-past-plan-count { display: block; margin-top: 5px; color: var(--primary-dark); font-weight: 700; }
.workbench-material-list { display: grid; gap: 8px; }
.workbench-material-list article { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.workbench-material-list article small { flex: 1 1 180px; color: var(--muted); }
.workbench-command-grid .workbench-module-heading p { display: none; }
.workbench-action-list,
.workbench-risk-list,
.workbench-operation-list,
.workbench-change-list,
.workbench-wait-detail-list { display: grid; }
.workbench-action-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 84px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.workbench-action-item:last-child { border-bottom: 0; }
.workbench-action-item.tone-overdue { background: linear-gradient(90deg, var(--red-soft), #fff 30%); }
.workbench-priority { display: grid; width: 26px; height: 26px; place-items: center; color: #fff; background: var(--cyan); border-radius: 50%; font-size: 12px; font-weight: 900; }
.workbench-action-item.tone-overdue .workbench-priority { background: var(--red); }
.workbench-item-body { display: grid; min-width: 0; gap: 3px; }
.workbench-item-body h3 { font-size: 14px; }
.workbench-item-body p { color: var(--muted); font-size: 12px; line-height: 1.4; }
.workbench-item-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.workbench-attention { color: var(--cyan); font-weight: 900; }
.tone-overdue .workbench-attention { color: var(--red); }
.workbench-order-link { display: inline-flex; width: fit-content; min-width: 0; align-items: baseline; gap: 6px; padding: 0; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.workbench-order-link span,
.workbench-order-link small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.workbench-order-link.compact { display: flex; margin: 2px 0; }
.workbench-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.workbench-clear-state { display: grid; gap: 4px; padding: 19px 14px; color: var(--muted); text-align: center; }
.workbench-clear-state strong { color: var(--green-dark); font-size: 15px; }
.workbench-empty-compact { padding: 18px 14px; color: var(--muted); text-align: center; }
.workbench-module-footer { display: flex; justify-content: center; padding: 8px 12px; background: var(--surface-subtle); border-top: 1px solid var(--line); }

.workbench-risk-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 13px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--yellow); }
.workbench-risk-group:last-child { border-bottom: 0; }
.workbench-risk-group.tone-high { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft), #fff 38%); }
.workbench-risk-group.tone-observe { border-left-color: #aeb7c4; background: var(--surface-subtle); }
.workbench-risk-group.tone-observe .workbench-risk-titles li::marker { color: #8b96a5; }
.workbench-risk-content { display: grid; min-width: 0; gap: 3px; }
.workbench-risk-group .workbench-order-link { display: flex; gap: 6px; }
.workbench-risk-group .workbench-order-link strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-risk-content p { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.workbench-risk-titles { display: flex; min-width: 0; flex-wrap: wrap; gap: 3px; font-size: 11px; font-weight: 800; }
.workbench-risk-titles b { color: #aeb7c4; font-weight: 400; }
.workbench-risk-detail-list { display: grid; gap: 5px; margin-top: 3px; }
.workbench-risk-detail-list > div { display: grid; gap: 1px; padding-top: 5px; border-top: 1px dashed var(--line); }
.workbench-risk-detail-list strong { font-size: 11px; }
.workbench-risk-detail-list small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.workbench-risk-monitor-summary { padding: 7px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.workbench-risk-monitoring { border-top: 1px solid var(--line); }
.workbench-risk-monitoring > header { display: grid; gap: 2px; padding: 8px 13px; background: var(--surface-subtle); }
.workbench-risk-monitoring > header strong { font-size: 12px; }
.workbench-risk-monitoring > header span { color: var(--muted); font-size: 11px; line-height: 1.4; }

.workbench-change-list article { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 9px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.workbench-change-list article:last-child { border-bottom: 0; }
.workbench-change-list article.impact-important { background: linear-gradient(90deg, var(--green-soft), #fff 38%); }
.workbench-change-list time { color: var(--muted); font-size: 11px; }
.workbench-change-list article > div { display: grid; gap: 3px; }
.workbench-change-list h3 { font-size: 13px; }
.workbench-change-list p { color: var(--muted); font-size: 12px; line-height: 1.4; }
.workbench-change-scope { color: var(--muted); font-size: 11px; line-height: 1.4; }
.workbench-change-follow-up { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px; padding-top: 6px; border-top: 1px dashed var(--line); }
.workbench-change-follow-up > span { color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.4; }

.workbench-operation-head,
.workbench-operation-row { display: grid; grid-template-columns: 110px minmax(170px, 1.25fr) minmax(145px, .9fr) minmax(145px, .9fr) 105px auto; align-items: center; gap: 11px; }
.workbench-operation-head { padding: 8px 14px; color: var(--muted); background: var(--surface-subtle); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 800; }
.workbench-operation-row { min-height: 72px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.workbench-operation-row:last-child { border-bottom: 0; }
.workbench-operation-worker,
.workbench-operation-plan,
.workbench-operation-progress { display: grid; min-width: 0; gap: 3px; }
.workbench-operation-worker small,
.workbench-operation-plan small,
.workbench-operation-progress span { color: var(--muted); font-size: 11px; }
.workbench-operation-progress .today-task-progress-bar { max-width: 160px; }
.workbench-operation-status { width: fit-content; padding: 3px 7px; color: #31598f; background: var(--primary-soft); border-radius: 4px; font-size: 11px; font-weight: 800; }
.workbench-operation-status.tone-overdue { color: #a1282f; background: var(--red-soft); }
.workbench-operation-status.tone-partial { color: #965d00; background: var(--yellow-soft); }
.workbench-operation-status.tone-completed { color: var(--green-dark); background: var(--green-soft); }

.workbench-time-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.workbench-time-stepper { display: flex; align-items: center; gap: 7px; }
.workbench-time-stepper strong { min-width: 205px; text-align: center; }
.workbench-time-presets { display: flex; flex-wrap: wrap; }
.workbench-time-presets button { min-height: 32px; padding: 0 10px; }
.workbench-load-conclusion { display: flex; align-items: center; gap: 9px; padding: 10px 14px; background: var(--cyan-soft); border-bottom: 1px solid var(--line); }
.workbench-load-conclusion span { color: var(--muted); font-size: 12px; }
.workbench-load-conclusion .button { margin-left: auto; }
.workbench-day-grid { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); gap: 7px; padding: 11px; overflow-x: auto; }
.workbench-day-card { display: grid; min-height: 124px; align-content: start; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--cyan); border-radius: 6px; }
.workbench-day-card.semantic-past_fact { border-top-color: #98a2b3; background: var(--surface-subtle); }
.workbench-day-card.semantic-today { border-top-color: var(--green); box-shadow: 0 0 0 1px var(--green-soft); }
.workbench-day-card > header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.workbench-day-card > header span { color: var(--muted); font-size: 10px; }
.workbench-day-load { display: grid; gap: 2px; }
.workbench-day-load strong { font-size: 21px; }
.workbench-day-load span,
.workbench-day-empty { color: var(--muted); font-size: 11px; }
.workbench-day-load b { width: fit-content; padding: 2px 5px; color: #a1282f; background: var(--red-soft); border-radius: 3px; font-size: 10px; }
.workbench-day-facts { display: grid; gap: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.workbench-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); align-items: start; gap: 12px; }
.workbench-stage-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workbench-stage-summary-grid article { display: flex; align-items: center; gap: 11px; min-height: 82px; padding: 12px 14px; border-right: 1px solid var(--line); border-top: 3px solid var(--cyan); }
.workbench-stage-summary-grid article:last-child { border-right: 0; }
.workbench-stage-summary-grid .stage-machine_needle_parallel { border-top-color: var(--yellow); }
.workbench-stage-summary-grid .stage-needle_production { border-top-color: var(--green); }
.workbench-stage-summary-grid article > strong { font-size: 22px; }
.workbench-stage-summary-grid h3 { font-size: 13px; }
.workbench-stage-summary-grid p,
.workbench-stage-footnote { color: var(--muted); font-size: 11px; line-height: 1.4; }
.workbench-stage-footnote { margin: 0; padding: 8px 14px; background: var(--surface-subtle); border-top: 1px solid var(--line); }
.workbench-wait-toggle { display: grid; width: 100%; min-height: 102px; grid-template-columns: minmax(0, 1fr) auto; align-content: center; gap: 3px 12px; padding: 13px 15px; color: var(--ink); background: #fff; border: 0; cursor: pointer; text-align: left; }
.workbench-wait-toggle > span,
.workbench-wait-toggle > strong,
.workbench-wait-toggle > small { grid-column: 1; }
.workbench-wait-toggle > small { color: var(--muted); line-height: 1.4; }
.workbench-wait-toggle > b { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--primary); font-size: 12px; }
.workbench-wait-detail { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 13px; background: var(--surface-subtle); border-top: 1px solid var(--line); }
.workbench-wait-detail > div { display: grid; gap: 2px; }
.workbench-wait-detail span,
.workbench-wait-detail small { color: var(--muted); font-size: 11px; }

@media (max-width: 1120px) {
  .workbench-command-grid,
  .workbench-bottom-grid { grid-template-columns: 1fr; }
  .workbench-command-rail { grid-template-columns: 1fr 1fr; }
  .workbench-operation-head { display: none; }
  .workbench-operation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
  .workbench-operation-row { grid-template-columns: minmax(0, 1fr) auto; align-content: start; background: #fff; }
  .workbench-operation-row > .workbench-order-link,
  .workbench-operation-row > .workbench-operation-plan,
  .workbench-operation-row > .workbench-operation-progress { grid-column: 1 / -1; }
  .workbench-operation-row > .button { grid-column: 2; grid-row: 1; }
}

@media (max-width: 900px) {
  .workbench-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-command-rail { grid-template-columns: 1fr; }
  .workbench-time-controls { align-items: stretch; flex-direction: column; }
  .workbench-time-presets { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .workbench-time-presets button { flex: 0 0 auto; }
  .workbench-load-conclusion { align-items: flex-start; flex-wrap: wrap; }
  .workbench-load-conclusion .button { margin-left: 0; }
}

@media (max-width: 620px) {
  .workbench-freshness { align-items: flex-start; flex-wrap: wrap; }
  .workbench-freshness > .button { margin-left: 0; }
  .workbench-summary-strip { gap: 7px; }
  .workbench-summary-item { min-height: 72px; padding: 9px 10px; }
  .workbench-summary-item strong { font-size: 21px; }
  .workbench-module-heading { padding: 12px; }
  .workbench-module-heading p { display: none; }
  .workbench-action-item { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 11px; }
  .workbench-action-item > .workbench-item-actions { grid-column: 2; justify-content: flex-start; }
  .workbench-risk-group { grid-template-columns: 1fr; }
  .workbench-risk-group .workbench-item-actions { justify-content: flex-start; }
  .workbench-operation-list { grid-template-columns: 1fr; }
  .workbench-time-stepper { justify-content: space-between; }
  .workbench-time-stepper strong { min-width: 0; font-size: 11px; }
  .workbench-day-grid { grid-template-columns: repeat(7, minmax(160px, 1fr)); }
  .workbench-stage-summary-grid { grid-template-columns: 1fr; }
  .workbench-stage-summary-grid article { min-height: 66px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workbench-wait-detail { grid-template-columns: 1fr; }
  .workbench-wait-detail .workbench-item-actions { justify-content: flex-start; }
}

/* 8090 personal scheduling workspace */
.personal-schedule-workspace,
.personal-capacity-workspace,
.personal-plan-editor,
.personal-assignment-list,
.personal-assignment-input-list,
.personal-batch-preview-list {
  display: grid;
  gap: 14px;
}

.personal-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.personal-order-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.personal-order-card.risk-red { border-left-color: var(--red); }
.personal-order-card.risk-yellow { border-left-color: var(--yellow); }
.personal-order-card header,
.personal-order-card footer,
.personal-assignment-card > div,
.personal-batch-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-order-summary,
.personal-plan-deadline-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.personal-order-summary span,
.personal-plan-deadline-summary span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.personal-order-summary strong,
.personal-plan-deadline-summary strong { color: var(--text); font-size: 15px; }

.personal-assignment-card,
.personal-batch-preview {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.personal-assignment-card p,
.personal-assignment-card small,
.personal-batch-preview span { color: var(--muted); }
.personal-assignment-card b { color: var(--primary); font-size: 13px; }

.personal-assignment-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(100px, .58fr) minmax(250px, 1.4fr) minmax(130px, .64fr) minmax(52px, 52px);
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--line);
  background: #fff;
}

.personal-assignment-input-row > label,
.personal-assignment-readonly,
.personal-assignment-projection {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 72px;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
}

.personal-assignment-input-row input,
.personal-assignment-input-row select { min-width: 0; height: 38px; }
.personal-assignment-projection strong { color: var(--primary); font-size: 13px; }
.personal-assignment-projection.is-adjusted > small,
.personal-assignment-projection.is-adjusted > strong { color: #b45f06; }
.personal-assignment-input-row.is-adjusted { background: #fffaf2; }
.personal-assignment-projection small,
.personal-assignment-projection em { color: var(--muted); font-size: 11px; line-height: 1.35; font-style: normal; }
.personal-current-formal-projection {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.personal-current-formal-projection b { color: var(--ink); }
.pending-personal-removals {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #f2c37b;
  border-radius: 7px;
  background: #fff9ef;
}
.pending-personal-removals[hidden] { display: none; }
.pending-personal-removal-heading,
.pending-personal-removal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pending-personal-removal-heading span,
.pending-personal-removal-row small { color: var(--muted); }
.pending-personal-removal-row > span { display: grid; gap: 2px; }
.personal-assignment-readonly strong { color: var(--ink); font-size: 13px; }
.personal-assignment-readonly small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.personal-assignment-input-row > .icon-button { align-self: center; justify-self: center; }
.personal-adjustment-cell {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  min-width: 0;
  min-height: 72px;
  padding: 7px 9px;
  border-right: 1px solid var(--line);
}
.personal-adjustment-cell small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.personal-adjustment-summary.has-exception { color: #9a6700; font-weight: 700; }
.personal-adjustment-summary.has-error { color: var(--red); }
.personal-assignment-input-row.has-receipt-timing-conflict {
  background: #fffafa;
  box-shadow: inset 3px 0 0 var(--red);
}
.personal-receipt-timing-conflict { margin: 0 16px 10px; }
.personal-history-conflict {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-top: 1px solid #efb2b0;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  color: #8f1d1d;
  font-size: 12px;
}
.personal-history-conflict strong { font-size: 13px; }
.personal-history-conflict small { color: #9f3030; }
.personal-plan-editor {
  --personal-adjustment-height: 600px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.personal-adjustment-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(430px, 560px);
  min-height: 100%;
}
.personal-adjustment-layer[hidden] { display: none; }
.personal-adjustment-backdrop {
  grid-column: 1;
  width: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, .13);
  cursor: default;
}
.personal-adjustment-drawer {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: var(--personal-adjustment-height);
  overflow: hidden;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -14px 0 34px rgba(15, 23, 42, .16);
}
.personal-adjustment-message {
  display: grid;
  gap: 3px;
  margin: 8px 14px 0;
  padding: 9px 10px;
  border: 1px solid #f1b6b8;
  border-left: 3px solid var(--red);
  border-radius: 6px;
  background: var(--red-soft);
  color: #9f282d;
  font-size: 12px;
}
.personal-adjustment-message[hidden] { display: none; }
.personal-adjustment-message strong { font-size: 13px; }
.personal-adjustment-message.tone-neutral {
  border-color: #b9cdf7;
  border-left-color: var(--primary);
  background: var(--primary-soft);
  color: #315a9f;
}
.personal-adjustment-drawer > header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.personal-adjustment-drawer > header > span { display: grid; gap: 2px; }
.personal-adjustment-drawer > header small { color: var(--primary); font-size: 11px; font-weight: 700; }
.personal-adjustment-drawer > header strong { color: var(--ink); font-size: 17px; }
.personal-adjustment-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scroll-padding-block: 16px;
}
.personal-adjustment-body > p {
  margin: 0;
  padding: 7px 14px;
  background: var(--primary-soft);
  color: #315a9f;
  font-size: 11px;
}
.personal-adjustment-section {
  display: block;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.personal-adjustment-section > summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 2px 9px;
  align-items: center;
  min-height: 52px;
  padding: 8px 14px;
  list-style: none;
  cursor: pointer;
}
.personal-adjustment-section > summary::-webkit-details-marker { display: none; }
.personal-adjustment-section > summary:hover { background: #f8faff; }
.personal-adjustment-section > summary b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.personal-adjustment-section > summary > span { display: grid; gap: 2px; min-width: 0; }
.personal-adjustment-section > summary strong { color: var(--ink); font-size: 14px; }
.personal-adjustment-section > summary small { color: var(--muted); font-size: 11px; }
.personal-adjustment-section > summary i { color: var(--primary); font-size: 11px; font-style: normal; font-weight: 700; }
.personal-adjustment-section[open] > summary i { font-size: 0; }
.personal-adjustment-section[open] > summary i::after { content: "收起"; font-size: 11px; }
.personal-adjustment-section-body {
  display: grid;
  gap: 9px;
  padding: 0 14px 12px 47px;
}
.personal-adjustment-section-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.personal-adjustment-section-body > label,
.personal-adjustment-section-body > div > label,
.personal-adjustment-fields > label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.personal-adjustment-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.personal-adjustment-fields .personal-adjustment-wide { grid-column: 1 / -1; }
.personal-adjustment-section input,
.personal-adjustment-section select { min-width: 0; height: 38px; }
.personal-adjustment-section .managed-form-field { gap: 4px; }
.personal-adjustment-section .managed-date-field { min-width: 0; }
.personal-date-meaning {
  display: grid;
  gap: 1px;
  padding: 7px 9px;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  background: var(--primary-soft);
}
.personal-date-meaning strong { color: #244f9e; font-size: 12px; }
.personal-date-meaning span { color: #55709e; font-size: 11px; }
.personal-planning-conflict {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid #f1c27d;
  border-left: 3px solid var(--yellow);
  border-radius: 6px;
  background: var(--yellow-soft);
  color: #7c4a03;
  font-size: 12px;
}
.personal-planning-conflict[hidden] { display: none; }
.personal-planning-conflict.tone-neutral {
  border-color: var(--line);
  border-left-color: var(--primary);
  background: var(--primary-soft);
  color: #365b95;
}
.personal-planning-conflict.tone-error {
  border-color: #f1b6b8;
  border-left-color: var(--red);
  background: var(--red-soft);
  color: #9f282d;
}
.personal-planning-conflict.tone-resolved {
  border-color: #b8dfc5;
  border-left-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}
.personal-planning-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 2px;
}
.personal-switch-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
  gap: 10px !important;
  min-height: 42px;
  padding: 6px 0;
}
.personal-switch-row[hidden],
.personal-adjustment-section-body [hidden] { display: none; }
.personal-switch-row > span { display: grid; gap: 2px; }
.personal-switch-row strong { color: var(--ink); font-size: 12px; }
.personal-switch-row small { color: var(--muted); font-size: 11px; font-weight: 400; }
.personal-adjustment-section .personal-switch-row input[type="checkbox"] {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  flex: 0 0 44px;
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #dbe2ea;
  cursor: pointer;
}
.personal-adjustment-section .personal-switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .15s ease;
}
.personal-adjustment-section .personal-switch-row input[type="checkbox"]:checked { border-color: var(--primary); background: var(--primary); }
.personal-adjustment-section .personal-switch-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.personal-queue-position-options { display: grid; gap: 7px; }
.personal-queue-position-card {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.personal-queue-position-card:hover { border-color: #a8bce9; background: #fbfdff; }
.personal-queue-position-card:focus-visible { outline: 2px solid rgba(47, 111, 237, .28); outline-offset: 1px; }
.personal-queue-position-card.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(47, 111, 237, .12); }
.personal-queue-position-card > i {
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}
.personal-queue-position-card.is-selected > i { border-color: var(--primary); background: var(--primary); }
.personal-queue-position-card > span { display: grid; gap: 3px; min-width: 0; }
.personal-queue-position-card strong { font-size: 13px; }
.personal-queue-position-card small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.personal-queue-position-card > em { color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.personal-queue-position-card.is-selected > em { color: var(--primary); font-weight: 700; }
.personal-adjustment-footer {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
}
.schedule-preview-choice { align-items: center; justify-content: space-between; }
.schedule-preview-choice > span { display: grid; gap: 2px; }
.schedule-preview-choice > div { display: flex; gap: 6px; }
.mobile-field-label { display: none; }

.personal-assignment-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

@media (min-width: 901px) {
  .personal-plan-dialog .personal-assignment-table { overflow-x: hidden; }
}

.personal-assignment-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(100px, .58fr) minmax(250px, 1.4fr) minmax(130px, .64fr) minmax(52px, 52px);
  min-width: 774px;
  background: #f5f7fb;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.personal-assignment-head span { padding: 7px 9px; border-right: 1px solid var(--line); }
.personal-assignment-head span:last-child {
  text-align: center;
  white-space: nowrap;
}
.personal-assignment-input-list { min-width: 774px; gap: 0; }
.personal-assignment-empty {
  min-height: 64px;
  padding: 20px 14px;
  color: var(--muted);
  text-align: center;
}
.completed-personal-assignments {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.completed-personal-assignments > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 7px 11px;
  list-style: none;
  cursor: pointer;
}
.completed-personal-assignments > summary::-webkit-details-marker { display: none; }
.completed-personal-assignments > summary > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.completed-personal-assignments > summary strong { color: var(--ink); font-size: 14px; }
.completed-personal-assignments > summary small { color: var(--muted); font-size: 12px; }
.completed-personal-assignments > summary b { color: var(--primary); font-size: 12px; }
.completed-personal-assignments[open] > summary b { font-size: 0; }
.completed-personal-assignments[open] > summary b::after { content: "收起"; font-size: 12px; }
.completed-personal-assignment-list { border-top: 1px solid var(--line); }
.completed-personal-assignment-slot { border-bottom: 1px solid var(--line); }
.completed-personal-assignment-slot:last-child { border-bottom: 0; }
.completed-personal-assignment-slot.is-editing > .personal-assignment-input-row { border-bottom: 0; }
.completed-personal-assignment-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(150px, auto) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 11px;
}
.completed-personal-assignment-row > span { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.completed-personal-assignment-row > span strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.completed-personal-assignment-row > span small,
.completed-personal-assignment-row time { color: var(--muted); font-size: 12px; }
.completed-personal-assignment-row time { text-align: right; font-variant-numeric: tabular-nums; }
.personal-plan-guidance {
  padding: 7px 10px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  color: #315a9f;
  font-size: 13px;
}

.personal-capacity-context-list,
.personal-day-worker-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.personal-capacity-context-list li,
.personal-day-worker-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.personal-capacity-context-list li.has-risk { border-color: #efb2b0; background: var(--red-soft); }
.personal-capacity-context-list span,
.personal-day-worker-row span { display: grid; gap: 2px; }
.personal-capacity-context-list small,
.personal-day-worker-row small { color: var(--muted); font-size: 11px; }
.personal-capacity-context-list b,
.personal-day-worker-row b { color: #334155; font-size: 12px; text-align: right; }
.personal-day-worker-row em { color: var(--muted); font-size: 12px; font-style: normal; }
.personal-schedule-key-facts { display: grid; gap: 0; margin: 8px 0 10px; }
.personal-schedule-key-facts > span { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.personal-schedule-key-facts > span:last-child { border-bottom: 0; }
.personal-schedule-key-facts small { color: var(--muted); }
.personal-schedule-key-facts strong { text-align: right; }
.personal-schedule-key-facts b { grid-column: 2; font-size: 11px; text-align: right; }
.personal-schedule-key-facts .tone-red { color: var(--red); }
.personal-schedule-key-facts .tone-yellow { color: #9a6700; }
.personal-schedule-key-facts .tone-neutral { color: var(--muted); }

.personal-capacity-matrix {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.personal-capacity-matrix table { min-width: max-content; border-collapse: separate; border-spacing: 0; }
.personal-capacity-matrix th,
.personal-capacity-matrix td { min-width: 176px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); vertical-align: top; }
.personal-capacity-matrix thead th { position: sticky; top: 0; z-index: 3; background: #f4f7fb; }
.personal-capacity-matrix .personal-worker-sticky { position: sticky; left: 0; z-index: 2; min-width: 190px; background: #fff; }
.personal-capacity-matrix thead .personal-worker-sticky { z-index: 4; background: #eef3f8; }
.personal-worker-sticky { text-align: left; }
.personal-worker-info { display: grid; gap: 6px; align-content: start; }
.personal-worker-info > strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.personal-worker-info > span { color: var(--muted); font-size: 12px; font-weight: 400; }
.personal-worker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.worker-action-note { color: var(--muted); font-size: 11px; font-weight: 500; }
.personal-day-cell { background: #fff; }
.personal-day-cell.load-idle { background: #F8FBFF; }
.personal-day-cell.load-available { background: #F8FBFF; }
.personal-day-cell.load-busy { background: var(--yellow-soft); }
.personal-day-cell.load-full { background: var(--yellow-soft); box-shadow: inset 3px 0 var(--yellow); }
.personal-day-cell.load-overload { background: var(--red-soft); box-shadow: inset 4px 0 var(--red); }
.personal-day-cell.load-unknown { background: #F1F5F9; box-shadow: inset 3px 0 var(--line-strong); }
.personal-day-cell.load-rest,
.personal-day-cell.load-leave,
.personal-day-cell.load-inactive { background: #F1F5F9; color: #475569; }
.personal-day-cell.load-rest > small,
.personal-day-cell.load-leave > small,
.personal-day-cell.load-inactive > small { color: #475569; }
.personal-day-cell > strong,
.personal-day-cell > small { display: block; margin-top: 5px; }
.personal-day-cell > small { color: var(--muted); font-size: 12px; }
.personal-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.personal-load-label { padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, .78); color: var(--muted); font-size: 11px; font-weight: 700; }
.historical-capacity-estimate { color: #9A3412 !important; font-weight: 700; }
.personal-load-bar { width: 100%; height: 6px; margin-top: 7px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); }
.personal-load-bar::-webkit-progress-bar { background: var(--line); }
.personal-load-bar::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.load-idle .personal-load-bar::-webkit-progress-value { background: var(--primary); }
.load-busy .personal-load-bar::-webkit-progress-value,
.load-full .personal-load-bar::-webkit-progress-value { background: var(--yellow); }
.load-overload .personal-load-bar::-webkit-progress-value { background: var(--red); }
.personal-load-bar::-moz-progress-bar { background: var(--primary); border-radius: 999px; }
.personal-state-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.personal-state-actions button {
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.personal-reservation { display: block; width: 100%; margin-top: 6px; padding: 5px 7px; border: 0; border-radius: 5px; background: var(--primary-soft); color: var(--primary-dark); text-align: left; cursor: pointer; }
.department-overview { display: grid; gap: 14px; padding: 16px; }
.department-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.department-overview-grid article { display: grid; gap: 4px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.department-overview-grid article > span,
.department-overview-grid article > small { color: var(--muted); font-size: 12px; }
.department-overview-grid article > strong { font-size: 20px; }
.department-load-distribution { display: flex; flex-wrap: wrap; gap: 7px; }
.department-load-distribution span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; }
.date-range-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.date-range-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.date-range-fields { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.date-range-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Personal capacity Material UI Contract r1 */
.view-personal_capacity .topbar {
  min-height: 56px;
  padding-block: 8px;
}
.view-personal_capacity .topbar p { display: none; }
.view-personal_capacity .page-content { gap: 4px; padding: 16px 10px 28px; }
.view-personal_capacity .personal-capacity-workspace { gap: 4px; }
.view-personal_capacity .personal-capacity-workspace > .content-section { padding: 0; }
.personal-capacity-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  padding: 9px 16px;
}
.personal-capacity-summary { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.personal-capacity-summary .personal-capacity-command { border-bottom: 1px solid var(--line); }
.personal-capacity-command-copy { display: flex; min-width: 0; align-items: baseline; gap: 20px; }
.personal-capacity-command h2 { margin: 0; font-size: 18px; white-space: nowrap; }
.personal-capacity-command p { margin: 0; color: var(--muted); font-size: 13px; }
.personal-capacity-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px 16px 10px;
}
.personal-capacity-kpis > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 14px;
  border-right: 1px solid var(--line);
}
.personal-capacity-kpis > div:last-child { border-right: 0; }
.personal-capacity-kpis span { color: #435269; font-size: 14px; }
.personal-capacity-kpis strong { color: var(--ink); font-size: 25px; line-height: 1; }
.personal-capacity-kpis > div:first-child strong { color: var(--primary-dark); font-size: 29px; }
.personal-capacity-kpis em { color: var(--muted); font-size: 13px; font-style: normal; }
.personal-capacity-department-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 16px 12px;
  padding: 10px 12px;
  border: 1px solid #BFDBFE;
  border-radius: 7px;
  background: #F8FBFF;
  color: var(--text-body, #475569);
  font-size: 13px;
}
.personal-capacity-department-status > span { color: var(--primary); font-size: 16px; }
.personal-capacity-department-status > small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.personal-capacity-department-status.tone-rest { border-color: var(--line); background: #F1F5F9; color: #475569; }
.department-overview-compact {
  grid-template-columns: minmax(220px, .85fr) minmax(0, 3.15fr);
  align-items: stretch;
  gap: 10px;
  padding: 12px 14px;
}
.department-overview-lead {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
}
.department-overview-lead > strong { font-size: 16px; }
.department-overview-lead > small { color: var(--muted); font-size: 12px; }
.department-overview-compact .department-overview-grid { gap: 8px; }
.department-overview-compact .department-overview-grid article { padding: 9px 11px; }
.department-overview-compact .department-overview-grid article > strong { font-size: 18px; }
.personal-capacity-matrix-toolbar {
  position: sticky;
  top: 56px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  margin: 0;
  padding: 8px 20px;
  background: var(--surface, #fff);
}
.personal-capacity-range-controls { flex-wrap: nowrap; gap: 7px; }
.personal-capacity-range-controls .date-range-summary {
  min-width: 230px;
  color: var(--text);
  font-size: 14px;
  text-align: center;
}
.range-arrow {
  width: 36px;
  min-width: 36px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}
.personal-capacity-matrix-shell {
  --personal-worker-column-width: 184px;
  --personal-day-column-width: 190px;
  max-width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
}
.personal-capacity-date-header {
  position: sticky;
  z-index: 9;
  top: 118px;
  max-width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #F8FAFC;
  box-shadow: 0 2px 5px rgba(38, 55, 79, .07);
}
.personal-capacity-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.personal-capacity-grid col.personal-worker-column { width: var(--personal-worker-column-width); }
.personal-capacity-grid col.personal-day-column { width: var(--personal-day-column-width); }
.personal-capacity-date-header th {
  width: var(--personal-day-column-width);
  min-width: var(--personal-day-column-width);
  max-width: var(--personal-day-column-width);
  height: 52px;
  padding: 9px 11px 8px;
  border-right: 1px solid var(--line);
  background: #F8FAFC;
  color: var(--text);
  text-align: left;
  vertical-align: middle;
}
.personal-capacity-date-header th > strong,
.personal-capacity-date-header th > small { display: block; }
.personal-capacity-date-header th > strong { font-size: 14px; }
.personal-capacity-date-header th > small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.personal-capacity-date-header th:not(.personal-worker-sticky) { text-align: center; }
.personal-capacity-date-header .personal-worker-sticky {
  position: sticky;
  z-index: 2;
  left: 0;
  width: var(--personal-worker-column-width);
  min-width: var(--personal-worker-column-width);
  max-width: var(--personal-worker-column-width);
  background: #F1F5F9;
}
.personal-capacity-matrix {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 0 0 7px 7px;
  overscroll-behavior-x: contain;
}
.personal-capacity-matrix .personal-capacity-semantic-head {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.personal-capacity-matrix .personal-capacity-semantic-head th { position: static; }
.personal-capacity-matrix th:not(.personal-worker-sticky),
.personal-capacity-matrix td {
  width: var(--personal-day-column-width);
  min-width: var(--personal-day-column-width);
  max-width: var(--personal-day-column-width);
  padding: 9px 10px;
}
.personal-capacity-matrix thead th {
  top: 0;
  height: 52px;
  padding-top: 9px;
  padding-bottom: 8px;
  box-shadow: 0 1px 0 var(--line);
}
.personal-capacity-matrix thead th > strong,
.personal-capacity-matrix thead th > small { display: block; }
.personal-capacity-matrix thead th > strong { font-size: 14px; }
.personal-capacity-matrix thead th > small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.personal-capacity-matrix .personal-worker-sticky {
  width: var(--personal-worker-column-width);
  min-width: var(--personal-worker-column-width);
  max-width: var(--personal-worker-column-width);
}
.personal-worker-info { position: relative; }
.personal-worker-info > strong { min-height: 25px; color: var(--ink); font-size: 17px; font-weight: 700; }
.personal-worker-info > span,
.personal-worker-info > small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }
.personal-day-heading { min-height: 23px; justify-content: flex-start; }
.personal-day-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.personal-day-status.tone-full { background: var(--yellow-soft); color: #9A3412; }
.personal-day-status.tone-overload { background: var(--red-soft); color: #B91C1C; }
.personal-day-status.tone-rest,
.personal-day-status.tone-leave,
.personal-day-status.tone-inactive,
.personal-day-status.tone-pending,
.personal-day-status.tone-unknown { background: #F1F5F9; color: #475569; }
.personal-day-remaining { margin-top: 6px !important; font-size: 16px; font-weight: 700; line-height: 1.2; }
.personal-day-capacity { margin-top: 5px !important; color: var(--muted) !important; font-size: 13px; font-weight: 400; white-space: nowrap; }
.personal-day-cell .personal-load-bar { height: 4px; margin-top: 6px; }
.personal-worker-controls {
  display: flex;
  min-height: 26px;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}
.personal-worker-capacity-shortcut {
  min-height: 26px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}
.personal-worker-more {
  display: grid;
  width: 26px;
  height: 22px;
  place-items: center;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.personal-worker-more svg { width: 16px; height: 16px; }
.personal-worker-more:hover,
.personal-worker-more:focus-visible { background: var(--surface-subtle); color: var(--primary); }
.personal-state-menu { position: relative; margin-top: 8px; }
.personal-state-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.82);
  color: #41526a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.personal-state-menu > summary::-webkit-details-marker { display: none; }
.personal-state-menu > summary::after { content: "⌄"; margin-left: 5px; }
.personal-state-menu[open] > div {
  position: absolute;
  z-index: 12;
  left: 0;
  bottom: 34px;
  display: grid;
  min-width: 132px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(34, 52, 76, .16);
}
.personal-state-menu > div button {
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.personal-state-menu > div button:hover { background: var(--surface-subtle); }
.personal-reservation-list { display: grid; gap: 5px; margin-top: 7px; }
.personal-reservation-count { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.personal-reservation-wrap { position: relative; display: block; }
.personal-reservation { display: flex; min-height: 25px; align-items: center; gap: 3px; margin-top: 0; padding: 4px 7px; white-space: nowrap; }
.personal-reservation strong,
.personal-reservation span { display: inline; }
.personal-reservation strong { font-size: 13px; font-weight: 700; }
.personal-reservation span { margin-top: 0; overflow: hidden; font-size: 12px; font-weight: 400; text-overflow: ellipsis; opacity: .82; }
.personal-reservation-more > summary {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.capacity-task-preview {
  position: absolute;
  z-index: 20;
  left: 100%;
  top: 50%;
  display: none;
  align-items: flex-start;
  gap: 16px;
  width: 408px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 49, 75, .18);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity .12s ease .2s, transform .12s ease .2s;
}
.personal-reservation-wrap:hover .capacity-task-preview,
.personal-reservation-wrap:focus-within .capacity-task-preview {
  display: flex;
  opacity: 1;
  transform: translate(4px, -50%);
}
.capacity-task-thumb { width: 88px; height: 88px; flex: 0 0 88px; border-radius: 9px; object-fit: cover; }
.capacity-task-preview-copy { display: grid; flex: 1; align-content: start; gap: 7px; min-width: 0; }
.capacity-task-preview-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.capacity-task-preview-fact {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}
.capacity-task-preview-fact small { color: var(--muted); font-size: 13px; }
.capacity-task-preview-fact b { min-width: 0; color: #3b4c63; font-weight: 700; overflow-wrap: anywhere; }
.capacity-task-preview .link-button { width: max-content; min-height: 30px; padding: 0; font-size: 14px; font-weight: 700; pointer-events: auto; }
.dialog-worker-management .dialog-body { overflow-x: hidden; }
.worker-management { display: grid; gap: 12px; width: 100%; min-width: 0; }
.worker-management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.worker-management-toolbar p { min-width: 0; margin: 0; color: var(--muted); font-size: 13px; }
.worker-management-search { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-width: 0; font-size: 13px; color: var(--muted); }
.worker-management-search input { min-width: 0; }
.worker-management-list { display: grid; gap: 5px; min-width: 0; }
.worker-management-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.worker-management-row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.worker-management-row.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.worker-management-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.worker-management-row small { color: var(--muted); }
.worker-management-actions { display: flex; min-width: 0; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 12px; }
.worker-management-actions .link-button { flex: 0 0 auto; white-space: nowrap; }
.worker-management-actions .worker-action-note { flex-basis: 100%; text-align: left; }
@media (max-width: 900px) {
  .view-personal_capacity .topbar { min-height: 72px; }
  .view-personal_capacity .page-content { padding: 12px 0 24px; }
  .personal-capacity-command,
  .personal-capacity-matrix-toolbar { align-items: flex-start; flex-direction: column; }
  .personal-capacity-command-copy { align-items: flex-start; flex-direction: column; gap: 3px; }
  .department-overview-compact { grid-template-columns: 1fr; }
  .department-overview-lead { border-right: 0; border-bottom: 1px solid var(--line); }
  .personal-capacity-range-controls { width: 100%; overflow-x: auto; padding-bottom: 3px; }
  .personal-capacity-range-controls .date-range-summary { min-width: 205px; }
  .personal-capacity-matrix-toolbar { position: relative; top: auto; }
  .personal-capacity-date-header { top: 0; }
  .worker-management-row { grid-template-columns: 1fr; align-items: flex-start; }
  .worker-management-actions { flex-wrap: wrap; justify-content: flex-start; }
  .worker-management-actions .worker-action-note { text-align: left; }
  .personal-capacity-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; }
  .personal-capacity-kpis > div:nth-child(2) { border-right: 0; }
  .personal-capacity-department-status { align-items: flex-start; flex-wrap: wrap; }
  .personal-capacity-department-status > small { width: 100%; margin-left: 25px; white-space: normal; }
}
@media (width <= 520px) {
  .personal-capacity-command { padding: 12px; }
  .personal-capacity-command .toolbar-actions { width: 100%; }
  .personal-capacity-command .toolbar-actions .button { flex: 1; }
  .department-overview-compact .department-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-capacity-kpis { padding: 12px 8px 8px; }
  .personal-capacity-kpis > div { display: grid; justify-items: start; gap: 3px; padding: 8px 12px; }
  .personal-capacity-kpis strong { font-size: 21px; }
  .personal-capacity-kpis em { display: none; }
  .personal-capacity-department-status { margin: 0 12px 12px; }
  .personal-capacity-matrix-shell {
    --personal-worker-column-width: 214px;
    --personal-day-column-width: 184px;
  }
  .personal-capacity-matrix .personal-worker-sticky {
    width: var(--personal-worker-column-width);
    min-width: var(--personal-worker-column-width);
    max-width: var(--personal-worker-column-width);
  }
  .personal-capacity-matrix th:not(.personal-worker-sticky),
  .personal-capacity-matrix td {
    width: var(--personal-day-column-width);
    min-width: var(--personal-day-column-width);
    max-width: var(--personal-day-column-width);
    padding: 9px;
  }
  .personal-capacity-range-controls .segmented { min-width: max-content; }
  .capacity-task-preview { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; padding: 14px; transform: none; }
  .capacity-task-thumb { width: 72px; height: 72px; flex-basis: 72px; }
  .capacity-task-preview-title { font-size: 17px; }
  .capacity-task-preview-fact { grid-template-columns: 62px minmax(0, 1fr); font-size: 14px; }
  .personal-reservation-wrap:hover .capacity-task-preview,
  .personal-reservation-wrap:focus-within .capacity-task-preview { transform: none; }
  .personal-reservation-wrap.is-preview-open .capacity-task-preview { display: flex; opacity: 1; pointer-events: auto; transform: none; }
  .worker-management { width: 100%; }
  .worker-management-toolbar { align-items: stretch; flex-direction: column; }
}
.maximum-capacity-preview { display: grid; gap: 5px; padding: 12px; border: 1px solid #b8d4fb; border-radius: 8px; background: var(--primary-soft); }
.maximum-capacity-preview span { color: var(--muted); font-size: 13px; }
.all-outsourcing-notice { min-height: 112px; }
.report-personal-task-field:empty { display: none; }
.report-personal-task-warning { display: grid; gap: 8px; padding: 12px; border: 1px solid #ecc765; border-radius: 7px; background: #fff9e8; }
.report-entry-form { gap: 9px; }
.report-order-context {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 12px;
  border: 1px solid #b8d4fb;
  border-radius: 8px;
  background: var(--primary-soft);
}
.report-order-context > small,
.report-task-context span,
.report-task-context small { color: var(--muted); font-size: 12px; }
.report-order-context > strong { font-size: 16px; }
.report-order-context > strong > span { margin-right: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.report-order-context > small { flex: 0 0 auto; }
.report-task-context {
  display: grid;
  grid-template-columns: .85fr 1.35fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}
.report-task-context > div { display: grid; gap: 3px; min-width: 0; padding: 6px 8px; }
.report-task-context strong { overflow-wrap: anywhere; }
.report-primary-entry {
  display: grid;
  grid-template-columns: minmax(170px, .72fr) minmax(300px, 1.28fr);
  gap: 0;
  padding: 15px 16px;
  border: 2px solid #8db8f5;
  border-radius: 10px;
  background: #f5f9ff;
}
.report-primary-worker-slot { display: grid; min-width: 0; padding-right: 16px; border-right: 1px solid #c9dcf6; }
.report-primary-worker { display: grid; align-content: center; gap: 6px; min-width: 0; }
.report-primary-worker > span,
.report-primary-worker > small { color: var(--muted); font-size: 12px; }
.report-primary-worker > strong { overflow: hidden; font-size: 25px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.report-primary-worker.is-empty > strong { color: var(--muted); font-size: 16px; }
.report-primary-worker.is-selecting label { display: grid; gap: 6px; }
.report-primary-worker.is-selecting .field-help { font-size: 11px; }
.report-primary-quantity {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-left: 16px;
}
.report-primary-quantity > span { color: var(--primary-dark); font-size: 13px; font-weight: 800; }
.report-primary-quantity > div { display: flex; align-items: center; gap: 10px; }
.report-primary-quantity input {
  width: min(220px, 100%);
  min-height: 58px;
  padding: 7px 12px;
  color: var(--ink);
  background: #fff;
  border-color: #77a9ed;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.report-primary-quantity > div > strong { color: var(--muted); font-size: 16px; }
.report-primary-quantity > small { color: var(--muted); font-size: 12px; }
.report-time-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.report-time-section legend { margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
.report-time-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.report-time-mode-options label { position: relative; min-width: 0; cursor: pointer; }
.report-time-mode-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.report-time-mode-options label > span {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.report-time-mode-options label > span small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.report-time-mode-options input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.report-time-mode-options input:focus-visible + span { outline: 3px solid rgba(47, 111, 237, .22); outline-offset: 1px; }
.report-time-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; padding: 8px 10px; border-radius: 6px; background: var(--surface-subtle); font-size: 12px; }
.report-time-summary span { color: var(--muted); }
.report-time-summary.is-approximate { color: #7e530d; background: var(--yellow-soft); }
.report-time-fields,
.report-time-uncertainty { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.report-time-fields[hidden],
.report-time-uncertainty[hidden] { display: none; }
.report-time-control { display: grid; align-content: start; gap: 6px; min-width: 0; }
.report-time-control input,
.report-time-control select { width: 100%; min-height: 44px; }
.report-time-control > small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.report-half-day-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.report-half-day-options label,
.report-clock-option-group label { position: relative; cursor: pointer; }
.report-half-day-options input,
.report-clock-option-group input { position: absolute; width: 1px; min-height: 0; opacity: 0; }
.report-half-day-options span,
.report-clock-option-group span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}
.report-half-day-options input:checked + span,
.report-clock-option-group input:checked + span { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.report-half-day-options input:focus-visible + span,
.report-clock-option-group input:focus-visible + span { outline: 3px solid rgba(47, 111, 237, .22); outline-offset: 1px; }
.report-clock-options { display: grid; grid-column: 1 / -1; gap: 7px; padding-top: 2px; }
.report-clock-options[hidden],
.report-clock-option-group[hidden] { display: none; }
.report-clock-option-group { display: grid; grid-template-columns: repeat(7, minmax(58px, 1fr)); gap: 7px; align-items: start; }
.report-clock-choice { display: grid; min-width: 0; gap: 4px; }
.report-clock-choice .report-clock-half[hidden] { display: none; }
.report-clock-choice .report-clock-half span {
  min-height: 34px;
  padding: 5px 4px;
  color: var(--primary-dark);
  background: #f7faff;
  font-size: 12px;
}
.report-clock-choice.is-selected-hour > .report-clock-hour span {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.report-clock-options > small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.reporting-queue-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 12px;
}
.reporting-queue-tabs {
  display: flex;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.reporting-queue-tabs::-webkit-scrollbar { display: none; }
.reporting-queue-tabs button {
  min-width: max-content;
  min-height: 56px;
  padding: 0 18px;
  color: #475569;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.reporting-queue-tabs button b {
  margin-left: 5px;
  color: var(--muted);
  font-size: 13px;
}
.reporting-queue-tabs button.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-bottom-color: var(--primary);
}
.reporting-queue-tabs button.is-active b { color: var(--primary-dark); }
.reporting-queue-tabs button:focus-visible {
  outline: 3px solid rgba(47, 111, 237, .22);
  outline-offset: -3px;
}
.reporting-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.reporting-search .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.reporting-search > i,
.reporting-search > svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.reporting-search input {
  width: 100%;
  min-height: 42px;
  padding-left: 38px;
  font-size: 14px;
}
.reporting-results { display: grid; gap: 10px; }
.reporting-queue-panel,
.reporting-today-panel { padding: 12px 14px 14px; }
.reporting-today-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.reporting-today-summary h2 { margin: 0 0 3px; font-size: 18px; }
.reporting-today-summary p { color: var(--muted); font-size: 12px; }
.reporting-summary-counts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.reporting-summary-counts > span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  color: #526171;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.reporting-summary-counts > span b { color: var(--ink); font-size: 14px; }
.reporting-summary-counts > .is-overdue { color: #9b2730; background: #fff4f4; border-color: #f2c9cc; }
.reporting-summary-counts > .is-overdue b { color: #b4232b; }
.reporting-group-list { display: grid; gap: 12px; }
.reporting-group { display: grid; gap: 7px; }
.reporting-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 2px;
}
.reporting-group > header h3 { margin: 0; font-size: 15px; }
.reporting-group > header p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.reporting-group > header > b { color: var(--muted); font-size: 12px; }
.reporting-group.is-overdue > header h3,
.reporting-group.is-overdue > header > b { color: #b4232b; }
.report-task-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.report-task-head,
.report-task-card {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(112px, .68fr) minmax(122px, .64fr) minmax(192px, 1.1fr) minmax(112px, auto);
  align-items: center;
  gap: 10px;
}
.report-task-head {
  min-height: 38px;
  padding: 6px 10px;
  color: #475569;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}
.report-task-head span:last-child { text-align: center; }
.report-task-list { display: grid; }
.report-task-card {
  min-height: 78px;
  padding: 8px 10px;
  border-left: 3px solid var(--line-strong);
  background: #fff;
}
.report-task-card + .report-task-card { border-top: 1px solid var(--line); }
.report-task-card.task-state-overdue { border-left-color: var(--red); background: #fffafa; }
.report-task-card.task-state-in_progress { border-left-color: var(--primary); }
.report-task-card > div { display: grid; gap: 3px; min-width: 0; }
.report-task-card > div > small { color: var(--muted); font-size: 12px; }
.report-task-card > div > strong { overflow-wrap: anywhere; }
.reporting-material-r2 .task-order-link {
  display: grid;
  align-items: start;
  gap: 4px;
}
.reporting-material-r2 .task-order-link strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.reporting-material-r2 .task-order-link span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.reporting-material-r2 .report-task-worker strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.report-task-kind {
  justify-self: start;
  padding: 1px 6px;
  color: #526171;
  background: #edf1f5;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.report-task-kind.is-external { color: #7a4f08; background: #fff5dc; }
.report-task-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.report-task-state {
  display: inline-flex;
  justify-self: start;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.report-task-state.tone-blue { color: var(--primary-dark); background: var(--primary-soft); }
.report-task-state.tone-neutral { color: #526171; background: #edf1f5; }
.report-task-state.tone-orange { color: #965d00; background: var(--yellow-soft); }
.report-task-state.tone-red { color: #b4232b; background: var(--red-soft); }
.report-task-remaining > strong { color: var(--primary-dark); font-size: 18px; font-weight: 700; }
.reporting-material-r2 .report-task-projection strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.reporting-material-r2 .report-task-projection small { color: var(--muted); font-size: 12px; font-weight: 400; }
.reporting-task-actions { display: flex !important; align-items: stretch; justify-content: center; gap: 5px !important; flex-direction: column; }
.reporting-task-actions .button { min-height: 31px; padding: 5px 9px; white-space: nowrap; }
.reporting-readonly {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.reporting-today-processed { padding: 0; overflow: hidden; }
.reporting-today-processed > summary {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}
.reporting-today-processed > summary::-webkit-details-marker { display: none; }
.reporting-today-processed > summary::before { content: "›"; color: var(--muted); font-size: 18px; transform: rotate(0); transition: transform .16s ease; }
.reporting-today-processed[open] > summary::before { transform: rotate(90deg); }
.reporting-today-processed > summary > span { font-size: 14px; font-weight: 800; }
.reporting-today-processed > summary > b { color: var(--primary-dark); font-size: 12px; }
.reporting-today-processed > summary > small { color: var(--muted); font-size: 11px; }
.reporting-processed-list { display: grid; border-top: 1px solid var(--line); }
.reporting-processed-list > article {
  display: grid;
  grid-template-columns: 46px 68px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 14px;
}
.reporting-processed-list > article + article { border-top: 1px solid var(--line); }
.reporting-processed-list time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.reporting-processed-list article > div { display: grid; gap: 2px; min-width: 0; }
.reporting-processed-list article strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.reporting-processed-list article small { color: var(--muted); font-size: 12px; }
.reporting-processed-empty { padding: 12px 14px; color: var(--muted); font-size: 12px; }
.text-warning { color: #8a5b09; }
.report-selected-task,
.report-prefilled-worker { display: grid; gap: 4px; min-height: 72px; align-content: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); }
.report-selected-task > span,
.report-prefilled-worker > span,
.report-selected-task > small,
.report-prefilled-worker > small { color: var(--muted); font-size: 12px; }
.report-selected-task > strong,
.report-prefilled-worker > strong { color: var(--ink); }
.personal-order-detail-plan { display: grid; gap: 8px; }
.personal-order-detail-plan .personal-plan-deadline-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.personal-task-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.personal-task-summary > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); }
.personal-task-summary span { color: var(--muted); font-size: 12px; }
.personal-task-execution-note { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #31573f; background: #f1f7f3; border-left: 3px solid var(--green); border-radius: 5px; font-size: 12px; }
.personal-task-execution-note span { color: #567062; }
.personal-task-operation-table { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.personal-task-operation-head,
.personal-assignment-compact-row { display: grid; grid-template-columns: minmax(145px, .72fr) minmax(135px, .58fr) minmax(260px, 1.25fr) minmax(145px, .68fr) minmax(190px, auto); align-items: center; gap: 12px; }
.personal-task-operation-head { min-height: 38px; padding: 6px 12px; color: #475569; background: var(--surface-subtle); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 800; }
.personal-assignment-compact-list { display: grid; }
.personal-assignment-compact-row { min-height: 58px; padding: 6px 12px; background: #fff; border-left: 3px solid transparent; }
.personal-assignment-compact-row + .personal-assignment-compact-row { border-top: 1px solid var(--line); }
.personal-assignment-compact-row > div { display: grid; gap: 3px; min-width: 0; }
.personal-assignment-compact-row span,
.personal-assignment-compact-row small { color: var(--muted); font-size: 12px; }
.personal-assignment-worker strong { font-size: 15px; }
.personal-assignment-compact-row.task-state-overdue { border-left-color: var(--red); background: #fffafa; }
.personal-task-quantity strong { font-size: 16px; }
.personal-task-projection strong { overflow: hidden; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.personal-task-state { align-items: start; }
.personal-task-status-badge { justify-self: start; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 800; }
.personal-task-status-badge.tone-neutral { color: #526171; background: #edf1f5; }
.personal-task-status-badge.tone-blue { color: var(--primary-dark); background: var(--primary-soft); }
.personal-task-status-badge.tone-red { color: #b4232b; background: var(--red-soft); }
.personal-task-status-badge.tone-green { color: var(--green-dark); background: var(--green-soft); }
.personal-task-exception { justify-self: start; color: #946200; font-size: 11px; font-style: normal; font-weight: 700; }
.personal-task-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.personal-task-row-actions .button { min-width: 0; white-space: nowrap; }
.button-warning-action { color: #b4232b; background: #fff; border-color: #df6f74; }
.button-warning-action:hover,
.button-warning-action:focus-visible { background: var(--red-soft); border-color: var(--red); }
.personal-assignment-details { grid-column: 1 / -1; padding-top: 7px; border-top: 1px dashed var(--line); }
.personal-assignment-details > summary { color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; }
.personal-assignment-details > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; padding-top: 9px; }
.personal-assignment-details span { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.personal-assignment-details strong { color: var(--ink); font-size: 12px; font-weight: 500; }
.personal-migration-panel { border-style: dashed; }

@media (max-width: 900px) {
  .personal-schedule-grid { grid-template-columns: 1fr; }
  .personal-order-summary,
  .personal-plan-deadline-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-assignment-head { display: none; }
  .personal-assignment-input-list { min-width: 0; padding: 8px; gap: 8px; }
  .personal-assignment-input-row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; }
  .personal-assignment-input-row > label,
  .personal-assignment-readonly,
  .personal-assignment-projection { min-height: 0; padding: 0; border: 0; }
  .mobile-field-label { display: block; color: var(--muted); font-size: 11px; }
  .personal-adjustment-cell { min-height: 0; padding: 0; border: 0; }
  .personal-assignment-input-row > .icon-button { grid-column: 2; justify-self: end; }
  .personal-history-conflict { grid-column: 1 / -1; }
  .personal-adjustment-layer { position: fixed; grid-template-columns: minmax(0, 1fr); }
  .personal-adjustment-backdrop { position: absolute; inset: 0; grid-column: 1; }
  .personal-adjustment-drawer { position: relative; grid-column: 1; width: min(100%, 560px); max-height: 100vh; margin-left: auto; }
  .personal-adjustment-fields { grid-template-columns: 1fr; }
  .personal-adjustment-fields .personal-adjustment-wide { grid-column: auto; }
  .department-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .date-range-fields { grid-template-columns: 1fr; }
  .personal-order-detail-plan .personal-plan-deadline-summary,
  .personal-task-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-task-operation-table { overflow: visible; border: 0; }
  .personal-task-operation-head { display: none; }
  .personal-assignment-compact-list { gap: 8px; }
  .personal-assignment-compact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .personal-assignment-compact-row { gap: 10px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 7px; }
  .personal-assignment-compact-row + .personal-assignment-compact-row { border-top: 1px solid var(--line); }
  .personal-assignment-compact-row > div::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .personal-task-row-actions { justify-content: flex-start; }
  .personal-assignment-details > div { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.22);
  outline-offset: 1px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
  line-height: 1.35;
}

h3 {
  font-size: 16px;
  line-height: 1.4;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 14px;
  color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 4px 12px;
  font-size: 17px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 6px;
  font-size: 25px;
  font-weight: 800;
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.sidebar nav {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-items {
  display: grid;
  gap: 4px;
}

.nav-group-collapsible {
  align-content: start;
}

.nav-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 12px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  list-style: none;
  border-radius: 4px;
  cursor: pointer;
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary:hover {
  color: #334155;
  background: #f8fafc;
}

.nav-group-summary svg {
  width: 14px;
  height: 14px;
  transition: transform 0.16s ease;
}

.nav-group-collapsible[open] > .nav-group-summary svg {
  transform: rotate(180deg);
}

.nav-group-label {
  padding: 0 12px 3px;
  color: #94a0b3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  color: #334155;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-item:focus-visible,
.nav-group-summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-item:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-item.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 700;
}

.sidebar-user {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 16px 12px 4px;
  border-top: 1px solid var(--line);
}

.sidebar-user span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-user .link-button {
  width: max-content;
  margin-top: 8px;
  color: var(--primary-dark);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
}

.page-intro {
  display: grid;
  gap: 2px;
}

.page-title-row {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.page-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.page-kicker,
.section-eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.dialog-actions,
.detail-actions,
.board-controls,
.compact-actions > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-content {
  display: grid;
  align-content: start;
  gap: 14px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 18px 24px 30px;
}

.button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  border-color: #9eabc0;
  background: var(--surface-subtle);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button[data-busy="true"] {
  cursor: wait;
}

.button-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.button-primary:hover:not(:disabled) {
  color: #fff;
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.button-secondary {
  background: #fff;
}

.button-danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.button-small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.button-wide {
  width: 100%;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 22px;
  cursor: pointer;
}

.link-button,
.table-link,
.order-cell,
.simple-main,
.board-order-row {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.link-button {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.connection::before {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  content: "";
}

.connection.offline::before {
  background: var(--red);
}

.connection-button.is-compact {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.connection-button.is-compact::before {
  width: 9px;
  height: 9px;
}

.connection-button.is-compact > i,
.connection-button.is-compact > span {
  display: none;
}

.connection-button.is-compact:hover {
  background: var(--surface-subtle);
  border-color: var(--line-strong);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
}

.metric-tile {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 6px;
}

.metric-tile span {
  color: var(--muted);
  font-size: 13px;
}

.metric-tile strong {
  overflow-wrap: anywhere;
  font-size: 25px;
  line-height: 1.2;
}

.metric-tile.tone-red {
  background: var(--surface);
}

.metric-tile.tone-yellow {
  background: var(--surface);
}

.metric-tile.tone-green {
  background: var(--surface);
}

.metric-tile.tone-red strong { color: var(--red); }
.metric-tile.tone-yellow strong { color: var(--yellow); }
.metric-tile:not(.tone-red):not(.tone-yellow):not(.tone-green) strong { color: var(--primary); }

.metric-tile-button {
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-tile-button small {
  color: var(--muted);
  font-size: 12px;
}

.metric-tile-button:hover,
.metric-tile-button:focus-visible {
  border-color: var(--primary);
  outline: 2px solid rgba(47, 111, 237, 0.16);
  outline-offset: 1px;
}

.metric-tile-button.is-active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.content-section,
.action-band {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.workflow-workspace {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.workspace-panel {
  min-width: 0;
}

.workspace-panel-primary {
  border-top: 1px solid var(--line);
}

.page-toolbar-card {
  padding: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.fill-section {
  min-height: calc(100vh - 134px);
}

.section-heading,
.toolbar,
.action-band,
.horizon-toolbar,
.dialog-header,
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  min-height: 34px;
  margin-bottom: 9px;
}

.section-heading p,
.action-band p,
.horizon-toolbar > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.section-heading > span {
  color: var(--muted);
  white-space: nowrap;
}

.two-column-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toolbar {
  margin-bottom: 10px;
}

.orders-workspace .toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  align-items: center;
}

.orders-workspace .toolbar .search-input {
  width: 100%;
}

.orders-workspace .toolbar-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.order-list-toolbar {
  margin-bottom: 10px;
}

.order-list-toolbar-main {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(330px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.order-list-toolbar-main .search-input {
  width: 100%;
}

.order-list-menu-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.order-list-filter-menu,
.order-list-tools {
  position: relative;
}

.order-list-filter-menu > summary,
.order-list-tools > summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.order-list-filter-menu > summary::-webkit-details-marker,
.order-list-tools > summary::-webkit-details-marker {
  display: none;
}

.order-list-filter-menu > summary span {
  color: var(--primary);
}

.order-list-filter-menu > div,
.order-list-tools > div {
  position: absolute;
  z-index: 18;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  width: max-content;
  max-width: min(620px, calc(100vw - 40px));
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.order-list-tools .toolbar-actions {
  border-top: 0;
}

.search-input {
  width: min(360px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.segmented {
  display: inline-flex;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.segmented button {
  min-height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 0;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 800;
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.order-table th {
  font-size: 13px;
}

td {
  min-width: 92px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.order-table td:first-child {
  min-width: 220px;
}

.order-table td:nth-child(3) {
  min-width: 150px;
}

.order-table .order-list-stage { width: 120px; min-width: 112px; }
.order-table .order-list-progress { width: 200px; min-width: 190px; }
.order-table .order-list-state { min-width: 330px; }
.order-table .order-list-due { min-width: 180px; }

.order-list-current-due {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.order-list-current-due > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-list-current-due > strong {
  color: var(--ink);
  font-size: 15px;
}

.order-list-current-due > span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.order-list-stage-label {
  color: #6b7789;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.order-list-stage-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 3px;
  color: #56657a;
  background: #f6f8fb;
  border: 1px solid #d9e1eb;
  border-radius: 7px;
  white-space: nowrap;
}

.order-list-stage-marker {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #536985;
  background: #e9eef6;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.order-list-stage-tag > strong {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.order-list-progress-stack {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.order-list-progress-line {
  display: grid;
  grid-template-columns: 34px minmax(64px, max-content) 72px;
  align-items: center;
  justify-content: start;
  gap: 7px;
}

.order-list-progress-line small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.order-list-progress-line strong {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-list-progress-track {
  display: block;
  height: 4px;
  overflow: hidden;
  background: #edf1f5;
  border-radius: 999px;
}

.order-list-progress-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.order-list-progress-line.tone-arrival .order-list-progress-track b { background: #aab8cb; }
.order-list-progress-line.tone-scheduled .order-list-progress-track b { background: #7189ae; }
.order-list-progress-line.tone-machine .order-list-progress-track b { background: var(--primary); }

.order-list-current-state {
  display: block;
  min-width: 0;
}

.order-list-issue-list {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.order-list-issue {
  display: grid;
  width: 100%;
  grid-template-columns: max-content minmax(0, 1fr) 14px;
  align-items: start;
  gap: 7px;
  padding: 2px 4px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.order-list-issue:hover {
  background: #f6f8fb;
}

.order-list-issue:focus-visible {
  outline: 2px solid rgba(46, 94, 220, 0.34);
  outline-offset: 2px;
}

.order-list-issue > svg {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  color: #8b98aa;
}

.order-list-issue-label {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 2px 7px;
  color: #526171;
  background: #edf1f5;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.order-list-issue small {
  padding-top: 2px;
  color: #526171;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.order-list-issue.tone-red .order-list-issue-label {
  color: #a1282f;
  background: var(--red-soft);
}

.order-list-issue.tone-yellow .order-list-issue-label,
.order-list-issue.tone-orange .order-list-issue-label {
  color: #965d00;
  background: var(--yellow-soft);
}

.order-list-issue.tone-action .order-list-issue-label {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.order-list-current-state.is-single .order-list-issue {
  grid-template-columns: max-content minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding-block: 4px;
}

.order-list-current-state.is-single .order-list-issue-label {
  min-height: 27px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 14px;
}

.order-list-current-state.is-single .order-list-issue small {
  padding-top: 0;
  font-size: 13px;
  line-height: 1.5;
}

.order-list-current-state.has-multiple .order-list-issue-list {
  gap: 5px;
}

.order-list-current-state.has-multiple .order-list-issue {
  gap: 6px;
  padding-block: 1px;
}

.order-list-current-state.has-multiple .order-list-issue-label,
.order-list-current-state.has-multiple .order-list-issue small {
  font-size: 12px;
}

.order-list-current-state.is-idle .order-list-issue small {
  color: var(--muted);
}

.order-list-empty {
  gap: 7px;
}

.order-cell {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.order-cell > span,
.table-link,
.simple-main,
.board-product > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.order-cell strong,
.table-link strong,
.simple-main strong {
  color: var(--ink);
}

.order-table .order-cell > span > strong {
  font-size: 14px;
}

.order-table .order-cell small {
  font-size: 13px;
}

.order-cell small,
.table-link span,
.simple-main span,
td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.product-thumb,
.board-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  background: #edf1f6;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.image-placeholder {
  display: grid;
  place-items: center;
  color: #5f6f85;
  font-size: 18px;
  font-weight: 800;
}

.status-badge,
.risk-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f0f3f7;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.business-delay-badge {
  margin: 3px 0 0;
  color: var(--yellow);
  background: var(--yellow-soft);
}

.status-waiting_cut {
  color: #5f6f85;
}

.status-inactive {
  color: #5f6f85;
  background: #eef1f4;
}

.status-pending_schedule {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.status-scheduled,
.status-in_progress {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.status-machine_completed,
.status-production-completed {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-quote-pending {
  color: #8a5a00;
  background: var(--yellow-soft);
}

.risk-badge.risk-red {
  color: var(--red);
  background: var(--red-soft);
}

.risk-badge.risk-yellow {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.risk-badge.risk-normal {
  color: var(--green-dark);
  background: var(--green-soft);
}

.risk-row-red td:first-child {
  box-shadow: inset 4px 0 var(--red);
}

.risk-row-yellow td:first-child {
  box-shadow: inset 4px 0 var(--yellow);
}

.progress-track,
.load-bar {
  height: 6px;
  margin: 6px 0 4px;
  overflow: hidden;
  background: #e8edf4;
  border-radius: 3px;
}

.progress-track i,
.load-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.fill-0 { width: 0; }
.fill-5 { width: 5%; }
.fill-10 { width: 10%; }
.fill-15 { width: 15%; }
.fill-20 { width: 20%; }
.fill-25 { width: 25%; }
.fill-30 { width: 30%; }
.fill-35 { width: 35%; }
.fill-40 { width: 40%; }
.fill-45 { width: 45%; }
.fill-50 { width: 50%; }
.fill-55 { width: 55%; }
.fill-60 { width: 60%; }
.fill-65 { width: 65%; }
.fill-70 { width: 70%; }
.fill-75 { width: 75%; }
.fill-80 { width: 80%; }
.fill-85 { width: 85%; }
.fill-90 { width: 90%; }
.fill-95 { width: 95%; }
.fill-100 { width: 100%; }

.simple-list,
.worker-list {
  display: grid;
}

.simple-row,
.worker-row,
.outsourcing-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.simple-row:last-child,
.worker-row:last-child,
.outsourcing-line:last-child {
  border-bottom: 0;
}

.simple-main {
  flex: 1;
  text-align: left;
}

.worker-code {
  width: 110px;
  color: var(--muted);
  font-family: Consolas, monospace;
}

.worker-row strong {
  flex: 1;
}

.empty-state,
.loading-state {
  display: grid;
  min-height: 88px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.loading-state {
  min-height: 150px;
}

.error-state strong {
  color: var(--red);
}

.action-band {
  min-height: 70px;
}

.horizon-toolbar {
  min-height: 40px;
}

.schedule-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 4px;
  overflow-x: auto;
  background: var(--surface-subtle);
  border-radius: 6px;
}

.schedule-filter-bar button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}

.schedule-filter-bar button.is-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 800;
}

.capacity-ribbon {
  display: grid;
  grid-auto-columns: minmax(118px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.capacity-day {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 4px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid #aebed5;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.capacity-day:hover {
  border-color: var(--primary);
}

.capacity-day small {
  color: var(--muted);
}

.capacity-day b {
  color: var(--ink);
}

.capacity-day.is-overloaded {
  background: var(--surface);
  border-top-color: var(--red);
}

.capacity-day.is-overloaded b {
  color: var(--red);
}

.capacity-day.is-stopped {
  border-top-color: #9aa6b6;
  background: var(--surface-subtle);
}

.row-risk {
  box-shadow: inset 4px 0 var(--red);
}

.text-red {
  color: var(--red) !important;
}

.text-green {
  color: var(--green-dark) !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}

.login-panel {
  width: min(390px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.login-panel h1 {
  font-size: 28px;
}

.login-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
}

.form-stack,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form {
  gap: 10px;
}

.form-stack label,
.form-grid label,
.plan-input-row label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 15px;
}

input[type="file"] {
  min-height: 46px;
  padding: 9px;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.form-field {
  display: grid;
  gap: 6px;
}

.field-title {
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

[data-machine-price-field] {
  min-width: 0;
}

[data-machine-price-field] > label {
  height: 100%;
}

.production-route-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.production-route-choice legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.production-route-choice label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
  cursor: pointer;
}

.production-route-choice label:has(input:checked) {
  color: var(--primary-dark);
  background: #eef4ff;
  border-color: #9db9eb;
}

.production-route-choice input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.production-route-choice small,
.production-route-readonly small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.production-route-choice > small {
  grid-column: 1 / -1;
}

.production-route-readonly {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.production-route-readonly strong {
  color: var(--ink);
  font-size: 15px;
}

.order-suggestion {
  position: relative;
}

.suggestion-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 310px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.suggestion-option {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.suggestion-option:hover,
.suggestion-option:focus-visible {
  background: var(--primary-soft);
}

.suggestion-option span {
  color: var(--muted);
  font-size: 13px;
}

.suggestion-option small {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.product-profile-table td {
  vertical-align: middle;
}

.product-profile-table th,
.product-profile-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.products-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.products-workspace > * {
  min-width: 0;
  max-width: 100%;
}

.product-profile-table {
  min-width: 720px;
}

.product-profile-image-cell {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 68px;
}

.product-profile-image-cell img,
.product-profile-preview {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-subtle);
}

.product-profile-image-cell small,
.product-profile-image-current > span {
  color: var(--muted);
  font-size: 12px;
}

.product-profile-image-current {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

.product-profile-image-field {
  display: grid;
  gap: 8px;
}

.field-classification {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field-classification.is-required {
  color: var(--danger-dark, #b42318);
}

.product-profile-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: -4px 0 12px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.product-profile-summary span {
  white-space: nowrap;
}

.product-profile-summary strong {
  margin-left: 3px;
  color: var(--ink);
}

.product-profile-summary small {
  margin-left: auto;
  color: var(--muted);
}

.recommendation-source {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.recommendation-source.is-manual {
  color: var(--primary-dark);
}

.recommendation-source.is-empty {
  color: #8a94a6;
}

.form-section-heading {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.form-section-heading:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-heading span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 680px) {
  .products-workspace .section-heading {
    flex-wrap: wrap;
  }

  .products-workspace .section-heading > div {
    min-width: 0;
  }

  .products-workspace .section-heading p {
    overflow-wrap: anywhere;
  }

  .product-profile-summary small {
    flex-basis: 100%;
    margin-left: 0;
  }

  .product-profile-image-current {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* 安排生产 Material UI Contract r2：当前负荷事实与正式人员状态 */
.schedule-capacity-strip {
  grid-auto-columns: minmax(158px, 1fr);
}

.schedule-capacity-strip .capacity-day {
  min-height: 108px;
  gap: 6px;
  padding: 10px 11px;
}

.capacity-day-heading > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.capacity-day-heading > span > b {
  color: #40516b;
  font-size: 14px;
  font-weight: 700;
}

.capacity-day-heading > span > small {
  color: var(--muted);
  font-size: 11px;
}

.capacity-day-heading strong {
  font-size: 19px;
}

.capacity-day-facts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.capacity-day-facts > span {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.capacity-day-facts b {
  color: #43546d;
  font-size: 12px;
  font-weight: 700;
}

.schedule-capacity-strip .capacity-day .capacity-day-status {
  color: #40516b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capacity-day.is-overloaded .capacity-day-status {
  color: var(--red);
}

.schedule-day-summary > span {
  min-height: 70px;
  align-content: center;
}

.schedule-day-summary > span:nth-child(3) {
  background: var(--primary-soft);
}

.personal-day-worker-list {
  gap: 7px;
}

.personal-day-worker-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(260px, 1.1fr) minmax(96px, auto);
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 9px 12px;
  border-left: 3px solid #b9c6d7;
}

.personal-day-worker-row.load-idle,
.personal-day-worker-row.load-available {
  border-left-color: #7ea2d8;
}

.personal-day-worker-row.load-busy,
.personal-day-worker-row.load-full {
  border-left-color: var(--yellow);
}

.personal-day-worker-row.load-overload {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.personal-day-worker-row.load-rest,
.personal-day-worker-row.load-leave {
  border-left-color: var(--line-strong);
  background: #f7f8fa;
}

.personal-day-worker-identity,
.personal-day-worker-load {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.personal-day-worker-identity > span,
.personal-day-worker-load > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.personal-day-worker-identity strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
}

.personal-day-worker-row .personal-day-worker-identity > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.personal-worker-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  color: #315a9f;
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.personal-worker-state.state-full,
.personal-worker-state.state-busy {
  color: #8a5b09;
  background: #fff4d7;
}

.personal-worker-state.state-overload {
  color: var(--red);
  background: #ffe4e2;
}

.personal-worker-state.state-rest,
.personal-worker-state.state-leave,
.personal-worker-state.state-unknown {
  color: #5c687a;
  background: #edf0f4;
}

.personal-day-worker-load b {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.personal-day-worker-row .personal-day-worker-load small {
  font-size: 13px;
}

.personal-day-worker-load .personal-load-bar {
  margin-top: 0;
}

.personal-day-worker-remaining {
  color: #40516b;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.personal-day-worker-row.load-overload .personal-day-worker-remaining {
  color: var(--red);
}

@media (max-width: 680px) {
  .schedule-capacity-strip {
    grid-auto-columns: minmax(154px, 76vw);
  }

  .day-capacity-summary.schedule-day-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-day-summary > span {
    min-height: 60px;
    padding: 9px;
  }

  .schedule-day-summary strong {
    font-size: 16px;
  }

  .personal-day-worker-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    min-height: 0;
    padding: 9px 10px;
  }

  .personal-day-worker-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .personal-day-worker-load {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .personal-day-worker-remaining {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 13px;
  }

  .personal-day-worker-row .personal-day-worker-identity > small {
    white-space: normal;
  }
}

.table-link,
.compact-expand {
  padding: 0;
  color: var(--primary-dark);
  text-align: left;
  background: transparent;
  border: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-expand {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.muted-text {
  color: var(--muted);
}

.product-actions {
  margin-top: 5px;
}

.product-history-row td {
  padding: 0 14px 12px;
  background: var(--surface-subtle);
}

.product-history-list {
  display: grid;
  gap: 1px;
  padding: 8px;
  background: var(--line);
  border-radius: 5px;
}

.product-history-caption,
.product-history-item {
  padding: 7px 10px;
  background: #fff;
}

.product-history-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.product-history-item {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) 100px 80px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.product-history-item .is-price-different {
  color: var(--primary-dark);
  font-weight: 700;
}

.product-history-item time {
  color: var(--muted);
}

.recommendation-source {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  text-align: left;
}

.product-pin-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-pin-field .field-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-pin-field input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
}

.price-suggestion input {
  padding-right: 42px;
}

form[data-form="complete-order-draft"] .price-history-field input[readonly] {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
  cursor: default;
}

.price-history-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 40px;
  min-height: 40px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 4px 4px 0;
  font-size: 22px;
  font-weight: 800;
}

.price-history-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.price-history-option:hover,
.price-history-option:focus-visible {
  background: var(--primary-soft);
}

.price-history-option > span {
  display: flex;
  gap: 7px;
  align-items: center;
}

.price-history-option small {
  color: var(--muted);
  white-space: nowrap;
}

.default-price-tag {
  min-width: 34px;
  padding: 2px 4px;
  color: #fff;
  text-align: center;
  background: var(--primary);
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.2;
}

.default-price-tag.is-placeholder {
  visibility: hidden;
}

.upload-dropzone {
  display: grid;
  min-height: 118px;
  place-content: center;
  gap: 5px;
  padding: 16px;
  text-align: center;
  background: var(--surface-subtle);
  border: 2px dashed var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.upload-dropzone.is-dragging {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.upload-dropzone input[type="file"] {
  max-width: 360px;
  margin: 0 auto;
}

.upload-dropzone span,
.upload-dropzone small {
  color: var(--muted);
}

.span-2 {
  grid-column: 1 / -1;
}

.form-error {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}

.calculation-note {
  padding: 11px 12px;
  color: #3f5a4c;
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.form-summary,
.warning-confirm {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: var(--surface-subtle);
  border-radius: 5px;
}

.form-summary span,
.warning-confirm span {
  color: var(--muted);
  font-size: 13px;
}

.warning-confirm {
  background: var(--red-soft);
  border-left: 4px solid var(--red);
}

dialog.app-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

dialog.dialog-wide {
  width: min(1120px, calc(100vw - 28px));
}

dialog.dialog-quick-report {
  width: min(780px, calc(100vw - 28px));
}

.dialog-quick-report .dialog-header {
  min-height: 54px;
  padding-block: 9px;
}

.dialog-quick-report .dialog-body {
  padding: 8px 14px 10px;
}

.dialog-quick-report .report-order-context,
.dialog-quick-report .report-primary-entry,
.dialog-quick-report .report-time-fields,
.dialog-quick-report .report-time-uncertainty {
  padding-block: 6px;
}

.dialog-quick-report .dialog-actions {
  padding-top: 0;
}
.dialog-quick-report .report-plan-hint.is-hidden { display: none; }

.dialog-quick-report .report-entry-form { gap: 6px; }
.dialog-quick-report .report-task-context { padding: 3px 6px; }
.dialog-quick-report .report-task-context > div { padding: 2px 6px; }
.dialog-quick-report .report-primary-entry { padding-inline: 12px; }
.dialog-quick-report .report-primary-worker { gap: 2px; }
.dialog-quick-report .report-primary-worker > strong { font-size: 21px; }
.dialog-quick-report .report-primary-quantity { gap: 3px; padding-left: 12px; }
.dialog-quick-report .report-primary-quantity input { min-height: 44px; font-size: 25px; }
.dialog-quick-report .report-time-section legend { margin-bottom: 4px; }
.dialog-quick-report .report-time-mode-options label > span { min-height: 50px; padding: 6px 8px; }
.dialog-quick-report .report-time-summary { margin-top: 4px; padding-block: 5px; }
.dialog-quick-report .report-time-fields { gap: 8px; }
.dialog-quick-report .report-time-control { gap: 3px; }
.dialog-quick-report .report-time-control input,
.dialog-quick-report .report-time-control select { min-height: 38px; }
.dialog-quick-report .report-half-day-options span,
.dialog-quick-report .report-clock-option-group .report-clock-hour span { min-height: 36px; padding-block: 5px; }
.dialog-quick-report .report-clock-options { gap: 4px; }

dialog::backdrop {
  background: rgba(15, 23, 42, 0.66);
}

.dialog-header {
  min-height: 64px;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.dialog-body {
  max-height: calc(100vh - 100px);
  padding: 18px;
  overflow-y: auto;
}

.dialog-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.dialog-new-order .dialog-body {
  max-height: calc(100dvh - 100px);
  padding-bottom: 0;
}

.dialog-new-order .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 4px -18px 0;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -5px 14px rgba(15, 23, 42, 0.07);
}

.personal-queue-effective-dialog {
  width: min(620px, calc(100vw - 32px));
}

.personal-queue-effective-options {
  display: grid;
  gap: 10px;
}

.personal-queue-effective-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.personal-queue-effective-options label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.personal-queue-effective-options input {
  width: auto;
  margin-top: 3px;
}

.personal-queue-effective-options span {
  display: grid;
  gap: 3px;
}

.personal-queue-effective-options small {
  color: var(--muted);
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dialog-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-section > h3 {
  color: #334155;
}

.dialog-section > h3 {
  margin-bottom: 12px;
}

.order-detail-head {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
}

.detail-image {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.detail-facts,
.schedule-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-facts span,
.schedule-summary span {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 10px;
  background: var(--surface-subtle);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-facts strong,
.schedule-summary strong {
  color: var(--ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.detail-actions {
  margin-top: 14px;
}

.warning-stack {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.warning-line {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid #94a3b8;
  background: var(--surface-subtle);
}

.warning-line.red {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.warning-line.yellow {
  border-left-color: #d79521;
  background: var(--yellow-soft);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.detail-grid > div {
  display: grid;
  min-height: 64px;
  align-content: center;
  gap: 3px;
  padding: 10px;
  background: #fff;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.schedule-chips > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: var(--surface-subtle);
  border-left: 3px solid var(--cyan);
}

.schedule-chips small,
.schedule-chips span {
  color: var(--muted);
}

.schedule-summary {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.schedule-state-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface-subtle);
  border-radius: 5px;
}

.schedule-overview-groups {
  display: grid;
  gap: 12px;
}

.schedule-overview-groups > section {
  display: grid;
  gap: 8px;
}

.schedule-overview-groups h3 {
  font-size: 15px;
}

.schedule-adjust-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 12px;
  background: #f3f7f4;
  border-left: 5px solid var(--green);
  border-radius: 5px;
}

.schedule-adjust-note > div {
  display: grid;
  gap: 4px;
}

.schedule-adjust-note span,
.carryover-mode-note {
  color: var(--muted);
}

.schedule-draft-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 8px;
  padding: 7px 10px;
  color: #234f38;
  background: #f3f7f4;
  border-left: 3px solid var(--green);
  border-radius: 5px;
  font-size: 13px;
}

.schedule-draft-note span {
  color: var(--muted);
}

.carryover-mode-note {
  padding: 10px 12px;
  color: #704b00;
  background: var(--yellow-soft);
  border-left: 5px solid var(--yellow);
  border-radius: 5px;
}

.schedule-ok {
  margin-top: 14px;
  padding: 10px 12px;
  color: var(--green);
  background: var(--green-soft);
  border-left: 4px solid var(--green);
}

.plan-status-list {
  display: grid;
  gap: 8px;
}

.plan-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--surface-subtle);
  border-left: 4px solid #94a3b8;
}

.plan-status-row > div {
  display: grid;
  gap: 4px;
}

.plan-status-row span {
  color: var(--muted);
}

.plan-status-row.tone-red {
  background: var(--red-soft);
  border-left-color: var(--red);
}

.plan-status-row.tone-yellow {
  background: var(--yellow-soft);
  border-left-color: #d79521;
}

.plan-status-row.tone-green {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.detail-selector {
  display: grid;
  gap: 9px;
}

.detail-selector-tabs {
  display: flex;
  gap: 9px;
  padding: 2px 2px 7px;
  overflow-x: auto;
}

.detail-selector-card {
  display: grid;
  min-width: 132px;
  min-height: 78px;
  align-content: center;
  gap: 3px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 2px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.detail-selector-card span,
.detail-selector-card small {
  color: var(--muted);
  font-size: 12px;
}

.detail-selector-card:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.detail-selector-card.is-selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.14);
}

.detail-selector-card.tone-red {
  border-top-color: var(--red);
}

.detail-selector-card.tone-yellow {
  border-top-color: #d79521;
}

.detail-selector-card.tone-green {
  border-top-color: var(--green);
}

.detail-selector-panel {
  display: grid;
  min-height: 150px;
  gap: 12px;
  padding: 15px;
  background: var(--surface-subtle);
  border: 2px solid var(--line-strong);
  border-left: 5px solid #94a3b8;
  border-radius: 7px;
}

.detail-selector-panel[hidden] {
  display: none;
}

.detail-selector-panel.tone-red {
  background: var(--red-soft);
  border-left-color: var(--red);
}

.detail-selector-panel.tone-yellow {
  background: var(--yellow-soft);
  border-left-color: #d79521;
}

.detail-selector-panel.tone-green {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.detail-selector-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.detail-selector-panel-head > div {
  display: grid;
  gap: 3px;
}

.detail-selector-panel-head span,
.detail-selector-panel > p {
  color: var(--muted);
}

.detail-selector-panel-head strong {
  font-size: 18px;
}

.detail-selector-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.detail-selector-facts span {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(90, 104, 96, 0.2);
  border-radius: 5px;
}

.detail-selector-facts strong {
  font-size: 18px;
}

.detail-selector-actions {
  display: flex;
  justify-content: flex-end;
}

.plan-input-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.7fr) 40px;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
}

.outsourcing-line > div,
.outsourcing-line > span:first-child {
  display: grid;
  flex: 1;
  gap: 3px;
}

.outsourcing-line span {
  color: var(--muted);
}

.audit-row {
  display: grid;
  grid-template-columns: 120px 100px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.audit-row small {
  color: var(--muted);
}

#toast-region {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
}

.toast {
  padding: 13px 15px;
  color: #fff;
  background: var(--ink);
  border-radius: 5px;
  box-shadow: var(--shadow);
}

.toast-error {
  background: var(--red);
}

.board-view {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.board-view:fullscreen {
  min-height: 100vh;
  padding: 18px 22px;
  overflow: auto;
  border-radius: 0;
}

.board-header {
  min-height: 50px;
}

.board-header h2 {
  font-size: 24px;
}

.board-header p {
  margin-top: 3px;
  color: var(--muted);
}

.board-view .segmented,
.board-view .icon-button {
  border-color: var(--line-strong);
}

.board-view .segmented button,
.board-view .icon-button {
  color: var(--ink);
  background: var(--surface);
}

.board-view .segmented button.is-active {
  background: var(--primary);
}

.board-return-button {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #bfd2f8;
  box-shadow: none;
}

.board-return-button:hover:not(:disabled) {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.production-progress-workspace .progress-stage-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.view-progress .topbar,
.view-order_progress .topbar {
  min-height: 72px;
}

.view-progress .page-content,
.view-order_progress .page-content {
  gap: 8px;
  max-width: 1680px;
  padding: 6px 24px 26px;
}

.progress-visual-r9 {
  --progress-primary: #2563eb;
  --progress-primary-soft: #eff6ff;
  --progress-primary-border: #bfdbfe;
  --progress-ink: #172033;
  --progress-body: #475569;
  --progress-muted: #64748b;
  --progress-line: #e2e8f0;
  --progress-success: #16a34a;
  --progress-success-soft: #f0fdf4;
  --progress-attention: #ea8a15;
  --progress-attention-soft: #fff7ed;
  --progress-risk: #dc2626;
  --progress-risk-soft: #fef2f2;
}

.progress-visual-r9 > .workspace-panel-primary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.progress-workspace-heading {
  min-height: 32px;
  margin-bottom: 7px;
}

.progress-workspace-heading .button {
  min-height: 34px;
  gap: 5px;
  padding: 5px 10px;
  font-size: 14px;
  line-height: 1;
}

.progress-workspace-heading .button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.progress-heading-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 12px;
}

.progress-heading-copy h2 {
  flex: 0 0 auto;
}

.progress-heading-copy p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-progress-workspace .progress-stage-metrics .metric-tile {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 8px 12px;
}

.production-progress-workspace .progress-stage-metrics .metric-tile strong {
  font-size: 22px;
}

.progress-search-panel {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.progress-search-row {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr) max-content max-content;
  align-items: center;
  gap: 8px;
}

.progress-search-row > label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.progress-search-row > label svg {
  width: 17px;
  height: 17px;
  color: var(--progress-muted, var(--muted));
}

.progress-search-panel textarea {
  width: 100%;
  height: 38px;
  min-height: 38px;
  resize: none;
  overflow-y: auto;
  font: inherit;
}

.progress-search-row > strong {
  color: var(--progress-body, var(--muted-strong));
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.progress-search-tools,
.progress-search-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-search-tools {
  justify-content: space-between;
}

.progress-search-panel:not(.has-terms) .progress-search-tools {
  display: none;
}

.view-progress .progress-filter-tabs {
  margin: 2px 0 4px;
}

.view-progress .progress-filter-tabs button {
  min-height: 42px;
}

.view-progress .progress-search-panel {
  margin: 4px 0;
  padding: 5px 8px;
}

.view-progress .progress-search-panel textarea {
  height: 38px;
  min-height: 38px;
}

.progress-search-refresh {
  min-height: 38px;
  margin-left: 4px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.progress-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  font-size: 13px;
  color: var(--primary-dark);
  border: 1px solid #bfd2f8;
  border-radius: 999px;
  background: var(--primary-soft);
}

.progress-search-chip button {
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.progress-order-dates {
  display: grid;
  gap: 6px;
  min-width: 138px;
}

.progress-order-dates span {
  display: grid;
  gap: 2px;
}

.progress-order-dates small {
  color: var(--muted);
}

.production-progress-table {
  min-width: 920px;
}

.production-progress-table td {
  vertical-align: middle;
}

.product-manager-schedule-table {
  min-width: 980px;
}

.product-manager-schedule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 300px;
}

.product-manager-schedule-chip {
  display: inline-grid;
  gap: 2px;
  min-width: 116px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.product-manager-schedule-chip b {
  color: var(--primary);
}

.production-progress-table td > small,
.progress-definition-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.shared-progress-table {
  min-width: 1120px;
}

.progress-order-cell {
  min-width: 190px;
}

.progress-filter-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  margin: 10px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.progress-filter-tabs button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--progress-ink, var(--muted-strong));
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.progress-filter-tabs button:last-child {
  border-right: 0;
}

.progress-filter-tabs button strong {
  min-width: 0;
  height: auto;
  padding: 0;
  color: var(--progress-muted, var(--muted));
  font-size: 13px;
  background: transparent;
}

.progress-filter-tabs button:hover,
.progress-filter-tabs button.is-active {
  color: var(--progress-primary, var(--primary-dark));
  background: var(--progress-primary-soft, var(--primary-soft));
}

.progress-filter-tabs button.is-active {
  box-shadow: inset 0 -3px 0 var(--progress-primary, var(--primary));
}

.progress-filter-tabs button.is-active strong {
  color: var(--progress-primary, var(--primary));
}

.progress-filter-tabs button.is-attention.is-active {
  color: var(--progress-attention, var(--yellow));
  background: var(--progress-attention-soft, #fff7ed);
  box-shadow: inset 0 -3px 0 var(--progress-attention, var(--yellow));
}

.production-flow-matrix {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.progress-matrix-scroll {
  overflow: hidden;
  border: 1px solid var(--progress-line, var(--line));
  border-radius: 7px;
  background: var(--surface);
}

.progress-visual-r9 .progress-matrix-scroll {
  border: 0;
  border-radius: 0;
}

.progress-matrix-shell {
  position: relative;
  min-width: 0;
}

.progress-matrix-top-scroll {
  display: none;
  height: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.progress-matrix-top-scroll > div {
  height: 1px;
}

.progress-matrix-sticky-head {
  position: sticky;
  z-index: 9;
  top: 78px;
  height: 42px;
  margin-bottom: -42px;
  overflow: hidden;
  pointer-events: none;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line-strong);
}

.progress-matrix-sticky-grid {
  display: grid;
  width: 100%;
  min-width: 1080px;
  grid-template-columns: 13fr 19fr 22fr 9fr 20fr 17fr;
  will-change: transform;
}

.progress-matrix-sticky-grid > span {
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  padding: 11px 13px;
  color: var(--progress-ink, var(--muted-strong));
  font-size: 14px;
  font-weight: 750;
}

.progress-matrix-sticky-grid > span:nth-child(4) {
  justify-content: center;
  text-align: center;
}

.production-flow-matrix th {
  padding: 11px 13px;
  color: var(--progress-ink, var(--muted-strong));
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-subtle);
}

.production-flow-matrix th:nth-child(1) { width: 13%; }
.production-flow-matrix th:nth-child(2) { width: 19%; }
.production-flow-matrix th:nth-child(3) { width: 22%; }
.production-flow-matrix th:nth-child(4) { width: 9%; }
.production-flow-matrix th:nth-child(5) { width: 20%; }
.production-flow-matrix th:nth-child(6) { width: 17%; }

.production-flow-matrix th:nth-child(4) {
  text-align: center;
}

.production-flow-matrix td {
  padding: 11px 13px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.production-flow-matrix tbody tr:hover td {
  background: #f8fbff;
}

.production-flow-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.production-flow-matrix .risk-row-red td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}

.production-flow-matrix .risk-row-yellow td:first-child {
  box-shadow: inset 3px 0 0 var(--progress-attention, var(--yellow));
}

.progress-visual-r9 .production-flow-matrix .risk-row-red td:first-child {
  box-shadow: inset 2px 0 0 var(--progress-risk, var(--red));
}

.progress-visual-r9 .production-flow-matrix .risk-row-yellow td:first-child {
  box-shadow: inset 2px 0 0 var(--progress-attention, var(--yellow));
}

.progress-matrix-order {
  width: 100%;
  min-width: 0;
  align-items: center;
  text-align: left;
}

.progress-matrix-order > span:first-child {
  min-width: 0;
}

.progress-matrix-order strong,
.progress-process-cell > strong,
.progress-matrix-due strong {
  color: var(--progress-ink, var(--ink));
  font-size: 17px;
  line-height: 1.25;
}

.progress-matrix-order small,
.progress-process-cell small,
.progress-matrix-needle small,
.progress-matrix-due small {
  display: block;
  margin-top: 3px;
  color: var(--progress-muted, var(--muted));
  line-height: 1.35;
}

.progress-matrix-order .progress-order-product {
  color: var(--progress-body, var(--muted-strong));
  font-weight: 600;
}

.progress-process-cell .progress-machine-completion {
  color: var(--progress-body, var(--muted-strong));
  font-weight: 600;
}

.progress-process-cell .progress-cut-arrival {
  margin-left: auto;
  color: var(--progress-body, var(--muted-strong));
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.progress-cut-cell > small {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.progress-machine-meta {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.progress-machine-meta small {
  margin-top: 0;
  font-size: 13px;
  letter-spacing: -0.1px;
  white-space: nowrap;
}

.progress-visual-r9 .progress-matrix-order > span:first-child > strong {
  color: var(--progress-ink);
  font-size: 18px;
  font-weight: 700;
}

.progress-visual-r9 .progress-order-product {
  color: var(--progress-body);
  font-size: 14px;
  font-weight: 600;
}

.progress-visual-r9 .progress-matrix-order > span:first-child > small:not(.progress-order-product) {
  color: var(--progress-muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-visual-r9 .progress-process-state {
  color: var(--progress-body);
  font-size: 14px;
  font-weight: 600;
}

.progress-visual-r9 .progress-process-cell > strong {
  color: var(--progress-ink);
  font-size: 18px;
  font-weight: 700;
}

.progress-visual-r9 .progress-process-cell > small,
.progress-visual-r9 .progress-machine-meta > small:not(.progress-machine-completion) {
  color: var(--progress-muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-visual-r9 .progress-machine-completion {
  color: var(--progress-body);
  font-size: 14px;
  font-weight: 600;
}

.progress-visual-r9 .progress-matrix-advancement > span {
  font-size: 12px;
  font-weight: 700;
}

.progress-visual-r9 .progress-matrix-advancement > strong {
  color: var(--progress-ink);
  font-size: 17px;
  font-weight: 700;
}

.progress-visual-r9 .progress-matrix-advancement > small {
  color: var(--progress-muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-visual-r9 .progress-matrix-needle > strong {
  color: var(--progress-ink);
  font-size: 15px;
  font-weight: 600;
}

.progress-visual-r9 .progress-matrix-needle > small {
  color: var(--progress-muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-visual-r9 .progress-matrix-due > span {
  color: var(--progress-body);
  font-size: 14px;
  font-weight: 600;
}

.progress-visual-r9 .progress-matrix-due > strong {
  color: var(--progress-ink);
  font-size: 18px;
  font-weight: 700;
}

.progress-visual-r9 .progress-matrix-due > small {
  color: var(--progress-muted);
  font-size: 13px;
  font-weight: 400;
}

.progress-visual-r9 .progress-matrix-due > .risk-badge {
  font-size: 12px;
  font-weight: 700;
}

.progress-process-cell,
.progress-matrix-needle,
.progress-matrix-due {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
}

.progress-process-state,
.progress-matrix-needle > span,
.progress-matrix-due > span {
  color: var(--progress-body, var(--muted-strong));
  font-size: 14px;
  font-weight: 700;
}

.progress-process-state {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
}

.progress-complete-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--progress-success, var(--green));
}

.progress-process-track {
  display: block;
  height: 5px;
  margin: 3px 0 1px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.progress-process-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #9aa9bc;
}

.progress-process-track.tone-cut b {
  background: #91a7c5;
}

.progress-process-track.tone-machine b {
  background: var(--progress-primary, var(--primary));
}

.progress-process-cell.is-current .progress-process-track b {
  background: var(--progress-primary, var(--primary));
}

.progress-process-cell.is-complete .progress-process-track b {
  background: var(--progress-success, var(--green));
}

.progress-matrix-needle {
  min-height: 62px;
  padding: 4px 0 4px 11px;
  border: 0;
  border-left: 2px solid var(--progress-line, var(--line));
  border-radius: 0;
  background: transparent;
}

.progress-matrix-needle strong {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid var(--progress-line, var(--line));
  border-radius: 6px;
  background: #f8fafc;
}

.progress-matrix-needle.is-current {
  border-left-color: var(--progress-primary, var(--primary));
  background: transparent;
}

.progress-matrix-needle.is-current strong {
  border-color: var(--progress-primary-border, #bfd2f8);
  background: var(--progress-primary-soft, var(--primary-soft));
}

.progress-matrix-needle.is-complete {
  border-left-color: var(--progress-success, var(--green));
  background: transparent;
}

.progress-matrix-needle.is-complete strong {
  border-color: #bbebca;
  background: var(--progress-success-soft, #f0faf4);
}

.progress-visual-r9 .progress-matrix-needle {
  padding-left: 8px;
  border-left-width: 1px;
}

.progress-visual-r9 .progress-matrix-needle > strong {
  padding: 3px 7px;
  font-weight: 600;
}

.progress-visual-r9 .progress-matrix-needle.is-current strong {
  color: var(--progress-body);
  border-color: #dbe7f8;
  background: #f7faff;
}

.progress-visual-r9 .progress-process-cell.is-complete .progress-process-track b {
  opacity: 0.78;
}

.progress-visual-r10 .progress-matrix-needle {
  justify-items: center;
  padding-left: 7px;
  text-align: center;
  border-left-width: 1px;
  border-left-color: var(--progress-line);
  background: transparent;
}

.progress-visual-r10 .progress-matrix-needle > strong,
.progress-visual-r10 .progress-matrix-needle.is-current > strong,
.progress-visual-r10 .progress-matrix-needle.is-complete > strong {
  padding: 0;
  color: var(--progress-body);
  font-weight: 600;
  border: 0;
  background: transparent;
}

.progress-visual-r10 .progress-matrix-needle.is-current {
  border-left-color: var(--progress-primary-border);
}

.progress-visual-r10 .progress-matrix-needle.is-complete {
  border-left-color: #b9d9c2;
}

.progress-visual-r10 .progress-process-cell.is-complete .progress-process-track b {
  opacity: 0.46;
}

.progress-matrix-advancement {
  display: grid;
  width: 100%;
  min-height: 62px;
  align-content: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--progress-ink, var(--ink));
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.progress-matrix-advancement:hover {
  background: #f8fbff;
}

.progress-matrix-advancement:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.progress-matrix-advancement span {
  width: max-content;
  padding: 2px 7px;
  color: var(--progress-primary, var(--primary-dark));
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--progress-primary-soft, var(--primary-soft));
}

.progress-matrix-advancement strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.progress-matrix-advancement small {
  color: var(--muted);
}

.progress-matrix-advancement.tone-red {
  padding-left: 0;
  border-left: 0;
  background: transparent;
}

.progress-matrix-advancement.tone-red span {
  color: var(--progress-risk, var(--red-dark));
  background: var(--progress-risk-soft, #fee8e8);
}

.progress-matrix-advancement.tone-yellow {
  padding-left: 0;
  border-left: 0;
  background: transparent;
}

.progress-matrix-advancement.tone-yellow span {
  color: var(--progress-attention, var(--yellow));
  background: var(--progress-attention-soft, #ffedc2);
}

.progress-visual-r9 .risk-badge.risk-yellow {
  color: var(--progress-attention, var(--yellow));
  background: var(--progress-attention-soft, #fff7ed);
}

.progress-visual-r9 .risk-badge.risk-red {
  color: var(--progress-risk, var(--red));
  background: var(--progress-risk-soft, #fef2f2);
}

.progress-visual-r9 .risk-badge.risk-normal {
  color: var(--progress-success, var(--green-dark));
  background: var(--progress-success-soft, #f0fdf4);
}

.progress-matrix-advancement.tone-complete {
  background: transparent;
}

.progress-matrix-advancement.tone-complete span {
  color: var(--progress-success, var(--green-dark));
  background: var(--progress-success-soft, #dff3e6);
}

.progress-matrix-due {
  position: relative;
  padding-right: 0;
}

.progress-matrix-due > span,
.progress-matrix-due > strong {
  padding-right: 58px;
}

.progress-matrix-due > strong {
  font-variant-numeric: tabular-nums;
}

.progress-matrix-due > .risk-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: max-content;
  margin: 0;
}

.progress-due-secondary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  padding-top: 4px;
  padding-right: 58px;
  border-top: 1px dashed var(--progress-line, var(--line));
}

.progress-due-secondary span {
  color: var(--progress-muted, var(--muted));
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.progress-due-secondary b {
  color: var(--progress-body, var(--muted-strong));
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.progress-matrix-due > .progress-due-basis {
  margin-top: 0;
  color: var(--progress-muted, var(--muted));
  font-size: 12px;
}

.progress-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}

.progress-detail-shell > * { min-width: 0; }

.progress-detail-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.progress-detail-step {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-subtle);
}

.progress-detail-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.progress-detail-step.is-complete {
  color: var(--green-dark);
  border-color: #aad6ba;
  background: #f0faf4;
}

.progress-detail-step.is-complete span {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.progress-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.progress-detail-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 94px;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.progress-detail-grid article > span,
.progress-detail-grid article > small {
  min-width: 0;
  color: var(--muted);
}

.progress-detail-schedule {
  grid-column: 1 / -1;
}

.progress-detail-schedule .product-manager-schedule-list {
  min-width: 0;
}

.progress-field-visibility select {
  min-width: 150px;
}

.progress-column-order {
  margin: 8px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.progress-column-order-heading,
.progress-field-visibility-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-column-order-heading > div:first-child,
.progress-field-visibility-heading {
  min-width: 0;
}

.progress-column-order-heading small,
.progress-field-visibility-heading small,
.progress-column-row td > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.progress-column-order .responsive-table {
  margin-top: 7px;
}

.progress-column-order table {
  min-width: 520px;
}

.progress-column-order td {
  padding-top: 6px;
  padding-bottom: 6px;
}

.progress-column-handle {
  width: 32px;
  color: var(--muted);
  text-align: center;
  cursor: grab;
  user-select: none;
}

.progress-column-row.is-fixed {
  background: var(--surface);
}

.progress-column-row.is-fixed .progress-column-handle {
  cursor: default;
}

.progress-column-row.is-dragging {
  opacity: 0.45;
}

.progress-field-visibility-heading {
  justify-content: flex-start;
  margin: 4px 0 7px;
}

.production-stage {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border: 1px solid #bfd2f8;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.production-stage.stage-machine_needle_parallel {
  color: #875300;
  background: #fff7dd;
  border-color: #f0d083;
}

.production-stage.stage-needle_production {
  color: #6b3fa0;
  background: #f6edff;
  border-color: #d8bdf1;
}

.production-stage.stage-production_completed {
  color: var(--green-dark);
  background: #eaf8f0;
  border-color: #aad6ba;
}

.board-process-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 0.85fr);
  gap: 12px;
  min-width: 0;
}

.machine-needle-board-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.board-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.board-summary-strip > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.board-summary-strip span {
  color: var(--muted);
}

.board-summary-strip strong {
  font-size: 1.4rem;
}

.board-capacity-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.board-capacity-details summary {
  padding: 14px 2px 4px;
  color: var(--primary);
  cursor: pointer;
}

.board-process-panel {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.board-process-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.board-process-heading h3 {
  margin-top: 2px;
  font-size: 18px;
}

.board-process-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.board-process-heading > strong {
  min-width: 48px;
  padding: 7px 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  text-align: center;
}

.needle-board-list {
  display: grid;
  gap: 8px;
}

.needle-board-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(105px, auto);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
}

.needle-board-row .risk-message {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.needle-board-row.risk-red {
  box-shadow: inset 5px 0 var(--red);
}

.needle-board-row.risk-yellow {
  box-shadow: inset 5px 0 var(--yellow);
}

.needle-board-row:hover {
  background: var(--primary-soft);
}

.board-capacity {
  display: grid;
  grid-auto-columns: minmax(120px, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
}

.board-day {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid #8fb0ec;
  border-radius: 5px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.board-day:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.board-day.is-selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.board-day > span,
.board-day > b,
.board-day > small {
  font-size: 13px;
}

.board-day > small {
  color: var(--muted);
}

.board-day > b {
  color: var(--green-dark);
}

.board-day.risk-red {
  background: #fffafa;
  border-top-color: var(--red);
}

.board-day.risk-red > b {
  color: var(--red);
}

.board-day .load-bar {
  background: #e8edf4;
}

.board-orders {
  min-width: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.board-order-head,
.board-order-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) 100px 142px minmax(360px, 1.8fr) minmax(210px, 1fr);
  width: 100%;
  min-width: 1070px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  text-align: left;
}

.board-order-head {
  min-height: 40px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 13px;
}

.board-order-row {
  min-height: 70px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.board-order-row:hover {
  background: var(--primary-soft);
}

.board-order-row.risk-red {
  box-shadow: inset 5px 0 var(--red);
}

.board-order-row.risk-yellow {
  box-shadow: inset 5px 0 var(--yellow);
}

.machine-needle-board-grid .board-orders {
  overflow-x: hidden;
}

.machine-needle-board-grid .board-order-head,
.machine-needle-board-grid .board-order-row {
  grid-template-columns: minmax(120px, 1.35fr) 58px 92px minmax(84px, 0.9fr);
  grid-template-areas:
    "product quantity due risk"
    "schedule schedule schedule schedule";
  min-width: 0;
  gap: 8px;
  padding: 9px 10px;
}

.machine-needle-board-grid .board-order-head > :nth-child(1),
.machine-needle-board-grid .board-order-row > :nth-child(1) {
  grid-area: product;
  min-width: 0;
}

.machine-needle-board-grid .board-order-head > :nth-child(2),
.machine-needle-board-grid .board-order-row > :nth-child(2) {
  grid-area: quantity;
}

.machine-needle-board-grid .board-order-head > :nth-child(3),
.machine-needle-board-grid .board-order-row > :nth-child(3) {
  grid-area: due;
}

.machine-needle-board-grid .board-order-head > :nth-child(4),
.machine-needle-board-grid .board-order-row > :nth-child(4) {
  grid-area: schedule;
}

.machine-needle-board-grid .board-order-head > :nth-child(5),
.machine-needle-board-grid .board-order-row > :nth-child(5) {
  grid-area: risk;
}

.machine-needle-board-grid .board-order-head {
  min-height: 58px;
}

.machine-needle-board-grid .board-order-row {
  min-height: 94px;
}

.machine-needle-board-grid .board-product > span {
  min-width: 0;
}

.machine-needle-board-grid .board-product strong,
.machine-needle-board-grid .board-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.machine-needle-board-grid .board-qty {
  font-size: 24px;
}

.machine-needle-board-grid .plan-dots {
  grid-template-columns: repeat(5, minmax(48px, 1fr));
}

.board-product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-thumb {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.board-product small {
  color: var(--muted);
  font-size: 14px;
}

.board-qty {
  font-size: 28px;
}

.plan-dots {
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 5px;
}

.plan-dots i {
  display: grid;
  gap: 2px;
  padding: 5px;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-style: normal;
  font-size: 12px;
  text-align: center;
}

.risk-message {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.board-order-row.risk-red .risk-message {
  color: var(--red);
}

.board-order-row.risk-yellow .risk-message {
  color: #9a6100;
}

.board-day-summary > span {
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
}

.board-day-summary strong {
  color: var(--ink);
}

.board-focus-list {
  min-width: 0;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.board-day-preview {
  display: grid;
  gap: 8px;
}

.board-preview-heading {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.board-preview-heading > div {
  display: grid;
  gap: 3px;
}

.board-preview-heading p {
  color: var(--muted);
  font-size: 13px;
}

.board-preview-heading > strong {
  color: var(--green-dark);
  font-size: 20px;
}

.board-focus-head,
.board-focus-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) repeat(3, minmax(96px, 0.45fr)) minmax(128px, 0.5fr) minmax(160px, 0.8fr);
  min-width: 930px;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  text-align: left;
}

.board-focus-head {
  color: var(--muted);
  background: var(--surface-subtle);
}

.board-focus-row {
  width: 100%;
  min-height: 86px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.board-focus-row > span > strong {
  white-space: nowrap;
}

.board-focus-row:hover {
  background: var(--primary-soft);
}

.board-focus-row.risk-red {
  box-shadow: inset 5px 0 var(--red);
}

.board-focus-row.risk-yellow {
  box-shadow: inset 5px 0 var(--yellow);
}

.board-focus-row > span:not(.board-product) {
  display: grid;
  gap: 4px;
}

.board-focus-row > span > small {
  color: var(--muted);
}

.board-focus-row > span > strong {
  font-size: 21px;
}

.toolbar-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.responsive-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-subtle);
}

.action-task-list {
  display: grid;
  gap: 10px;
}

.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: start;
}

.today-main {
  min-width: 0;
}

.today-primary-queue {
  padding: 0;
  overflow: hidden;
}

.today-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.today-queue-heading p,
.today-work-order p,
.today-waiting-panel p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.today-filter-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}

.today-filter-tabs button {
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--line-strong);
  cursor: pointer;
}

.today-filter-tabs button:last-child {
  border-right: 0;
}

.today-filter-tabs button.is-active {
  color: var(--cyan);
  background: var(--cyan-soft);
  font-weight: 800;
}

.today-task-list {
  display: grid;
}

.today-task-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.today-task-row:last-child {
  border-bottom: 0;
}

.today-task-rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--yellow);
  border-radius: 50%;
  font-weight: 900;
}

.today-task-row.tone-urgent .today-task-rank {
  background: var(--red);
}

.today-task-main {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.today-task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-task-heading .task-order-link {
  flex-wrap: wrap;
}

.today-task-heading .task-order-link b {
  color: var(--ink);
}

.today-task-reason {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.today-task-reason > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.today-task-reason > strong {
  line-height: 1.45;
}

.today-task-progress {
  display: grid;
  gap: 5px;
}

.today-task-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.today-task-progress > div:first-child strong,
.today-task-progress > div:first-child b {
  color: var(--ink);
}

.today-task-progress-bar {
  height: 5px;
  overflow: hidden;
  background: var(--line);
  border-radius: 999px;
}

.today-task-progress-bar > i {
  display: block;
  height: 100%;
  background: var(--cyan);
  border-radius: inherit;
}

.today-task-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.today-task-foot > small {
  color: var(--muted);
}

.today-side {
  display: grid;
  gap: 12px;
}

.today-work-order,
.today-waiting-panel {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.today-work-order ol {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  list-style: none;
}

.today-work-order li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.today-work-order li span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--yellow);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.today-work-order li:first-child span {
  background: var(--red);
}

.today-work-order li strong {
  font-size: 13px;
  line-height: 1.5;
}

.today-waiting-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.today-waiting-toggle > span {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.today-waiting-toggle small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-waiting-toggle > b {
  flex: 0 0 auto;
  color: var(--cyan);
}

.today-waiting-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.today-waiting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.today-waiting-row > div {
  display: grid;
  gap: 3px;
}

.today-waiting-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.in-process-orders {
  margin-top: 12px;
  padding: 0;
  overflow: hidden;
}

.in-process-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.in-process-heading p {
  margin-top: 4px;
  color: var(--muted);
}

.in-process-heading > strong {
  color: var(--cyan);
  font-size: 18px;
}

.in-process-order-list {
  display: grid;
}

.in-process-order-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) auto minmax(130px, 0.8fr) minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  box-shadow: inset 4px 0 #94a3b8;
}

.in-process-order-row.risk-red { box-shadow: inset 4px 0 var(--red); }
.in-process-order-row.risk-yellow { box-shadow: inset 4px 0 var(--yellow); }

.in-process-order-name {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.in-process-order-name strong { font-size: 15px; }
.in-process-order-name span,
.in-process-order-next small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.in-process-order-progress,
.in-process-order-next {
  display: grid;
  min-width: 0;
  gap: 5px;
  font-size: 13px;
}

.in-process-view-all {
  width: calc(100% - 32px);
  margin: 12px 16px;
}

.incomplete-order-list {
  display: grid;
  gap: 10px;
}

.incomplete-order-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--yellow);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}

.incomplete-order-main { display: grid; gap: 7px; }
.incomplete-order-main h3 { font-size: 19px; }
.incomplete-order-main p,
.incomplete-order-main small { color: var(--muted); }
.missing-field-list { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.missing-field-list span { background: #fff3cf; border-radius: 4px; color: #77510d; font-size: 13px; padding: 4px 7px; }

.action-task-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.action-task-card.tone-urgent {
  border-left-color: var(--red);
  background: #fffafa;
}

.action-task-card.tone-next {
  border-left-color: var(--yellow);
}

.action-task-card.tone-waiting {
  border-left-color: var(--cyan);
  background: var(--surface);
}

.task-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
}

.action-task-main {
  display: grid;
  gap: 4px;
}

.task-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-order-link {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: fit-content;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.task-order-link strong {
  font-size: 17px;
}

.task-order-link span,
.action-task-main small {
  color: var(--muted);
}

.action-task-main p {
  font-weight: 700;
  line-height: 1.5;
}

.task-card-heading,
.task-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-progress-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-progress-summary span,
.task-warning-summary {
  padding: 5px 8px;
  background: var(--surface-subtle);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
}

.task-progress-summary strong {
  color: var(--ink);
}

.task-warning-summary.tone-red {
  color: #8c241f;
  background: var(--red-soft);
}

.task-warning-summary.tone-yellow {
  color: #7e530d;
  background: var(--yellow-soft);
}

.task-warning-summary.is-clear {
  color: var(--green-dark);
  background: var(--green-soft);
}

.workflow-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.progress-breakdown {
  display: grid;
  gap: 12px;
}

.progress-breakdown section {
  display: grid;
  gap: 7px;
}

.progress-breakdown .detail-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warning-group {
  margin-top: 16px;
}

.warning-group > h3 {
  margin-bottom: 8px;
}

.warning-line > div {
  display: grid;
  gap: 5px;
}

.warning-line p {
  line-height: 1.55;
}

.warning-line small,
.return-history {
  color: var(--muted);
  line-height: 1.5;
}

.outsourcing-status-row > div {
  min-width: 0;
}

.return-history {
  overflow-wrap: anywhere;
}

.report-plan-picker {
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.report-plan-choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.report-plan-choice {
  display: grid;
  min-height: 82px;
  gap: 4px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--cyan);
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
}

.report-plan-choice:hover:not(:disabled) {
  border-color: var(--green);
}

.report-plan-choice:disabled {
  cursor: default;
  opacity: 0.65;
}

.report-plan-choice span,
.report-plan-empty {
  color: var(--muted);
  font-size: 13px;
}

.report-plan-choice b {
  color: var(--green-dark);
  font-size: 13px;
}

.report-plan-choice.tone-red {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.report-plan-choice.tone-yellow {
  border-left-color: var(--yellow);
  background: var(--yellow-soft);
}

.report-plan-choice.tone-green {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.report-limit-note {
  padding: 11px 13px;
  color: #694604;
  background: var(--yellow-soft);
  border-left: 4px solid #d79521;
  border-radius: 4px;
  font-weight: 700;
  line-height: 1.55;
}

.unmatched-plan-reports {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  color: #694604;
  background: var(--yellow-soft);
  border-left: 5px solid #d79521;
  border-radius: 5px;
}

.unmatched-plan-reports > div {
  display: grid;
  gap: 4px;
}

.unmatched-plan-report-dates {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px !important;
}

.unmatched-plan-report-dates span {
  padding: 5px 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e7cf9f;
  border-radius: 4px;
  font-weight: 700;
}

.unmatched-plan-report-action {
  align-self: center;
  margin-left: auto;
  white-space: nowrap;
}

dialog.app-dialog.dialog-resolution {
  width: min(760px, calc(100vw - 32px));
}

.unplanned-report-resolution {
  display: grid;
  gap: 14px;
}

.unplanned-resolution-option {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.historical-attribution-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  color: #704b00;
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 5px;
}

.historical-attribution-preview > div {
  display: grid;
  gap: 3px;
}

.historical-attribution-preview ul,
.historical-attribution-preview small {
  grid-column: 1 / -1;
  margin: 0;
}

.historical-attribution-preview ul {
  display: grid;
  gap: 5px;
  padding: 8px 0 0;
  list-style: none;
  border-top: 1px solid #ead7a6;
}

.historical-attribution-preview li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.unplanned-report-correction-form {
  padding-top: 4px;
}

.plan-input-row {
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.7fr) 40px;
}

.schedule-date-context {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  margin: 0 0 6px;
  padding: 0;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.schedule-date-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px 8px;
}

.schedule-date-metric {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 4px 11px;
  border-left: 1px solid var(--line);
}

.schedule-date-metric:first-child {
  border-left: 0;
}

.schedule-date-metric > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.schedule-date-metric > strong {
  color: #2f704f;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  white-space: nowrap;
}

.schedule-date-metric > small {
  line-height: 1.35;
}

.schedule-date-metric.has-risk > strong,
.schedule-date-metric.has-risk > small {
  color: var(--red);
}

.schedule-date-warning {
  padding: 8px 12px;
  color: var(--red);
  background: var(--red-soft);
  border-top: 1px solid #f0c5c5;
  font-size: 12px;
  font-weight: 700;
}

.schedule-day-orders,
.schedule-day-orders-empty {
  border-top: 1px solid var(--line);
}

.schedule-day-orders > summary,
.schedule-day-orders-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.schedule-day-orders > summary::-webkit-details-marker {
  display: none;
}

.schedule-day-orders > summary::before {
  content: "›";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 20px;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}

.schedule-day-orders[open] > summary::before {
  transform: rotate(90deg);
}

.schedule-day-orders > summary span {
  flex: 1;
}

.schedule-day-orders > summary b {
  color: var(--primary);
  font-size: 12px;
}

.schedule-day-orders > summary b em {
  display: none;
  font-style: normal;
}

.schedule-day-orders[open] > summary b i {
  display: none;
}

.schedule-day-orders[open] > summary b em {
  display: inline;
}

.schedule-day-orders > div {
  display: grid;
  gap: 5px;
  padding: 0 12px 10px;
}

.schedule-day-orders-empty {
  color: var(--muted);
  cursor: default;
}

.schedule-day-order {
  display: grid;
  gap: 3px;
  padding: 6px 8px;
  background: var(--surface-subtle);
  border-left: 3px solid var(--line-strong);
}

.schedule-day-dialog-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-day-dialog-entry > .button {
  margin-right: 10px;
}

.schedule-day-dialog-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(100px, 0.4fr));
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.schedule-day-dialog-row:hover {
  background: var(--primary-soft);
}

.schedule-day-dialog-row > span {
  display: grid;
  gap: 3px;
}

.schedule-day-dialog-row small {
  color: var(--muted);
}

.day-capacity-summary,
.board-day-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.day-capacity-summary > span,
.board-day-summary > span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 5px;
}

.day-capacity-summary > span {
  background: var(--surface-subtle);
}

.day-capacity-summary strong,
.board-day-summary strong {
  font-size: 19px;
}

.capacity-day-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(170px, 1fr);
  gap: 7px;
  min-width: 440px;
}

.capacity-day-form label {
  display: grid;
  gap: 3px;
}

.capacity-day-form label > span,
.capacity-day-form .form-error {
  color: var(--muted);
  font-size: 12px;
}

.capacity-day-form input {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.capacity-day-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.capacity-day-form .form-error {
  grid-column: 1 / -1;
  color: var(--red);
}

.workflow-step {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 8px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 6px;
}

.workflow-step span {
  display: grid;
  flex: 0 0 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 800;
}

.workflow-step.is-done {
  color: var(--green-dark);
  background: var(--green-soft);
}

.workflow-step.is-done span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.workflow-step.is-current {
  color: var(--ink);
  background: var(--yellow-soft);
  box-shadow: inset 0 0 0 2px #d9a536;
}

.next-action-callout {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--primary-soft);
  border: 1px solid #bfd2f8;
  border-radius: 8px;
}

.next-action-callout div {
  display: grid;
  gap: 4px;
}

.next-action-callout span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.insight-grid,
.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.health-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plain-stat-list,
.health-grid > div {
  display: grid;
  gap: 7px;
}

.plain-stat-list > div,
.health-grid > div {
  padding: 10px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.plain-stat-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.schedule-stat-link {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.schedule-stat-link:hover {
  background: var(--primary-soft);
  border-color: #9ab6ee;
}

.schedule-stat-link > span {
  display: grid;
  gap: 2px;
}

.schedule-stat-link small {
  color: var(--primary-dark);
  font-size: 12px;
}

.schedule-stat-link strong {
  color: var(--primary-dark);
  white-space: nowrap;
  font-size: 20px;
}

.plain-stat-list strong,
.health-grid strong {
  font-size: 20px;
}

.health-grid span,
.health-grid small {
  color: var(--muted);
}

.compact-details {
  padding-block: 11px;
}

.compact-details summary {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.compact-details summary::-webkit-details-marker {
  display: none;
}

.compact-details summary::after {
  color: var(--primary-dark);
  content: "展开 ▼";
  font-size: 13px;
}

.compact-details[open] summary::after {
  content: "收起 ▲";
}

.compact-details summary small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
}

.compact-details-body {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.definition-panel ul {
  margin: 0 0 12px;
  padding-left: 22px;
  line-height: 1.8;
}

.definition-panel > p,
.compact-details-body > p {
  color: var(--yellow);
  font-weight: 700;
}

.audit-list {
  display: grid;
  gap: 8px;
}

.audit-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.audit-card div {
  display: grid;
  gap: 4px;
}

.audit-card span,
.audit-card p {
  color: var(--muted);
}

.audit-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.audit-table {
  min-width: 680px;
}

.audit-table th:first-child,
.audit-table td:first-child {
  width: 140px;
}

.audit-table th:last-child,
.audit-table td:last-child {
  width: 190px;
  white-space: nowrap;
}

.audit-table td:nth-child(2) {
  line-height: 1.5;
}

.audit-operation {
  display: grid;
  gap: 5px;
}

.audit-operation-summary,
.audit-operation-reason {
  color: var(--muted);
}

.audit-personal-details {
  width: 100%;
}

.audit-personal-details > summary {
  width: fit-content;
  color: var(--primary-dark);
  font-weight: 700;
  cursor: pointer;
}

.audit-personal-assignment-list {
  display: grid;
  gap: 1px;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.audit-personal-assignment {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 70px minmax(280px, 1.7fr);
  gap: 12px;
  align-items: center;
  padding: 7px 9px;
  background: var(--surface);
}

.audit-personal-assignment span,
.audit-personal-assignment small {
  color: var(--muted);
}

.audit-version-group + .audit-version-group {
  margin-top: 16px;
}

.audit-version-group > h4 {
  margin: 0 0 8px;
  color: var(--ink);
}

@media (max-width: 680px) {
  .audit-personal-assignment {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
  }

  .audit-personal-assignment small {
    grid-column: 1 / -1;
  }
}

.status-active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-disabled {
  color: var(--muted);
  background: #ecefee;
}

.import-guidance {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.import-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.import-summary strong {
  font-size: 18px;
}

.import-summary.is-ready {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #b6d9c5;
}

.import-summary.has-errors {
  color: #8c241f;
  background: var(--red-soft);
  border-color: #efb8b4;
}

.import-preview-table {
  max-height: 52vh;
}

.quality-issue-list {
  display: grid;
  gap: 8px;
}

.quality-issue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--yellow);
  border-radius: 7px;
}

.quality-issue-card > div:first-child {
  display: grid;
  gap: 5px;
}

.quality-issue-card p {
  font-weight: 700;
}

.quality-issue-card small {
  color: var(--muted);
}

.report-plan-hint {
  padding: 12px 14px;
  line-height: 1.55;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.report-plan-hint.is-neutral {
  color: var(--muted);
  background: var(--surface-subtle);
}

.report-plan-hint.is-linked {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #b6d9c5;
}

.report-plan-hint.has-warning {
  color: #7e530d;
  background: var(--yellow-soft);
  border-color: #e7c66e;
}

.allocation-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 6px;
}

.allocation-templates span {
  margin-right: auto;
  font-weight: 700;
}

dialog.dialog-order-detail {
  width: min(1320px, calc(100vw - 28px));
}

.dialog-order-detail .dialog-body {
  padding: 12px;
}

dialog.dialog-schedule-workspace {
  width: min(1440px, calc(100vw - 18px));
  max-height: calc(100vh - 18px);
}

.dialog-schedule-workspace .dialog-body {
  max-height: calc(100vh - 84px);
  padding: 0;
}

.order-detail-shell {
  display: grid;
  gap: 8px;
}

.order-detail-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}

.order-detail-command-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.order-detail-primary-timeline {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--muted);
}

.order-detail-primary-timeline small { font-size: 12px; }
.order-detail-primary-timeline strong { color: var(--ink); font-size: 15px; }

.order-detail-current-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  color: #263b69;
  background: #f3f7ff;
  border: 1px solid #cbd9fb;
  border-radius: 7px;
}

.order-detail-current-summary > span:last-child { display: grid; min-width: 0; gap: 2px; }
.order-detail-current-summary > span:last-child > small { color: #48618f; font-size: 11px; font-weight: 800; }
.order-detail-current-summary strong { color: var(--ink); }

.order-detail-current-summary.is-idle {
  color: #526173;
  background: var(--surface-subtle);
  border-color: var(--line);
}

.order-detail-current-summary.is-idle .order-detail-summary-icon {
  background: #728197;
}

.order-detail-summary-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.order-detail-status-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  color: var(--muted);
}

.order-detail-status-line > span:last-child {
  margin-left: auto;
}

.order-detail-status-line b {
  color: var(--ink);
}

.inactive-profile-status {
  padding: 4px 7px;
  color: #77510d;
  background: var(--yellow-soft);
  border: 1px solid #f0c979;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.inactive-profile-notice {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: #704b00;
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 5px;
}

.inactive-profile-notice span {
  line-height: 1.5;
}

.quote-pending-notice {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: #704b00;
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 5px;
}

.quote-pending-notice span {
  line-height: 1.5;
}

.order-detail-decision {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--blue-soft);
  border: 1px solid #cbd9fb;
  border-radius: 7px;
}

.order-detail-decision > div:first-child {
  display: grid;
  gap: 4px;
}

.order-detail-decision > div:first-child > span {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.order-detail-decision > div:first-child > strong {
  font-size: 16px;
  line-height: 1.45;
}

.order-detail-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.order-detail-action-group .button {
  white-space: nowrap;
}

.order-detail-cut-receipt-action {
  color: var(--primary-dark);
  background: #fff;
  border-color: var(--primary);
}

.order-detail-cut-receipt-action:hover:not(:disabled),
.order-detail-cut-receipt-action:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary-dark);
}

.order-detail-alert-zone {
  grid-column: 1 / -1;
  min-width: 0;
  position: relative;
}

.order-detail-alert-empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  color: #4f6b59;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 5px;
  font-size: 12px;
}

.order-detail-alert-shelf {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.order-detail-alert-slot {
  flex: 0 0 auto;
  min-width: 0;
}

.order-detail-alert {
  display: inline-grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  width: max-content;
  min-width: 250px;
  max-width: min(340px, 100%);
  min-height: 70px;
  gap: 9px;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  white-space: normal;
  background: #fffafa;
  border: 1px solid #f1d7d9;
  border-radius: 8px;
  cursor: pointer;
}

.order-detail-alert:hover,
.order-detail-alert:focus-visible {
  border-color: #9eb7ee;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
  outline: none;
}

.order-detail-alert-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.order-detail-alert-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-alert-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-alert-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}

.order-detail-alert-arrow {
  color: #576579;
  font-size: 25px;
  line-height: 1;
}

.order-detail-alert.tone-red { border-color: #f1d7d9; }
.order-detail-alert.tone-orange,
.order-detail-alert.tone-yellow { background: #fffaf2; border-color: #f1dfbf; }
.order-detail-alert.tone-orange .order-detail-alert-icon,
.order-detail-alert.tone-yellow .order-detail-alert-icon { background: #d98719; }
.order-detail-alert.tone-green { background: #f4fbf6; border-color: #cfe7d6; }
.order-detail-alert.tone-green .order-detail-alert-icon { background: var(--green); }

.order-detail-alert-overflow {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
}

.order-detail-alert-overflow-trigger {
  height: 100%;
  min-height: 70px;
  padding: 0 12px;
  color: var(--primary);
  background: #fff;
  border: 1px solid #b9cbef;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.order-detail-alert-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 48px));
  max-height: min(440px, 60vh);
  overflow: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}

.order-detail-alert-popover[hidden] { display: none; }
.order-detail-alert-popover-head { display: flex; justify-content: space-between; gap: 12px; padding: 2px 2px 9px; border-bottom: 1px solid var(--line); }
.order-detail-alert-popover-head span { color: var(--muted); font-size: 11px; }
.order-detail-alert-popover-list { display: grid; gap: 8px; padding-top: 9px; }
.order-detail-alert-popover-list > span { display: block; }
.order-detail-alert-popover-list > span[hidden] { display: none; }
.order-detail-alert-popover .order-detail-alert { width: 100%; max-width: none; }

.order-detail-core-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-detail-core-metrics > span {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 9px 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.order-detail-core-metrics > span + span { border-left: 1px solid var(--line); }
.order-detail-core-metrics > span > span { display: grid; min-width: 0; gap: 3px; }

.order-detail-core-metrics strong {
  color: var(--ink);
  font-size: 23px;
}

.order-detail-metric-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: var(--primary);
  background: #eef4ff;
  border-radius: 9px;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.order-detail-metric-icon.tone-green {
  color: var(--green-dark);
  background: var(--green-soft);
}

.order-detail-metric-link {
  justify-self: start;
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.order-detail-cut-receipts[hidden] { display: none; }

.order-detail-tab-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 8px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}

.order-detail-schedule-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 2px 4px 9px;
  border-bottom: 1px solid var(--line);
}

.order-detail-schedule-context > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.order-detail-schedule-context > div:first-child > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-right: 12px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}

.order-detail-schedule-context > div:first-child > span strong { color: var(--ink); font-size: 15px; }

.order-detail-time-help { position: relative; }
.order-detail-time-help > summary { color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; white-space: nowrap; }
.order-detail-time-help > summary::-webkit-details-marker { display: none; }
.order-detail-time-help > p {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(420px, calc(100vw - 64px));
  margin: 0;
  padding: 10px 12px;
  color: #42526a;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
  font-size: 12px;
  line-height: 1.55;
}

.order-detail-more-management { position: relative; }
.order-detail-more-management > summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  white-space: nowrap;
}

.order-detail-more-management > summary::-webkit-details-marker { display: none; }
.order-detail-more-management > div {
  position: absolute;
  z-index: 24;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
}

.order-detail-more-management > div .button,
.order-detail-more-management > div .link-button { width: 100%; min-height: 34px; justify-content: flex-start; text-align: left; }

.order-detail-tabs button b {
  margin-left: 4px;
  color: inherit;
  font-size: 12px;
}

.cut-receipt-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cut-receipt-summary > summary,
.cut-receipt-summary.is-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 12px;
}

.cut-receipt-summary > summary {
  cursor: pointer;
}

.cut-receipt-summary > summary > span,
.cut-receipt-summary.is-empty > div {
  display: grid;
  gap: 3px;
}

.cut-receipt-summary > summary small,
.cut-receipt-summary.is-empty span,
.cut-receipt-row span {
  color: var(--muted);
  font-size: 12px;
}

.cut-receipt-summary > summary > b {
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
}

.cut-receipt-collapse-label { display: none; }
.cut-receipt-summary[open] .cut-receipt-expand-label { display: none; }
.cut-receipt-summary[open] .cut-receipt-collapse-label { display: block; }

.cut-receipt-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.cut-receipt-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(250px, 1fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.cut-receipt-row.is-cancelled {
  color: #667085;
  background: #f8fafc;
}

.cut-receipt-row.is-cancelled b { color: #667085; }

.cut-receipt-row.is-current-responsibility {
  background: #f4f8ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.current-responsibility-label {
  display: inline-flex;
  margin-right: 6px;
  padding: 2px 5px;
  color: var(--primary-dark) !important;
  background: var(--primary-soft);
  border-radius: 3px;
  font-size: 10px !important;
  font-weight: 900;
}

.cut-receipt-row + .cut-receipt-row {
  border-top: 1px solid var(--line);
}

.cut-receipt-row > div {
  display: grid;
  gap: 3px;
}

.cut-receipt-row > div:last-child {
  justify-items: end;
  text-align: right;
}

.cut-receipt-row b {
  color: var(--primary-dark);
  font-size: 12px;
}

.cut-receipt-row .link-button {
  margin-top: 2px;
  font-size: 12px;
}

.cut-receipt-history-archive {
  border-top: 1px solid var(--line);
}

.cut-receipt-history-archive > summary {
  padding: 8px 12px;
  color: var(--muted);
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.cut-receipt-history-archive > .cut-receipt-list {
  border-top: 1px solid var(--line);
}

.text-green { color: var(--green-dark) !important; }
.text-red { color: var(--red) !important; }
.text-blue { color: var(--primary) !important; }

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.order-detail-main {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.order-detail-management-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.order-detail-management-bar > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 170px;
}

.order-detail-management-bar > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.order-detail-management-bar .order-detail-secondary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.order-detail-management-bar .order-detail-secondary-actions .button,
.order-detail-management-bar .order-detail-secondary-actions .link-button {
  white-space: nowrap;
}

.is-alert-target {
  position: relative;
  z-index: 1;
  border-color: #2f6fed !important;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18), 0 6px 18px rgba(47, 111, 237, 0.12);
  outline: none;
}

[data-order-date-key].is-alert-target {
  padding: 4px 6px;
  margin: -4px -6px;
  background: #eef4ff;
  border-radius: 5px;
}

.order-detail-tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
  padding: 0 10px;
  overflow-x: auto;
  background: transparent;
  border-bottom: 0;
  scrollbar-width: none;
}

.order-detail-tab-strip > .order-detail-more-management {
  flex: 0 0 auto;
}

.order-detail-tabs::-webkit-scrollbar { display: none; }

.order-detail-tabs button {
  min-height: 44px;
  padding: 0 12px;
  color: #475569;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.order-detail-tabs button[aria-selected="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.order-detail-panel {
  min-height: 0;
  padding: 8px;
}

.order-detail-recent-reports {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}

.order-detail-recent-reports > summary {
  padding: 11px 13px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.order-detail-recent-reports > div {
  padding: 0 12px 12px;
}

.order-detail-supervisor {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.production-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-overview-heading > span {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.order-detail-supervisor section {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.order-detail-supervisor section > span,
.order-detail-supervisor section > small,
.order-detail-supervisor p {
  color: var(--muted);
  line-height: 1.5;
}

.order-detail-supervisor section > strong {
  color: var(--primary);
  font-size: 19px;
}

.order-detail-supervisor h4 {
  font-size: 13px;
}

.supervisor-progress {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.production-progress-track {
  height: 7px;
  overflow: hidden;
  background: #dfe5ee;
  border-radius: 999px;
}

.production-progress-track i {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.production-allocation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.production-allocation-grid > span {
  display: grid;
  gap: 2px;
  padding: 8px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.production-allocation-grid strong {
  color: var(--ink);
  font-size: 15px;
}

.production-allocation-grid .has-warning {
  background: var(--yellow-soft);
  border-color: #efd89c;
}

.production-management {
  gap: 8px !important;
}

.order-detail-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.order-detail-secondary-actions .link-button {
  grid-column: 1 / -1;
  justify-self: center;
}

.order-detail-mobile-action {
  display: none;
}

.schedule-workspace {
  display: grid;
  grid-template-rows: auto auto auto minmax(min-content, 1fr) auto;
  align-content: start;
  gap: 14px;
  min-height: calc(100vh - 86px);
  padding: 16px 18px 0;
}

.personal-plan-dialog.schedule-workspace {
  grid-template-rows: auto auto auto;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px 0;
}

@media (min-width: 901px) {
  .personal-plan-dialog .personal-plan-editor {
    min-height: var(--personal-adjustment-height);
    align-content: start;
  }
}

.personal-plan-dialog .schedule-state-line {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}

.personal-plan-dialog .schedule-stepper > span {
  min-height: 34px;
  gap: 6px;
  border-bottom-width: 2px;
  font-size: 13px;
}

.personal-plan-dialog .schedule-stepper b {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.personal-plan-dialog .schedule-summary-compact span {
  min-height: 42px;
  gap: 1px;
  padding: 4px 8px;
}

.personal-plan-dialog .schedule-summary-compact strong { font-size: 18px; }

.personal-plan-dialog .schedule-workspace-grid,
.personal-plan-dialog .schedule-editor-panel {
  gap: 8px;
}

.personal-plan-dialog .schedule-workspace-grid {
  padding-bottom: 56px;
}

.personal-plan-dialog .schedule-primary-heading {
  min-height: 36px;
  padding: 4px 9px;
}

.personal-plan-dialog .schedule-primary-heading small {
  font-size: 11px;
}

.personal-plan-dialog .schedule-draft-note {
  gap: 2px 8px;
  margin-bottom: 0;
  padding: 4px 8px;
  font-size: 11px;
}

.personal-plan-dialog .form-stack {
  gap: 6px;
}

.personal-plan-dialog .personal-plan-change-reason {
  max-width: 600px;
  margin: 4px 10px 10px;
}

.personal-plan-dialog .personal-plan-change-reason[hidden] { display: none; }

.personal-plan-dialog .schedule-primary-panel > summary {
  min-height: 36px;
  padding: 4px 9px;
}

.personal-plan-dialog .personal-plan-guidance {
  padding: 5px 8px;
  font-size: 11px;
}

.personal-plan-dialog .personal-assignment-head span { padding-block: 5px; }

.personal-plan-dialog .schedule-sticky-actions {
  margin-inline: -12px;
  padding: 8px 12px;
}

.schedule-workspace .schedule-state-line {
  margin: 0;
}

.schedule-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.schedule-stepper > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  border-bottom: 3px solid var(--line);
  font-weight: 700;
}

.schedule-stepper b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.schedule-stepper .is-done { color: var(--green-dark); border-bottom-color: var(--green); }
.schedule-stepper .is-active { color: var(--primary); border-bottom-color: var(--primary); }
.schedule-stepper .is-active b { color: #fff; background: var(--primary); border-color: var(--primary); }
.schedule-stepper .is-ready { color: var(--ink); border-bottom-color: #9eb7f0; }

.schedule-summary-compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-summary-compact span {
  min-height: 66px;
  background: #fff;
}

.schedule-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 14px;
}

.schedule-editor-panel {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.schedule-allocation-panel,
.schedule-past-plans-panel,
.schedule-outsourcing-panel,
.schedule-edit-section,
.schedule-context-panel > section,
.schedule-context-panel > details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.schedule-primary-panel {
  border-color: #cbd5e1;
  box-shadow: inset 3px 0 0 #94a3b8;
}

.schedule-allocation-panel > summary,
.schedule-past-plans-panel > summary,
.legacy-adoption-panel > summary,
.schedule-outsourcing-panel > summary,
.schedule-plan-notes > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.schedule-primary-panel > summary,
.schedule-primary-heading {
  min-height: 46px;
  padding: 8px 12px;
  background: #f8fafc;
}

.schedule-allocation-panel > summary::-webkit-details-marker,
.schedule-past-plans-panel > summary::-webkit-details-marker,
.legacy-adoption-panel > summary::-webkit-details-marker,
.schedule-outsourcing-panel > summary::-webkit-details-marker,
.schedule-plan-notes > summary::-webkit-details-marker {
  display: none;
}

.schedule-allocation-panel > summary span,
.schedule-past-plans-panel > summary span,
.legacy-adoption-panel > summary span,
.schedule-outsourcing-panel > summary span {
  display: grid;
  gap: 3px;
}

.schedule-primary-panel > summary span {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.schedule-allocation-panel > summary small,
.schedule-past-plans-panel > summary small,
.legacy-adoption-panel > summary small,
.schedule-outsourcing-panel > summary small {
  color: var(--muted);
}

.schedule-allocation-panel > summary b,
.schedule-past-plans-panel > summary b,
.legacy-adoption-panel > summary b,
.schedule-outsourcing-panel > summary b {
  color: var(--primary);
  font-size: 13px;
}

.schedule-primary-panel > summary strong,
.schedule-primary-heading strong {
  color: var(--text);
  font-size: 15px;
}

.schedule-allocation-panel[open] > summary,
.schedule-past-plans-panel[open] > summary,
.legacy-adoption-panel[open] > summary,
.schedule-outsourcing-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.schedule-allocation-panel .allocation-templates,
.schedule-allocation-panel form,
.legacy-adoption-panel form,
.schedule-outsourcing-panel form,
.schedule-outsourcing-panel .outsourcing-line,
.schedule-outsourcing-panel .empty-state {
  margin-inline: 14px;
}

.schedule-allocation-panel form,
.legacy-adoption-panel form,
.schedule-outsourcing-panel form {
  padding-block: 14px;
}

.legacy-adoption-form { gap: 10px; }
.legacy-adoption-list { display: grid; gap: 7px; }
.legacy-adoption-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.legacy-adoption-row input { width: auto; margin-top: 3px; }
.legacy-adoption-row span { display: grid; gap: 2px; }
.legacy-adoption-row small { color: var(--muted); font-weight: 400; }

.schedule-allocation-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 !important;
  padding: 9px 12px !important;
}

.schedule-allocation-form > label {
  display: flex;
  flex: 0 1 210px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-allocation-form > label > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.schedule-allocation-form input {
  min-width: 0;
  height: 38px;
}

.schedule-allocation-form .allocation-reason {
  flex: 1 1 250px;
}

.allocation-quick-actions {
  display: flex;
  gap: 6px;
}

.schedule-allocation-form > .button-primary {
  min-width: 96px;
}

.schedule-allocation-form .form-error {
  flex: 1 0 100%;
  margin: 0;
}

.schedule-allocation-form .form-error:empty {
  display: none;
}

.schedule-edit-section {
  padding: 0;
}

.schedule-primary-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-section-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.schedule-section-toggle > span {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.schedule-section-toggle small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-section-toggle b {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 13px;
}

.schedule-internal-body {
  padding: 10px 12px 12px;
}

.schedule-internal-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 7px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 5px;
  font-size: 13px;
}

.schedule-internal-guidance.has-warning {
  color: #77510d;
  background: var(--yellow-soft);
}

.schedule-outsourcing-body {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}

.schedule-outsourcing-body[hidden] {
  display: none;
}

.schedule-outsourcing-guidance {
  padding: 7px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 5px;
  font-size: 13px;
}

.schedule-outsourcing-guidance.has-warning {
  color: #77510d;
  background: var(--yellow-soft);
}

.schedule-outsourcing-create,
.schedule-outsourcing-completed {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-outsourcing-create > summary,
.schedule-outsourcing-completed > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 11px;
  cursor: pointer;
  list-style: none;
}

.schedule-outsourcing-create > summary::-webkit-details-marker,
.schedule-outsourcing-completed > summary::-webkit-details-marker {
  display: none;
}

.schedule-outsourcing-create > summary span,
.schedule-outsourcing-completed > summary span {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.schedule-outsourcing-create > summary small,
.schedule-outsourcing-completed > summary small {
  color: var(--muted);
}

.schedule-outsourcing-create > summary b,
.schedule-outsourcing-completed > summary b {
  color: var(--primary);
  font-size: 13px;
}

.schedule-outsourcing-create[open] > summary,
.schedule-outsourcing-completed[open] > summary {
  border-bottom: 1px solid var(--line);
}

.schedule-outsourcing-form {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) 110px minmax(160px, 0.9fr) minmax(140px, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin: 0 !important;
  padding: 10px !important;
}

.schedule-outsourcing-form > label {
  min-width: 0;
}

.schedule-outsourcing-form input {
  min-width: 0;
  height: 38px;
}

.schedule-outsourcing-form > .button {
  min-width: 90px;
}

.schedule-outsourcing-form .form-error {
  grid-column: 1 / -1;
  margin: 0;
}

.schedule-outsourcing-form .form-error:empty {
  display: none;
}

.schedule-outsourcing-empty {
  padding: 10px 11px;
  color: var(--muted);
  font-size: 13px;
}

.schedule-outsourcing-current {
  display: grid;
  gap: 7px;
}

.schedule-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.schedule-subsection-heading strong {
  color: var(--text);
}

.schedule-outsourcing-task-list {
  display: grid;
  gap: 7px;
  padding: 8px;
}

.schedule-outsourcing-current > .schedule-outsourcing-task-list {
  padding: 0;
}

.schedule-outsourcing-task {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 5px;
}

.schedule-outsourcing-task.tone-green { border-left-color: var(--green); }
.schedule-outsourcing-task.tone-yellow { border-left-color: var(--yellow); }
.schedule-outsourcing-task.tone-red { border-left-color: var(--red); }

.schedule-outsourcing-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-outsourcing-task-head > div {
  display: grid;
  gap: 2px;
}

.schedule-outsourcing-task-head span {
  color: var(--muted);
  font-size: 13px;
}

.schedule-outsourcing-task-head b {
  color: var(--muted);
  font-size: 12px;
}

.schedule-outsourcing-task-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.schedule-outsourcing-task-facts span {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--surface-subtle);
  font-size: 12px;
}

.schedule-outsourcing-task-facts strong {
  color: var(--text);
  font-size: 15px;
}

.schedule-outsourcing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.product-manager-schedule-chip small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.schedule-past-plans-panel {
  margin-bottom: 8px;
  background: #fff;
  border-color: var(--line);
}

.schedule-history-issues {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--yellow-soft);
  border: 1px solid #f0c979;
  border-left: 4px solid var(--yellow);
  border-radius: 7px;
}

.schedule-history-issues > div:first-child {
  display: grid;
  gap: 3px;
}

.schedule-history-issues small {
  color: #77510d;
}

.schedule-history-issues .schedule-past-plan-list {
  padding: 0;
}

.schedule-past-plan-list {
  display: grid;
  gap: 8px;
  padding: 10px 14px 14px;
}

.schedule-past-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 5px;
}

.schedule-past-plan-row > div {
  display: grid;
  gap: 3px;
}

.schedule-past-plan-row > div:last-child {
  justify-items: end;
}

.schedule-past-plan-row span,
.schedule-past-plan-row b {
  color: var(--muted);
  font-size: 13px;
}

.schedule-past-plan-row.has-risk {
  background: #fff;
  border-left-color: var(--yellow);
}

.schedule-past-plan-row.has-risk.tone-red {
  border-left-color: var(--red);
}

.schedule-link-reports {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  color: inherit;
  background: var(--yellow-soft);
  border: 1px solid #ead7a6;
  border-radius: 5px;
}

.schedule-link-reports input {
  width: auto;
  margin-top: 3px;
}

.schedule-link-reports span {
  display: grid;
  gap: 3px;
}

.schedule-link-reports small {
  color: var(--muted);
}

.plan-overproduction {
  color: #704b00;
  background: var(--yellow-soft);
  border-color: var(--yellow);
}

.historical-reconciliation-note {
  padding: 10px 12px;
  color: #704b00;
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 5px;
  line-height: 1.5;
}

.plan-input-row.is-historical-reconciliation {
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
}

.locked-plan-date {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  color: #77510d;
  background: #fff3cf;
  border: 1px solid #f0c979;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.schedule-plan-head {
  display: grid;
  grid-template-columns: 150px 120px minmax(280px, 1fr) 40px;
  gap: 10px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-bottom: 0;
  font-size: 12px;
  font-weight: 700;
}

.schedule-plan-form .plan-input-row {
  grid-template-columns: 150px 120px minmax(280px, 1fr) 40px;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.schedule-plan-form .plan-input-row.is-selected {
  position: relative;
  z-index: 1;
  background: var(--primary-soft);
  box-shadow: inset 4px 0 0 var(--primary), inset 0 0 0 1px var(--primary);
}

.schedule-plan-form .plan-input-row.has-open-calendar {
  position: relative;
  z-index: 70;
}

.schedule-plan-form .plan-input-row + .plan-input-row {
  border-top: 0;
}

.schedule-plan-form .plan-input-row > label:nth-child(1) { grid-column: 1; grid-row: 1; }
.schedule-plan-form .plan-input-row > label:nth-child(2) { grid-column: 2; grid-row: 1; }
.schedule-plan-form .plan-input-row > .icon-button,
.schedule-plan-form .plan-input-row > .locked-plan-date { grid-column: 4; grid-row: 1; }
.schedule-plan-form .schedule-date-context { grid-column: 3; grid-row: 1; margin: 0; }

.schedule-plan-notes {
  margin-top: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-plan-notes > summary {
  min-height: 42px;
  padding: 7px 10px;
  color: #475569;
  font-weight: 700;
}

.schedule-plan-notes > summary span {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.schedule-plan-notes > summary small {
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-plan-notes > summary b {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 13px;
}

.schedule-plan-notes[open] > summary {
  border-bottom: 1px solid var(--line);
}

.schedule-plan-notes .form-grid {
  padding: 10px;
}

.schedule-context-panel {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
}

.schedule-context-panel > section,
.schedule-context-panel > details {
  padding: 13px;
}

.schedule-confirmation-card {
  border-left: 4px solid var(--line-strong) !important;
}

.schedule-confirmation-card.tone-warning {
  background: var(--yellow-soft);
  border-left-color: var(--yellow) !important;
}

.schedule-confirmation-card.tone-error {
  background: var(--red-soft);
  border-left-color: var(--red) !important;
}

.schedule-confirmation-card.tone-ready {
  background: var(--green-soft);
  border-left-color: var(--green) !important;
}

.schedule-confirmation-result {
  display: grid;
  gap: 4px;
  margin-top: 9px;
}

.schedule-confirmation-result strong {
  color: var(--ink);
  font-size: 19px;
}

.schedule-confirmation-result small {
  color: var(--muted);
  line-height: 1.45;
}

.schedule-confirmation-card .schedule-check-list {
  padding-top: 9px;
  border-top: 1px solid rgba(107, 122, 145, 0.18);
}

.schedule-confirmation-card .schedule-check-list i {
  font-style: normal;
}

.schedule-deadline-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}

.schedule-deadline-list > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.schedule-deadline-list > span:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.schedule-deadline-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.schedule-deadline-list b {
  font-size: 12px;
}

.schedule-deadline-list .tone-red { color: var(--red); }
.schedule-deadline-list .tone-yellow { color: #9a6700; }
.schedule-deadline-list .tone-neutral { color: var(--muted); }

.schedule-current-plan-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.schedule-current-plan-panel > summary::-webkit-details-marker { display: none; }

.schedule-current-plan-panel > summary span {
  display: grid;
  gap: 2px;
}

.schedule-current-plan-panel > summary small {
  color: var(--muted);
  font-weight: 400;
}

.schedule-current-plan-panel[open] > summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-current-plan-panel .plan-status-list {
  margin-top: 10px;
}

.schedule-context-panel .plan-status-list {
  max-height: 250px;
  overflow-y: auto;
}

.schedule-context-panel .warning-stack {
  margin-top: 8px;
}

.schedule-capacity-summary {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 12px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  border-radius: 5px;
}

.schedule-capacity-summary strong {
  font-size: 24px;
}

.schedule-capacity-summary.has-risk {
  color: #8c241f;
  background: var(--red-soft);
  border-left-color: var(--red);
}

.schedule-check-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.schedule-check-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.schedule-check-list strong { color: var(--ink); }

.schedule-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-inline: -18px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line-strong);
}

.schedule-sticky-actions > div {
  display: flex;
  gap: 9px;
}

.schedule-sticky-actions .button-primary {
  min-width: 170px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 152px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .metric-strip {
    grid-template-columns: repeat(5, minmax(100px, 1fr));
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-workspace .toolbar {
    grid-template-columns: 1fr;
  }

  .orders-workspace .toolbar-actions {
    grid-column: auto;
  }

  .segmented {
    overflow-x: auto;
  }

  .detail-facts,
  .schedule-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-layout {
    grid-template-columns: 1fr;
  }

  .today-work-order {
    display: none;
  }

  .workflow-workspace {
    grid-template-columns: 1fr;
  }

  .board-process-grid {
    grid-template-columns: 1fr;
  }

  .progress-detail-timeline,
  .progress-detail-grid,
  .board-summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .progress-detail-schedule {
    grid-column: auto;
  }

  .today-task-row {
    min-height: 94px;
    gap: 10px;
    padding-block: 10px;
  }

  .in-process-order-row {
    grid-template-columns: minmax(180px, 1fr) auto minmax(140px, 0.8fr) minmax(190px, 1fr) auto;
  }

  .in-process-order-row > .risk-badge {
    display: none;
  }

  .order-detail-command-bar,
  .order-detail-workbench-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .order-detail-workbench-facts {
    flex-wrap: wrap;
  }

  .order-detail-workbench-actions {
    margin-left: auto;
  }

  .schedule-workspace-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .schedule-plan-head,
  .schedule-plan-form .plan-input-row {
    grid-template-columns: 140px 110px minmax(230px, 1fr) 40px;
  }
}

@media (max-width: 1040px) {
  .order-detail-workbench-toolbar {
    flex-direction: column;
  }

  .order-detail-workbench-actions {
    width: 100%;
    margin-left: 0;
  }

  .dialog-order-detail .personal-task-operation-table {
    overflow: visible;
    border: 0;
  }

  .dialog-order-detail .personal-task-operation-head {
    display: none;
  }

  .dialog-order-detail .personal-assignment-compact-list {
    gap: 8px;
  }

  .dialog-order-detail .personal-assignment-compact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 7px;
  }

  .dialog-order-detail .personal-assignment-compact-row + .personal-assignment-compact-row {
    border-top: 1px solid var(--line);
  }

  .dialog-order-detail .personal-assignment-compact-row > div::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
  }

  .dialog-order-detail .personal-task-row-actions {
    justify-content: flex-start;
  }

  .dialog-order-detail .personal-task-projection strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .dialog-order-detail .personal-assignment-details > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 10px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    scrollbar-width: none;
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: flex;
    flex: 0 0 auto;
  }

  .nav-group-items {
    display: flex;
    flex: 0 0 auto;
  }

  .nav-group-collapsible {
    align-items: stretch;
    gap: 4px;
  }

  .nav-group-summary {
    min-width: max-content;
    min-height: 46px;
    padding: 0 12px;
    color: #334155;
    font-size: 13px;
    letter-spacing: 0;
    border: 1px solid var(--line);
  }

  .nav-group-label {
    display: none;
  }

  .nav-item {
    min-width: max-content;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .nav-item.is-active {
    border-bottom-color: var(--primary);
  }

  .sidebar-user {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .top-actions .connection,
  .top-actions .button-secondary {
    display: none;
  }

  .top-actions .screen-mode-button {
    display: inline-flex;
    flex: 0 0 auto;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .top-actions .button-primary {
    flex: 0 0 auto;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .page-content {
    padding: 14px;
  }

  .page-intro {
    min-width: 0;
  }

  .page-title-row {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .page-toolbar-card {
    padding: 9px;
  }

  .metric-strip,
  .two-column-band,
  .form-grid,
  .detail-grid,
  .detail-facts,
  .detail-selector-facts,
  .schedule-summary,
  .insight-grid,
  .health-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-task-context,
  .report-primary-entry,
  .report-time-mode-options,
  .report-task-card {
    grid-template-columns: 1fr;
  }

  .reporting-queue-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
  }

  .reporting-queue-tabs button {
    flex: 1 0 auto;
    min-height: 44px;
    padding-inline: 12px;
  }

  .report-task-head {
    display: none;
  }

  .report-task-card {
    gap: 8px;
    padding: 12px;
  }

  .reporting-today-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .reporting-group > header {
    align-items: flex-start;
  }

  .reporting-task-actions {
    flex-direction: row;
    justify-content: stretch;
  }

  .reporting-task-actions .button {
    flex: 1 1 0;
  }

  .reporting-readonly {
    text-align: left;
  }

  .report-order-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-primary-worker-slot { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid #c9dcf6; }
  .report-primary-quantity { padding: 12px 0 0; }

  .report-time-fields,
  .report-time-uncertainty {
    grid-template-columns: 1fr;
  }

  .report-time-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-clock-option-group {
    grid-template-columns: repeat(4, minmax(54px, 1fr));
  }

  dialog.dialog-quick-report {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
  }

  .dialog-quick-report .dialog-body {
    max-height: none;
    overflow: visible;
  }

  .reporting-processed-list > article {
    grid-template-columns: 42px 64px minmax(0, 1fr);
    padding-inline: 10px;
  }

  .action-task-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .quality-issue-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .quality-issue-card .row-actions {
    grid-column: 1 / -1;
  }

  .action-task-card > .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .today-queue-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-filter-tabs {
    width: 100%;
  }

  .today-filter-tabs button {
    flex: 1 1 auto;
  }

  .today-task-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .today-task-row > .button {
    grid-column: 2;
    width: 100%;
  }

  .today-waiting-row {
    grid-template-columns: 1fr;
  }

  .today-waiting-row .button {
    width: 100%;
  }

  .in-process-order-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding-block: 12px;
  }

  .in-process-order-progress,
  .in-process-order-next {
    grid-column: 1 / -1;
  }

  .in-process-order-row > .button {
    grid-column: 2;
    grid-row: 1;
  }

  .incomplete-order-card { grid-template-columns: 1fr; }
  .incomplete-order-card > .button { width: 100%; }

  .workflow-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-band {
    grid-template-columns: 1fr;
  }

  .order-detail-head {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .detail-image {
    width: 92px;
    height: 92px;
  }

  .action-band,
  .section-heading {
    align-items: flex-start;
  }

  .action-band {
    flex-direction: column;
  }

  .login-panel {
    padding: 26px 22px;
  }

  .board-view {
    padding: 12px;
  }

  .order-detail-decision {
    grid-template-columns: 1fr;
  }

  .order-detail-decision > .order-detail-action-group {
    grid-column: auto;
    width: 100%;
  }

  .order-detail-layout,
  .schedule-workspace-grid {
    grid-template-columns: 1fr;
  }

  .cut-receipt-row {
    grid-template-columns: 1fr 1fr;
  }

  .cut-receipt-row > div:last-child {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }

  .order-detail-supervisor,
  .schedule-context-panel {
    position: static;
  }

  .order-detail-panel {
    min-height: 0;
  }

  .schedule-context-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-context-panel > :first-child,
  .schedule-context-panel > :last-child {
    grid-column: 1 / -1;
  }

  .schedule-plan-head {
    display: none;
  }

  .schedule-plan-form .plan-input-row {
    grid-template-columns: minmax(150px, 1fr) 110px 40px;
  }

  .schedule-plan-form .plan-input-row > label:nth-child(1) { grid-column: 1; }
  .schedule-plan-form .plan-input-row > label:nth-child(2) { grid-column: 2; }
  .schedule-plan-form .plan-input-row > .icon-button,
  .schedule-plan-form .plan-input-row > .locked-plan-date { grid-column: 3; }
  .schedule-plan-form .schedule-date-context { grid-column: 1 / -1; grid-row: 2; }

  .schedule-outsourcing-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-outsourcing-form > .button,
  .schedule-outsourcing-form .form-error {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .report-task-card {
    grid-template-columns: minmax(0, 1fr) minmax(108px, .8fr);
    gap: 7px 10px;
  }

  .report-task-card > .task-order-link,
  .report-task-card > .report-task-projection,
  .report-task-card > .reporting-task-actions,
  .report-task-card > .reporting-readonly {
    grid-column: 1 / -1;
  }

  .report-task-card > .report-task-worker { grid-column: 1; }
  .report-task-card > .report-task-remaining { grid-column: 2; }

  .reporting-today-processed > summary {
    grid-template-columns: auto auto auto;
  }

  .reporting-today-processed > summary > small {
    grid-column: 2 / -1;
  }

  dialog.app-dialog.dialog-order-detail,
  dialog.app-dialog.dialog-schedule-workspace,
  dialog.app-dialog.dialog-resolution {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .dialog-order-detail .dialog-header,
  .dialog-schedule-workspace .dialog-header {
    min-height: 56px;
    padding: 9px 12px;
  }

  .dialog-order-detail .dialog-body,
  .dialog-schedule-workspace .dialog-body,
  .dialog-resolution .dialog-body {
    max-height: calc(100vh - 56px);
  }

  .dialog-order-detail .dialog-body {
    padding: 12px;
  }

  .order-detail-shell {
    gap: 11px;
  }

  .order-detail-command-bar,
  .order-detail-command-meta {
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .order-detail-command-bar {
    min-height: 0;
  }

  .order-detail-primary-timeline {
    width: 100%;
    margin-left: 0;
  }

  .order-detail-command-bar > .order-detail-action-group {
    display: none;
  }

  .order-detail-current-summary {
    align-items: flex-start;
    padding: 9px 11px;
  }

  .order-detail-core-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-core-metrics > span {
    min-height: 84px;
    gap: 9px;
    padding: 10px;
    text-align: left;
  }

  .order-detail-core-metrics > span:nth-child(odd) {
    border-left: 0;
  }

  .order-detail-core-metrics > span:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .order-detail-core-metrics strong {
    font-size: 17px;
  }

  .order-detail-metric-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 13px;
  }

  .order-detail-alert-shelf {
    align-items: stretch;
  }

  .order-detail-alert-slot,
  .order-detail-alert {
    max-width: 100%;
  }

  .order-detail-workbench-toolbar {
    gap: 10px;
    padding: 10px;
  }

  .order-detail-workbench-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 9px;
  }

  .order-detail-workbench-facts > span {
    display: grid;
    gap: 2px;
    padding-right: 0;
    border-right: 0;
    white-space: normal;
  }

  .order-detail-time-help {
    align-self: center;
  }

  .order-detail-time-help > p {
    left: 0;
    width: min(340px, calc(100vw - 44px));
  }

  .order-detail-workbench-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-detail-workbench-actions > .button,
  .order-detail-more-management,
  .order-detail-more-management > summary {
    width: 100%;
  }

  .order-detail-more-management > summary {
    justify-content: center;
  }

  .order-detail-more-management > div {
    right: 0;
    width: min(240px, calc(100vw - 44px));
  }

  .order-detail-tabs {
    padding-inline: 4px;
  }

  .order-detail-tabs button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .order-detail-panel {
    padding: 12px;
  }

  .order-detail-secondary-actions {
    grid-template-columns: 1fr;
  }

  .order-detail-secondary-actions .link-button {
    grid-column: auto;
  }

  .order-detail-mobile-action {
    position: sticky;
    bottom: -12px;
    z-index: 4;
    display: block;
    margin: 0 -12px -12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line-strong);
  }

  .order-detail-mobile-action .order-detail-action-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .order-detail-mobile-action .button {
    width: 100%;
  }

  .schedule-workspace {
    min-height: calc(100vh - 56px);
    gap: 10px;
    padding: 10px 10px 0;
  }

  .unplanned-resolution-option {
    padding: 12px;
  }

  .historical-attribution-preview {
    grid-template-columns: 1fr;
  }

  .historical-attribution-preview ul,
  .historical-attribution-preview small {
    grid-column: auto;
  }

  .schedule-stepper {
    gap: 3px;
  }

  .schedule-stepper > span {
    gap: 4px;
    min-height: 52px;
    font-size: 12px;
    text-align: center;
  }

  .schedule-stepper b {
    width: 24px;
    height: 24px;
  }

  .schedule-summary-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-summary-compact span:nth-child(1),
  .schedule-summary-compact span:nth-child(3),
  .schedule-summary-compact span:nth-child(4) {
    display: none;
  }

  .cut-receipt-summary > summary,
  .cut-receipt-summary.is-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .cut-receipt-row {
    grid-template-columns: 1fr;
  }

  .cut-receipt-row > div:last-child {
    grid-column: auto;
  }

  .schedule-summary-compact span {
    min-height: 58px;
  }

  .schedule-primary-panel > summary span,
  .schedule-section-toggle > span,
  .schedule-plan-notes > summary span {
    display: grid;
    gap: 2px;
  }

  .schedule-allocation-form > label,
  .schedule-allocation-form .allocation-reason {
    flex: 1 1 100%;
  }

  .schedule-allocation-form > label input {
    flex: 1 1 auto;
  }

  .allocation-quick-actions {
    flex: 1 1 auto;
  }

  .schedule-allocation-form > .button-primary {
    flex: 1 1 110px;
  }

  .schedule-context-panel {
    grid-template-columns: 1fr;
  }

  .schedule-context-panel > :first-child,
  .schedule-context-panel > :last-child {
    grid-column: auto;
  }

  .schedule-edit-section {
    padding: 0;
  }

  .schedule-primary-heading {
    align-items: stretch;
  }

  .schedule-internal-body,
  .schedule-outsourcing-body {
    padding: 8px;
  }

  .schedule-internal-guidance {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-outsourcing-create > summary span,
  .schedule-outsourcing-completed > summary span {
    display: grid;
    gap: 2px;
  }

  .schedule-outsourcing-form {
    grid-template-columns: 1fr;
  }

  .schedule-outsourcing-form > .button,
  .schedule-outsourcing-form .form-error {
    grid-column: auto;
  }

  .schedule-outsourcing-task-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-outsourcing-task-head {
    align-items: flex-start;
  }

  .schedule-adjust-note {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-plan-form .plan-input-row {
    grid-template-columns: minmax(0, 1fr) 90px 36px;
    gap: 7px;
    padding: 8px;
  }

  .schedule-date-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-date-metric:nth-child(3) {
    border-left: 0;
  }

  .schedule-date-metric:nth-child(n + 3) {
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .schedule-day-orders > summary,
  .schedule-day-orders-empty {
    align-items: flex-start;
  }

  .schedule-sticky-actions {
    margin-inline: -10px;
    padding: 9px 10px;
  }

  .schedule-sticky-actions > .button:first-child {
    display: none;
  }

  .schedule-sticky-actions > div {
    width: 100%;
  }

  .schedule-sticky-actions > div .button {
    flex: 1 1 0;
    min-width: 0;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-strip .metric-tile:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .metric-tile {
    min-height: 94px;
  }

  .form-grid,
  .detail-grid,
  .detail-facts,
  .detail-selector-facts,
  .schedule-summary,
  .insight-grid,
  .health-grid,
  .workflow-progress {
    grid-template-columns: 1fr;
  }

  .next-action-callout,
  .detail-selector-panel-head,
  .audit-card {
    align-items: stretch;
    flex-direction: column;
  }

  .span-2 {
    grid-column: auto;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .topbar > .page-intro {
    width: 100%;
  }

  .top-actions {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .page-kicker {
    display: none;
  }

  .page-toolbar-card {
    overflow-x: auto;
  }

  .top-actions .button {
    min-height: 38px;
    padding-inline: 10px;
  }

  .plan-input-row {
    grid-template-columns: 1fr 90px 40px;
  }

  .production-progress-workspace .progress-stage-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .production-progress-workspace .progress-stage-metrics .metric-tile,
  .production-progress-workspace .progress-stage-metrics .metric-tile:last-child:nth-child(odd) {
    grid-column: auto;
    min-height: 48px;
    gap: 5px;
    padding: 6px 8px;
  }

  .production-progress-workspace .progress-stage-metrics .metric-tile span {
    font-size: 12px;
  }

  .production-progress-workspace .progress-stage-metrics .metric-tile strong {
    font-size: 18px;
  }

  .progress-search-row {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 7px;
  }

  .progress-search-row > strong {
    display: none;
  }
}

/* 安排生产 Material UI Contract r1 */
.schedule-load-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.schedule-load-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.schedule-load-toolbar > div:first-child > strong {
  color: var(--ink);
  font-size: 16px;
}

.schedule-load-toolbar > div:first-child > small {
  color: var(--muted);
  font-size: 12px;
}

.schedule-capacity-strip {
  grid-auto-columns: minmax(126px, 1fr);
  grid-template-columns: none;
  grid-auto-flow: column;
  gap: 6px;
}

.schedule-capacity-strip .capacity-day {
  min-height: 72px;
  align-content: start;
  gap: 7px;
  padding: 9px 10px;
  border-top-width: 1px;
  font-size: 13px;
}

.capacity-day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.capacity-day-heading strong {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.capacity-load-bar {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  background: #e6ebf2;
  border-radius: 999px;
}

.capacity-load-bar > b {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.capacity-day.is-overloaded .capacity-load-bar > b,
.selected-worker-capacity.has-risk .capacity-load-bar > b {
  background: var(--red);
}

.schedule-capacity-strip .capacity-day small {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-table th,
.schedule-order-table td {
  vertical-align: middle;
}

.schedule-order-table .order-list-identity { width: 22%; }
.schedule-order-table .schedule-list-quantity { width: 15%; }
.schedule-order-table .schedule-list-formal { width: 17%; }
.schedule-order-table .schedule-list-state { width: 25%; }
.schedule-order-table .schedule-list-due { width: 16%; }
.schedule-order-table .schedule-list-action { width: 1%; white-space: nowrap; }

.schedule-order-quantity,
.schedule-order-formal {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.schedule-order-quantity > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.schedule-order-quantity small,
.schedule-order-formal small,
.schedule-order-quantity em,
.schedule-order-formal em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.schedule-order-quantity strong,
.schedule-order-formal > strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.personal-plan-order-context {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(100px, .7fr)) minmax(170px, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.personal-plan-order-context > span {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  padding: 7px 11px;
  background: #fff;
}

.personal-plan-order-context small {
  color: var(--muted);
  font-size: 12px;
}

.personal-plan-order-context strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.personal-plan-order-state {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.personal-plan-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f7faff;
  border-bottom: 1px solid #d8e4f5;
}

.personal-plan-progress-summary > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.personal-plan-progress-summary small {
  color: var(--muted);
  font-size: 13px;
}

.personal-plan-progress-summary strong {
  color: var(--primary);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.personal-plan-progress-summary > b {
  color: #53647d;
  font-size: 14px;
}

.personal-plan-auto-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 9px;
  color: #315a9f;
  background: var(--primary-soft);
  border-radius: 5px;
  font-size: 13px;
}

.personal-plan-auto-preview > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--primary);
  border-radius: 50%;
}

.personal-plan-dialog .personal-plan-guidance,
.personal-plan-dialog .schedule-primary-heading small,
.personal-plan-dialog .schedule-draft-note {
  font-size: 13px;
}

.personal-plan-dialog .personal-assignment-input-row input,
.personal-plan-dialog .personal-assignment-input-row select {
  height: 40px;
  font-size: 14px;
}

.personal-plan-dialog .personal-assignment-projection strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.personal-plan-dialog .personal-assignment-projection small,
.personal-plan-dialog .personal-assignment-projection em,
.personal-plan-dialog .personal-adjustment-cell small {
  font-size: 12px;
}

.selected-worker-capacity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.selected-worker-capacity > span,
.selected-worker-capacity.is-empty {
  display: grid;
  gap: 2px;
}

.selected-worker-capacity.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.selected-worker-capacity.is-empty > * {
  grid-column: 1;
}

.selected-worker-capacity small,
.selected-worker-capacity em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.selected-worker-capacity > b {
  color: var(--ink);
  font-size: 13px;
}

.selected-worker-capacity .capacity-load-bar,
.selected-worker-capacity > em {
  grid-column: 1 / -1;
}

.schedule-capacity-detail-link {
  margin-top: 8px;
}

.personal-schedule-key-facts > span.is-primary {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 0;
}

.personal-schedule-key-facts > span.is-primary strong {
  font-size: 17px;
}

.personal-schedule-key-facts > span.is-primary b {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.personal-schedule-date-details {
  border-top: 1px solid var(--line);
}

.personal-schedule-date-details > summary {
  padding: 8px 0 2px;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.personal-schedule-date-details > div {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.personal-schedule-date-details span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.personal-plan-no-action {
  align-self: center;
  padding: 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .schedule-load-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-capacity-strip {
    grid-template-columns: none;
    grid-auto-flow: column;
  }

  .personal-plan-order-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-plan-order-state {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .schedule-workspace.workflow-workspace .responsive-table {
    min-width: 0;
    overflow: visible;
  }

  .schedule-order-table {
    display: block;
  }

  .schedule-order-table thead {
    display: none;
  }

  .schedule-order-table tbody {
    display: grid;
  }

  .schedule-order-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 10px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
  }

  .schedule-order-table td {
    display: block;
    width: auto !important;
    min-width: 0;
    padding: 2px 0;
    border-bottom: 0;
  }

  .schedule-order-table .order-list-identity { grid-column: 1; grid-row: 1; }
  .schedule-order-table .schedule-list-action { grid-column: 2; grid-row: 1; }
  .schedule-order-table .schedule-list-quantity { grid-column: 1 / -1; grid-row: 2; }
  .schedule-order-table .schedule-list-formal { grid-column: 1 / -1; grid-row: 3; }
  .schedule-order-table .schedule-list-state { grid-column: 1 / -1; grid-row: 4; }
  .schedule-order-table .schedule-list-due { grid-column: 1 / -1; grid-row: 5; }

  .schedule-order-quantity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 6px;
    border-top: 1px dashed var(--line);
  }

  .schedule-order-quantity > em {
    grid-column: 1 / -1;
  }

  .schedule-order-formal,
  .schedule-list-state,
  .schedule-list-due {
    padding-top: 6px;
    border-top: 1px dashed var(--line);
  }

  .personal-plan-dialog.schedule-workspace {
    padding-inline: 8px;
  }

  .personal-plan-order-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .personal-plan-progress-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-context-panel {
    grid-template-columns: 1fr;
  }

  .schedule-context-panel > :first-child,
  .schedule-context-panel > :last-child {
    grid-column: auto;
  }

  .schedule-sticky-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-sticky-actions > div {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-sticky-actions .button-primary,
  .schedule-sticky-actions .button-secondary {
    width: 100%;
  }

  .personal-plan-no-action {
    padding-block: 7px;
    text-align: center;
  }
}
.execution-due-options {
  display: grid;
  gap: 10px;
}

.execution-due-options label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-color, #d8dee9);
  border-radius: 10px;
  cursor: pointer;
}

.execution-due-options label:has(input:checked) {
  border-color: #356df3;
  background: #f3f7ff;
}

.execution-due-options span,
.execution-due-options small {
  display: block;
}

.execution-due-options small {
  margin-top: 4px;
  color: #667085;
}

.execution-due-summary {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #f8fafc;
}

.execution-due-summary.is-pending {
  border-color: #f0a7a7;
  background: #fff7f7;
}

.execution-due-summary.is-compact {
  margin-bottom: 0;
  padding: 0;
  border-radius: 6px;
}

.execution-due-summary.is-compact > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
}

.execution-due-summary.is-compact > summary::-webkit-details-marker {
  display: none;
}

.execution-due-summary.is-compact > summary > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.execution-due-summary.is-compact > summary small {
  color: var(--muted);
  font-size: 11px;
}

.execution-due-summary.is-compact > summary strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.execution-due-summary.is-compact > summary b {
  color: var(--primary);
  font-size: 12px;
  white-space: nowrap;
}

.execution-due-summary .execution-due-details {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.execution-due-details > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.execution-due-summary > div:not(.execution-due-details) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.execution-due-summary span {
  color: #667085;
}

.execution-due-summary span strong {
  margin-left: 6px;
  color: #172033;
}

.execution-due-summary p {
  margin: 8px 0 0;
}

.execution-due-summary details {
  margin-top: 8px;
}

.execution-due-summary ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.execution-due-summary li span {
  display: block;
  font-size: 12px;
}

.execution-due-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.post-completion-material {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #f8fafc;
}

.post-completion-material > div {
  display: grid;
  gap: 3px;
}

.post-completion-material span {
  color: var(--muted);
  font-size: 13px;
}

.post-completion-material.is-resolved {
  border-color: #c8e6d4;
  background: #f4fbf7;
}

@media (max-width: 680px) {
  .post-completion-material {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1100px) and (min-width: 681px) {
  .order-list-toolbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .order-lifecycle-filters {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .order-list-menu-group {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .order-list-toolbar {
    overflow: visible;
  }

  .order-list-toolbar-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .order-lifecycle-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
  }

  .order-lifecycle-filters button {
    min-width: 0;
    padding-inline: 7px;
  }

  .order-list-menu-group {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .order-list-filter-menu > div,
  .order-list-tools > div {
    width: max-content;
    max-width: min(300px, calc(100vw - 64px));
    justify-content: flex-start;
  }

  .orders-workspace #order-results,
  .orders-workspace #order-results .responsive-table {
    min-width: 0;
    overflow: visible;
  }

  .orders-workspace .order-table {
    display: block;
  }

  .orders-workspace .order-table thead {
    display: none;
  }

  .orders-workspace .order-table tbody {
    display: grid;
  }

  .orders-workspace .order-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
  }

  .orders-workspace .order-table tbody tr:last-child {
    border-bottom: 0;
  }

  .orders-workspace .order-table td {
    display: block;
    min-width: 0;
    padding: 2px 0;
    border-bottom: 0;
  }

  .orders-workspace .order-table .order-list-identity { grid-column: 1; grid-row: 1; }
  .orders-workspace .order-table .order-list-stage { grid-column: 2; grid-row: 1; justify-self: end; }
  .orders-workspace .order-table .order-list-progress { grid-column: 1 / -1; grid-row: 2; }
  .orders-workspace .order-table .order-list-state { grid-column: 1 / -1; grid-row: 3; padding-top: 5px; }
  .orders-workspace .order-table .order-list-due { grid-column: 1 / -1; grid-row: 4; padding-top: 5px; }

  .orders-workspace .order-cell {
    gap: 8px;
  }

  .orders-workspace .order-cell .product-thumb,
  .orders-workspace .order-cell .image-placeholder {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .orders-workspace .order-cell small + small {
    display: none;
  }

  .orders-workspace .order-list-stage-tag {
    gap: 4px;
    padding-right: 6px;
  }

  .orders-workspace .order-list-progress-stack {
    max-width: 280px;
  }

  .orders-workspace .order-list-current-due > span {
    max-width: none;
  }

  .orders-workspace .order-list-current-state {
    padding-top: 7px;
    border-top: 1px dashed var(--line);
  }

  .orders-workspace .order-list-current-due {
    padding-top: 7px;
    border-top: 1px dashed var(--line);
  }
}

@media (max-width: 520px) {
  .order-detail-tab-strip {
    align-items: stretch;
    padding-right: 4px;
  }

  .order-detail-tab-strip > .order-detail-more-management {
    align-self: center;
    width: auto;
  }

  .order-detail-tab-strip > .order-detail-more-management > summary {
    width: auto;
    min-height: 34px;
    padding-inline: 9px;
    font-size: 12px;
  }

  .order-detail-schedule-context,
  .order-detail-schedule-context > div {
    align-items: flex-start;
  }

  .order-detail-schedule-context {
    flex-direction: column;
  }

  .order-detail-schedule-context > div:first-child > span {
    padding-right: 8px;
  }

  .execution-due-summary.is-compact > summary {
    align-items: flex-start;
  }

  .execution-due-summary.is-compact > summary b {
    max-width: 82px;
    white-space: normal;
    text-align: right;
  }
}

/* 安排生产 r2 最终覆盖：必须位于r1和生产单r4之后。 */
.schedule-capacity-strip {
  grid-auto-columns: minmax(204px, 1fr);
}

.schedule-capacity-strip .capacity-day {
  min-height: 108px;
  gap: 6px;
  padding: 10px 11px;
}

.schedule-capacity-strip .capacity-day .capacity-day-status {
  color: #40516b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.schedule-capacity-strip .capacity-day.is-overloaded .capacity-day-status {
  color: var(--red);
}

@media (max-width: 680px) {
  .schedule-capacity-strip {
    grid-auto-columns: 250px;
  }

  .schedule-day-dialog-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-day-dialog-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  .schedule-day-dialog-row > span:first-child {
    grid-column: 1 / -1;
  }

  .schedule-day-dialog-entry > .button {
    justify-self: start;
    margin: 0 10px 10px;
  }
}

/* 安排生产 Material UI Contract r3：负荷卡可读性与产能信息预算 */
.schedule-capacity-strip {
  grid-auto-columns: minmax(228px, 1fr);
  gap: 8px;
}

.schedule-capacity-strip .capacity-day {
  min-height: 142px;
  align-content: start;
  gap: 7px;
  padding: 12px 13px;
}

.capacity-day-heading > span > b {
  font-size: 16px;
}

.capacity-day-heading > span > small {
  font-size: 13px;
}

.capacity-day-heading strong {
  font-size: 23px;
  line-height: 1;
}

.capacity-day-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.capacity-day-metrics > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.schedule-capacity-strip .capacity-day .capacity-day-metrics small,
.schedule-capacity-strip .capacity-day .capacity-day-remaining small,
.schedule-capacity-strip .capacity-day .capacity-day-context {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.capacity-day-metrics b {
  color: #33445f;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.capacity-day-remaining {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.capacity-day-remaining b {
  color: #304665;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.schedule-capacity-strip .capacity-day .capacity-day-context {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.schedule-capacity-strip .capacity-day .capacity-day-status {
  font-size: 15px;
  line-height: 1.25;
}

@media (max-width: 680px) {
  .schedule-capacity-strip {
    grid-auto-columns: 264px;
  }

  .schedule-capacity-strip .capacity-day {
    min-height: 144px;
  }
}

/* 安排生产 Material UI Contract r4/r5：日期导航器与单屏排产工作台 */
.app-shell.view-schedule,
.view-schedule .workspace,
.view-schedule .page-content {
  background: #fff;
}

.view-schedule .page-content {
  gap: 12px;
}

.schedule-date-navigator {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.schedule-date-navigator-controls {
  display: flex;
  justify-content: flex-end;
  min-height: 38px;
  margin-bottom: 8px;
}

.schedule-range-controls {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #F6F8FB;
}

.schedule-range-controls button {
  min-height: 34px;
  padding: 3px 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.schedule-range-controls button:hover,
.schedule-range-controls button:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.schedule-range-controls button.is-active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 1px 3px rgb(29 55 93 / 12%);
}

.schedule-date-navigator .schedule-capacity-strip {
  grid-auto-columns: minmax(228px, 1fr);
  gap: 0;
  padding-bottom: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.schedule-date-navigator .schedule-capacity-strip.is-seven-day {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-columns: auto;
  grid-auto-flow: row;
  overflow-x: hidden;
}

.schedule-date-navigator .capacity-day {
  height: 168px;
  min-height: 168px;
  align-content: start;
  gap: 11px;
  padding: 15px 18px;
  border-radius: 0;
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
  scroll-snap-align: start;
  text-align: left;
}

.schedule-date-navigator .capacity-day-heading {
  display: grid;
  align-items: start;
  justify-content: stretch;
  gap: 8px;
}

.schedule-date-navigator .capacity-day-date {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.schedule-date-navigator .capacity-day-load {
  display: block;
}

.schedule-date-navigator .capacity-day:first-child {
  border-radius: 8px 0 0 8px;
}

.schedule-date-navigator .capacity-day:last-child {
  border-radius: 0 8px 8px 0;
}

.schedule-date-navigator .capacity-day + .capacity-day {
  margin-left: -1px;
}

.schedule-date-navigator .capacity-day:hover {
  position: relative;
  z-index: 1;
  border-color: #BFDBFE;
  background: #F8FBFF;
}

.schedule-date-navigator .capacity-day.is-selected {
  position: relative;
  z-index: 2;
  border-color: var(--primary);
  background: #F8FBFF;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.schedule-date-navigator .capacity-day-heading > span > b {
  color: var(--ink);
  font-size: 16px;
}

.schedule-date-navigator .capacity-day-heading > span > small {
  font-size: 14px;
}

.schedule-date-navigator .capacity-day-heading strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.schedule-date-navigator .capacity-load-bar {
  height: 5px;
}

.schedule-date-navigator .capacity-day-primary {
  color: var(--text-body, #475569);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
}

.schedule-date-navigator .capacity-day-context {
  color: var(--muted);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-date-navigator .capacity-day.is-near-full .capacity-day-heading strong,
.schedule-date-navigator .capacity-day.is-near-full .capacity-day-primary {
  color: #9A3412;
}

.schedule-date-navigator .capacity-day.is-overloaded .capacity-day-heading strong,
.schedule-date-navigator .capacity-day.is-overloaded .capacity-day-primary {
  color: #B91C1C;
}

.schedule-date-navigator .capacity-day.is-stopped {
  color: var(--muted);
  background: #F1F5F9;
}

.schedule-date-navigator .capacity-day.is-stopped .capacity-day-heading {
  display: grid;
  gap: 12px;
}

.schedule-date-navigator .capacity-day.is-stopped .capacity-day-heading strong {
  font-size: 20px;
  line-height: 1.2;
}

.schedule-date-navigator .capacity-day.is-stopped .capacity-day-heading strong,
.schedule-date-navigator .capacity-day.is-stopped .capacity-day-context {
  color: #475569;
}

.schedule-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  align-items: stretch;
  gap: 12px;
}

.schedule-order-picker,
.schedule-worker-panel {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-panel-toolbar {
  min-height: 58px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.schedule-order-toolbar {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr) 116px;
  align-items: center;
  gap: 9px;
}

.schedule-order-toolbar .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.schedule-panel-title,
.schedule-worker-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.schedule-panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.schedule-panel-title strong,
.schedule-worker-heading strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.schedule-panel-title small,
.schedule-worker-heading small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-order-search,
.schedule-filter-select {
  min-width: 0;
}

.schedule-order-search input,
.schedule-filter-select select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text-body, #475569);
  font-size: 13px;
}

.schedule-order-search input:focus,
.schedule-filter-select select:focus {
  border-color: #BFDBFE;
  outline: 3px solid rgb(37 99 235 / 12%);
}

.schedule-order-results,
.schedule-worker-table {
  flex: 1;
  min-height: 0;
  max-height: 620px;
  overflow: auto;
}

@media (max-width: 1365px) {
  .schedule-date-navigator .schedule-capacity-strip.is-seven-day {
    grid-template-columns: none;
    grid-auto-columns: 176px;
    grid-auto-flow: column;
    overflow-x: auto;
  }
}

.schedule-order-list-head,
.schedule-order-option-main {
  display: grid;
  grid-template-columns: minmax(128px, 1.35fr) minmax(68px, .58fr) minmax(82px, .72fr) minmax(84px, .72fr);
  align-items: center;
  gap: 9px;
}

.schedule-order-list-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 34px;
  padding: 5px 36px 5px 12px;
  border-bottom: 1px solid var(--line);
  background: #F8FAFC;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.schedule-order-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.schedule-order-option:last-child {
  border-bottom: 0;
}

.schedule-order-option:hover {
  background: #F8FBFF;
}

.schedule-order-option.is-selected {
  background: #EAF2FF;
  box-shadow: inset 3px 0 0 var(--primary);
}

.schedule-order-option.is-selected .schedule-order-option-identity .table-link {
  color: var(--primary);
}

.schedule-order-option-main {
  min-width: 0;
  padding: 9px 4px 9px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.schedule-order-option-main:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -3px;
}

.schedule-order-option-identity,
.schedule-order-option-qty,
.schedule-order-due {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.schedule-order-option-identity strong,
.schedule-order-option-qty strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-due strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-option-identity small {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-option-qty small,
.schedule-order-due small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-situation {
  justify-self: start;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #F1F5F9;
  color: var(--text-body, #475569);
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-order-situation.tone-red,
.schedule-order-situation.tone-danger {
  color: #B91C1C;
  background: var(--red-soft);
}

.schedule-order-situation.tone-yellow,
.schedule-order-situation.tone-warning {
  color: #9A3412;
  background: var(--yellow-soft);
}

.schedule-order-situation.tone-blue,
.schedule-order-situation.tone-primary {
  color: var(--primary);
  background: var(--primary-soft);
}

.schedule-order-select-indicator {
  width: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}

.schedule-order-select-indicator[aria-pressed="true"],
.schedule-order-select-indicator:hover,
.schedule-order-select-indicator:focus-visible {
  color: var(--primary);
}

.schedule-order-select-indicator:hover,
.schedule-order-select-indicator:focus-visible {
  background: var(--primary-soft);
}

.schedule-order-picker-empty {
  padding: 38px 18px;
  color: var(--muted);
  text-align: center;
}

.schedule-worker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-worker-heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-worker-actions {
  display: flex;
  align-items: center;
  flex: none;
  gap: 10px;
}

.schedule-worker-actions .button {
  min-height: 38px;
  padding-inline: 14px;
}

.schedule-worker-table table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.schedule-worker-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #F8FAFC;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.schedule-worker-table td {
  height: 58px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-body, #475569);
  font-size: 13px;
  vertical-align: middle;
}

.schedule-worker-table tbody tr:last-child td {
  border-bottom: 0;
}

.schedule-worker-table tbody tr:hover {
  background: #fafcff;
}

.schedule-worker-table td > strong,
.schedule-worker-table td > small {
  display: block;
}

.progress-process-strip {
  transition: background 120ms ease;
}

.view-pattern_room .page-content {
  max-width: 1680px;
  padding-top: 12px;
}

.pattern-room-workspace {
  display: grid;
  gap: 12px;
}

.pattern-room-range-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.pattern-room-range-controls > div { display: flex; gap: 8px; }

.pattern-room-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(142px, 1fr));
  overflow-x: auto;
  padding: 0;
}

.pattern-room-day {
  min-height: 104px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.pattern-room-day:last-child { border-right: 0; }
.pattern-room-day span,
.pattern-room-day strong,
.pattern-room-day small { display: block; }
.pattern-room-day span { color: var(--muted-strong); font-size: 13px; font-weight: 700; }
.pattern-room-day strong { margin-top: 6px; font-size: 20px; line-height: 1.15; }
.pattern-room-day small { margin-top: 8px; color: var(--muted); font-size: 12px; }
.pattern-room-day.is-selected { position: relative; z-index: 1; background: #eff6ff; box-shadow: inset 0 0 0 2px #2563eb; }
.pattern-room-day.tone-disabled { background: #f3f5f8; color: #64748b; }
.pattern-room-day.tone-attention strong { color: #b86b00; }
.pattern-room-day.tone-danger strong { color: #c52525; }

.pattern-room-capacity,
.pattern-room-drafts { padding: 16px; }

.pattern-room-department-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.pattern-room-department-grid article {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
}

.pattern-room-department-grid article:first-child { border-left: 0; }
.pattern-room-department-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.pattern-room-department-grid strong { color: var(--ink); font-size: 19px; line-height: 1.2; }
.pattern-room-department-grid small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.pattern-room-department-grid .pattern-room-primary-metric strong { color: var(--primary-dark); font-size: 23px; }

.pattern-room-range-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-radius: 7px;
  font-size: 12px;
}

.pattern-room-range-summary strong { color: var(--ink); }

.pattern-room-worker-table table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.pattern-room-worker-table th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.pattern-room-worker-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.pattern-room-worker-table td > strong,
.pattern-room-worker-table td > small { display: block; }
.pattern-room-worker-table td > strong { color: var(--ink); font-size: 14px; }
.pattern-room-worker-table td > small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.pattern-room-worker-table .status-badge { display: inline-flex; }
.pattern-room-worker-table .tone-success { color: #147a38; background: #eef9f1; }
.pattern-room-worker-table .tone-attention { color: #9a5d00; background: #fff3d9; }
.pattern-room-worker-table .tone-neutral { color: #64748b; background: #eef1f5; }

.pattern-room-task-list {
  display: grid;
  gap: 5px;
}

.pattern-room-task {
  display: grid;
  gap: 1px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #eff6ff;
}

.pattern-room-task strong { color: #2459b6; font-size: 13px; }
.pattern-room-task small,
.pattern-room-empty-task { color: var(--muted); font-size: 12px; }
.pattern-room-draft-list { display: grid; gap: 7px; }
.pattern-room-draft { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.pattern-room-draft div { display: grid; gap: 2px; }
.pattern-room-draft small,
.pattern-room-draft-empty { color: var(--muted); }

@media (max-width: 820px) {
  .pattern-room-timeline { grid-template-columns: repeat(7, 132px); }
  .pattern-room-day { min-height: 94px; padding: 11px 12px; }
  .pattern-room-day strong { font-size: 17px; }
  .pattern-room-capacity,
  .pattern-room-drafts { padding: 11px; }
  .pattern-room-department-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pattern-room-department-grid article:nth-child(odd) { border-left: 0; }
  .pattern-room-department-grid article:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .pattern-room-range-summary { align-items: flex-start; flex-wrap: wrap; gap: 6px 14px; }
}

@media (max-width: 480px) {
  .view-pattern_room .page-content { padding-top: 6px; }
  .pattern-room-timeline { grid-template-columns: repeat(7, 124px); }
  .pattern-room-day { min-height: 88px; }
  .pattern-room-department-grid { grid-template-columns: 1fr; }
  .pattern-room-department-grid article,
  .pattern-room-department-grid article:nth-child(odd) { border-left: 0; border-top: 1px solid var(--line); }
  .pattern-room-department-grid article:first-child { border-top: 0; }
  .pattern-room-draft { align-items: flex-start; }
}

@media (max-width: 1319px) and (min-width: 821px) {
  .view-progress .progress-matrix-top-scroll:not([hidden]),
  .view-order_progress .progress-matrix-top-scroll:not([hidden]) {
    display: block;
  }

  .view-progress .progress-matrix-scroll,
  .view-order_progress .progress-matrix-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .view-progress .production-flow-matrix,
  .view-order_progress .production-flow-matrix {
    min-width: 1080px;
  }
}

@media (max-width: 820px) {
  .view-progress .page-content,
  .view-order_progress .page-content {
    gap: 5px;
    padding-top: 4px;
  }

  .progress-heading-copy {
    display: grid;
    gap: 3px;
  }

  .progress-heading-copy p {
    white-space: normal;
  }

  .progress-filter-tabs {
    display: flex;
    scrollbar-width: thin;
  }

  .progress-filter-tabs button {
    flex: 0 0 auto;
    min-width: 92px;
    min-height: 40px;
    padding-block: 5px;
  }

  .progress-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .progress-search-row > label {
    display: none;
  }

  .progress-search-row > strong {
    display: none;
  }

  .progress-search-panel textarea {
    min-width: 0;
    height: 36px;
    min-height: 36px;
    overflow: hidden;
    white-space: nowrap;
  }

  .progress-search-refresh {
    min-height: 36px;
    padding-inline: 9px;
  }

  .progress-matrix-sticky-head,
  .progress-matrix-top-scroll {
    display: none !important;
  }

  .progress-matrix-scroll {
    overflow: visible;
  }

  .production-flow-matrix,
  .production-flow-matrix tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .production-flow-matrix thead {
    display: none;
  }

  .production-flow-matrix .progress-process-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .production-flow-matrix td {
    display: block;
    min-width: 0;
    padding: 6px 7px;
    border-bottom: 0;
  }

  .production-flow-matrix td:nth-child(1),
  .production-flow-matrix td:nth-child(5),
  .production-flow-matrix td:nth-child(6) {
    grid-column: 1 / -1;
  }

  .production-flow-matrix td:nth-child(1) {
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line);
  }

  .production-flow-matrix td:nth-child(2),
  .production-flow-matrix td:nth-child(3),
  .production-flow-matrix td:nth-child(4) {
    border-right: 1px solid var(--line);
  }

  .production-flow-matrix td:nth-child(4) {
    border-right: 0;
  }

  .production-flow-matrix td:nth-child(5) {
    padding-top: 3px;
  }

  .production-flow-matrix td:nth-child(6) {
    padding-top: 0;
  }

  .progress-matrix-order {
    min-height: 40px;
  }

  .progress-matrix-order strong,
  .progress-process-cell > strong,
  .progress-matrix-needle strong,
  .progress-matrix-due strong {
    font-size: 14px;
  }

  .progress-process-state,
  .progress-matrix-needle > span,
  .progress-matrix-due > span,
  .progress-process-cell small,
  .progress-matrix-needle small,
  .progress-matrix-due small {
    font-size: 11px;
  }

  .progress-visual-r10 .progress-matrix-order > span:first-child > strong,
  .progress-visual-r10 .progress-process-cell > strong,
  .progress-visual-r10 .progress-matrix-due > strong {
    font-size: 15px;
  }

  .progress-visual-r10 .progress-matrix-advancement > strong,
  .progress-visual-r10 .progress-matrix-needle > strong {
    font-size: 14px;
  }

  .progress-visual-r10 .progress-order-product,
  .progress-visual-r10 .progress-matrix-order > span:first-child > small:not(.progress-order-product),
  .progress-visual-r10 .progress-process-state,
  .progress-visual-r10 .progress-process-cell > small,
  .progress-visual-r10 .progress-machine-meta > small,
  .progress-visual-r10 .progress-matrix-advancement > span,
  .progress-visual-r10 .progress-matrix-advancement > small,
  .progress-visual-r10 .progress-matrix-needle > small,
  .progress-visual-r10 .progress-matrix-due > span,
  .progress-visual-r10 .progress-matrix-due > small,
  .progress-visual-r10 .progress-matrix-due > .risk-badge {
    font-size: 12px;
  }

  .progress-visual-r10 .progress-cut-arrival {
    font-size: 12px;
  }

  .progress-process-cell,
  .progress-matrix-needle {
    min-height: 70px;
    align-content: start;
    gap: 2px;
  }

  .progress-matrix-needle {
    padding: 6px;
  }

  .progress-machine-meta {
    display: grid;
    gap: 2px;
  }

  .progress-machine-meta small {
    font-size: 11px;
    white-space: normal;
  }

  .progress-matrix-advancement {
    min-height: 50px;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 3px 7px;
  }

  .progress-matrix-advancement small {
    grid-column: 1 / -1;
  }

  .progress-matrix-due {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 6px 8px;
    border-radius: 7px;
    background: var(--surface-subtle);
  }

  .progress-matrix-due span,
  .progress-matrix-due small {
    grid-column: 1;
  }

  .progress-matrix-due strong,
  .progress-matrix-due .risk-badge {
    grid-column: 2;
  }

  .progress-matrix-due > .risk-badge {
    position: static;
  }

  .progress-matrix-due > span,
  .progress-matrix-due > strong {
    padding-right: 0;
  }

  .progress-due-secondary,
  .progress-matrix-due > .progress-due-basis {
    grid-column: 1 / -1;
  }

  .progress-due-secondary {
    padding-right: 0;
  }
}

.schedule-worker-table td > strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.schedule-worker-table td > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.view-personal_capacity .personal-worker-state,
.view-schedule .personal-worker-state {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.view-personal_capacity .personal-worker-state.state-busy,
.view-schedule .personal-worker-state.state-busy {
  color: #9A3412;
  background: var(--yellow-soft);
}

.view-personal_capacity .personal-worker-state.state-full,
.view-schedule .personal-worker-state.state-full {
  color: #9A3412;
  background: var(--yellow-soft);
}

.view-personal_capacity .personal-worker-state.state-overload,
.view-schedule .personal-worker-state.state-overload {
  color: #B91C1C;
  background: var(--red-soft);
}

.view-personal_capacity .personal-worker-state.state-rest,
.view-personal_capacity .personal-worker-state.state-leave,
.view-personal_capacity .personal-worker-state.state-inactive,
.view-personal_capacity .personal-worker-state.state-unknown,
.view-schedule .personal-worker-state.state-rest,
.view-schedule .personal-worker-state.state-leave,
.view-schedule .personal-worker-state.state-inactive,
.view-schedule .personal-worker-state.state-unknown {
  color: #475569;
  background: #F1F5F9;
}

.schedule-worker-remaining strong {
  color: var(--primary-dark);
}

.load-full .schedule-worker-remaining strong {
  color: #9A3412;
}

.load-overload .schedule-worker-remaining strong {
  color: #B91C1C;
}

.schedule-worker-load-track {
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.schedule-worker-load-track > b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 1180px) {
  .schedule-order-list-head,
  .schedule-order-option-main {
    grid-template-columns: minmax(116px, 1.2fr) minmax(62px, .55fr) minmax(78px, .68fr) minmax(78px, .68fr);
    gap: 6px;
  }

  .schedule-worker-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-worker-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .schedule-workbench-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-order-results {
    max-height: 360px;
  }

  .schedule-worker-table {
    max-height: 520px;
  }
}

@media (max-width: 680px) {
  .schedule-date-navigator {
    padding: 8px 8px 10px;
  }

  .schedule-date-navigator-controls {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .schedule-range-controls {
    flex: none;
  }

  .schedule-date-navigator .schedule-capacity-strip {
    grid-auto-columns: 226px;
  }

  .schedule-date-navigator .capacity-day {
    min-height: 110px;
    padding: 10px 12px;
  }

  .schedule-order-toolbar {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .schedule-panel-title {
    grid-column: 1 / -1;
  }

  .schedule-order-list-head {
    display: none;
  }

  .schedule-order-option {
    min-height: 74px;
  }

  .schedule-order-option-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding-block: 8px;
  }

  .schedule-order-option-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .schedule-order-option-qty {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .schedule-order-situation {
    grid-column: 1;
    grid-row: 2;
  }

  .schedule-order-due {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .schedule-worker-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-worker-actions .button,
  .schedule-worker-actions .link-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .schedule-worker-table {
    overflow-x: hidden;
  }

  .schedule-worker-table table {
    display: block;
    min-width: 0;
  }

  .schedule-worker-table thead {
    display: none;
  }

  .schedule-worker-table tbody {
    display: grid;
  }

  .schedule-worker-table tr {
    display: grid;
    grid-template-columns: minmax(90px, 1.2fr) minmax(76px, .9fr) minmax(72px, .8fr);
    gap: 6px 9px;
    min-height: 84px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
  }

  .schedule-worker-table td {
    display: grid;
    align-content: center;
    height: auto;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
  }

  .schedule-worker-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .schedule-worker-table td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .schedule-worker-table td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .schedule-worker-table td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .schedule-worker-table td:nth-child(4) { grid-column: 2; grid-row: 2; }
  .schedule-worker-table td:nth-child(6) { grid-column: 3; grid-row: 2; }

  .schedule-worker-table td:nth-child(3)::before,
  .schedule-worker-table td:nth-child(4)::before,
  .schedule-worker-table td:nth-child(5)::before,
  .schedule-worker-table td:nth-child(6)::before {
    color: #8090a5;
    font-size: 10px;
    font-weight: 700;
  }

  .schedule-worker-table td:nth-child(3)::before { content: "参考"; }
  .schedule-worker-table td:nth-child(4)::before { content: "已占用"; }
  .schedule-worker-table td:nth-child(5)::before { content: "剩余"; }
  .schedule-worker-table td:nth-child(6)::before { content: "任务"; }

  .schedule-worker-table td[colspan] {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
  }

  .schedule-worker-load-track {
    width: 48px;
  }
}

@media (max-width: 860px) {
  .material-incident-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material-incident-task-input { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-incident-basics { grid-template-columns: minmax(0, 1.4fr) minmax(210px, .8fr); }
  .material-incident-basic-field:last-child {
    grid-column: 1 / -1;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid #edf1f6;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .material-incident-panel { margin-inline: 0; padding: 11px; }
  .material-incident-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .material-incident-actions .button,
  .material-incident-actions .link-button { width: 100%; justify-content: center; }
  .material-incident-task-input { grid-template-columns: 1fr; gap: 7px; }
  .material-incident-task-input > div { padding-bottom: 2px; }
  .material-resume-preview li { display: grid; gap: 3px; }

  dialog.dialog-material-incident-workflow {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 8px;
  }

  .dialog-material-incident-workflow .dialog-header {
    min-height: 52px;
    padding: 8px 12px;
  }

  .dialog-material-incident-workflow .dialog-header h2 { font-size: 16px; }
  .dialog-material-incident-workflow .dialog-body { height: calc(100% - 52px); }

  .material-incident-facts-step,
  .material-incident-review-step {
    padding: 9px 10px 0;
  }

  .material-incident-basics {
    grid-template-columns: 1fr;
    gap: 9px;
    padding-bottom: 9px;
  }

  .material-incident-basic-field + .material-incident-basic-field,
  .material-incident-basic-field:last-child {
    grid-column: auto;
    padding-top: 0;
    padding-left: 0;
    border-top: 0;
    border-left: 0;
  }

  .material-incident-basic-field { gap: 5px; }

  .material-incident-basic-field > input,
  .material-incident-basic-field > select,
  .material-time-panel > input,
  .material-time-panel > select,
  .material-incident-return-qty > input {
    height: 34px;
    min-height: 34px;
  }

  .material-segmented-control { width: 100%; }
  .material-segmented-control span { padding-inline: 5px; font-size: 11px; }

  .material-incident-workflow .material-incident-task-input-list > header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 0;
    padding: 8px 9px;
  }

  .material-incident-workflow .material-incident-task-input-list header p { line-height: 1.35; }
  .material-incident-return-modes { width: 100%; }
  .material-incident-return-modes .button { flex: 1; }
  .material-incident-task-head { display: none; }

  .material-incident-workflow .material-incident-task-input {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    min-height: 0;
    padding: 10px;
  }

  .material-incident-workflow .material-incident-task-input > *,
  .material-incident-workflow .material-incident-task-input > * + * {
    padding: 0;
    border-left: 0;
  }

  .material-incident-worker { grid-column: 1; grid-row: 1; }
  .material-incident-remaining { grid-column: 2; grid-row: 1; text-align: right; }
  .material-incident-return-qty { grid-column: 1; grid-row: 2; }
  .material-incident-start-state { grid-column: 2; grid-row: 2; align-self: end; }
  .material-incident-start-time { grid-column: 1 / -1; grid-row: 3; }
  .material-incident-start-time .material-segmented-control { width: 100%; }

  .material-incident-remaining > span,
  .material-incident-return-qty > span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .material-incident-form-error { margin-inline: 10px; }

  .material-incident-fixed-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    min-height: 86px;
    padding: 8px 10px;
  }

  .material-incident-fixed-footer > strong { font-size: 12px; }
  .material-incident-footer-step {
    position: static;
    justify-self: end;
    font-size: 11px;
    transform: none;
  }
  .material-incident-fixed-footer .dialog-actions {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }
  .material-incident-fixed-footer .button { flex: 1; min-width: 0; min-height: 36px; }

  .material-incident-review-context {
    display: grid;
    gap: 4px;
  }

  .material-incident-review-context span + span {
    padding-left: 0;
    border-left: 0;
  }

  .material-incident-review-table,
  .material-incident-review-table tbody,
  .material-incident-review-table tr,
  .material-incident-review-table td {
    display: block;
    width: 100%;
  }

  .material-incident-review-table thead { display: none; }

  .material-incident-review-table tr {
    padding: 9px 10px;
    border-bottom: 1px solid #e6ebf2;
  }

  .material-incident-review-table td,
  .material-incident-review-table td + td {
    padding: 3px 0;
    border: 0;
  }

  .material-incident-review-table td:nth-child(2)::before,
  .material-incident-review-table td:nth-child(3)::before {
    display: block;
    margin-bottom: 1px;
    color: #8090a5;
    font-size: 10px;
    font-weight: 700;
  }

  .material-incident-review-table td:nth-child(2)::before { content: "本次处理"; }
  .material-incident-review-table td:nth-child(3)::before { content: "后续安排"; }
}

/* 机工个人计划：正式队列浏览与一次性调序 */
.personal-plan-workspace {
  display: grid;
  gap: 12px;
}

.personal-plan-toolbar {
  display: grid;
  gap: 10px;
}

.personal-plan-toolbar .section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.personal-plan-toolbar .section-heading h2 { margin:0; }
.personal-plan-help { position:relative; font-size:13px; color:var(--muted); }
.personal-plan-help[open] p { position:absolute; right:0; z-index:10; width:280px; padding:14px; background:white; border:1px solid #dbe3ed; border-radius:10px; box-shadow:0 8px 24px #172b4d22; }
.personal-plan-task-search { display:flex; align-items:flex-end; gap:8px; min-width:0; }
.personal-plan-task-search label { flex:1; min-width:0; }
.personal-plan-task-search input { width:100%; min-width:0; box-sizing:border-box; min-height:42px; border:1px solid #cbd5e1; border-radius:8px; padding:8px 10px; }
.task-search-form { display:flex; gap:12px; align-items:flex-end; }
.task-search-form label { display:grid; gap:6px; flex:1; }
.task-search-form input { width:100%; box-sizing:border-box; padding:10px; }
.task-search-results article { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid #e2e8f0; }
.task-search-results article > div { display:grid; gap:5px; }
.task-lookup-detail dl { display:grid; grid-template-columns:100px 1fr; gap:10px; }
.task-lookup-detail dd { margin:0; }
.form-error details { font-size:12px; color:var(--muted); margin-top:5px; }
@media(max-width:900px) {
  .personal-plan-toolbar .personal-plan-toolbar-actions { grid-template-columns:minmax(130px,1fr) auto auto; align-items:end; }
  .personal-plan-toolbar .personal-plan-toolbar-actions > .button { grid-column:auto; white-space:nowrap; }
  .personal-plan-task-search > label { display:none !important; }
}

.personal-plan-toolbar .section-heading {
  margin-bottom: 0;
}

.personal-plan-toolbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.personal-plan-toolbar-actions label,
.personal-plan-reason {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.personal-plan-toolbar-actions select,
.personal-plan-reason input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
}

.personal-plan-worker-summary {
  display: grid;
  gap: 3px;
  align-self: center;
}

.personal-plan-worker-summary strong {
  font-size: 15px;
}

.personal-plan-worker-summary span,
.personal-plan-readonly {
  color: var(--muted);
  font-size: 12px;
}

.personal-plan-queue-panel {
  padding: 0;
  overflow: hidden;
}

.personal-plan-queue-heading {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.personal-plan-queue-heading h3,
.personal-plan-queue-heading p {
  margin: 0;
}

.personal-plan-queue-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.personal-plan-queue-head,
.personal-plan-queue-row {
  display: grid;
  grid-template-columns: 62px minmax(190px, .95fr) minmax(290px, 1.25fr) minmax(160px, .7fr) 82px;
  align-items: center;
}

.personal-plan-queue-head {
  min-height: 36px;
  padding-inline: 12px;
  color: var(--muted);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.personal-plan-queue-list {
  max-height: calc(100vh - 340px);
  min-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.personal-plan-queue-row {
  min-height: 82px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.personal-plan-queue-row:last-child {
  border-bottom: 0;
}

.personal-plan-queue-row.is-editable {
  cursor: grab;
}

.personal-plan-queue-row.is-locked {
  background: #fbfcfe;
}

.personal-plan-queue-row.is-editable:hover,
.personal-plan-queue-row.is-drop-target {
  background: var(--primary-soft);
}

.personal-plan-queue-row.is-drop-target {
  box-shadow: inset 0 2px 0 var(--primary);
}

.personal-plan-queue-row.is-dragging {
  opacity: .48;
  cursor: grabbing;
}

.personal-plan-position {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.personal-plan-position > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--ink);
  background: var(--surface-subtle);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.personal-plan-order {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 0 12px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.personal-plan-order strong {
  font-size: 15px;
}

.personal-plan-order span,
.personal-plan-order small,
.personal-plan-time small,
.personal-plan-time span,
.personal-plan-lock-note,
.personal-plan-drag-note {
  color: var(--muted);
  font-size: 12px;
}

.personal-plan-time,
.personal-plan-status {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.personal-plan-time strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.personal-plan-status {
  justify-items: start;
}

.personal-plan-workspace .personal-task-status-badge.tone-yellow {
  color: #9a5d00;
  background: var(--yellow-soft);
}

.personal-plan-lock-note,
.personal-plan-drag-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.personal-plan-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.personal-plan-row-actions .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.personal-plan-change-bar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-top: 1px solid #bfd2f8;
  font-size: 13px;
}

.personal-plan-effective-mode {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 0;
  border: 0;
}

.personal-plan-effective-mode legend {
  width: 100%;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.personal-plan-effective-mode label {
  position: relative;
  display: grid;
  min-width: 220px;
  cursor: pointer;
}

.personal-plan-effective-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.personal-plan-effective-mode span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.personal-plan-effective-mode small {
  color: var(--muted);
  font-size: 11px;
}

.personal-plan-effective-mode input:checked + span {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.personal-plan-effective-mode input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

dialog.dialog-personal-plan-preview {
  width: min(1040px, calc(100vw - 40px));
}

.personal-plan-preview {
  display: grid;
  gap: 12px;
}

.personal-plan-preview-summary {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  background: var(--primary-soft);
  border-radius: 6px;
}

.personal-plan-preview-summary span {
  color: var(--primary-dark);
  font-size: 12px;
}

.personal-plan-preview-head,
.personal-plan-preview-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, .85fr) 88px minmax(290px, 1.4fr);
  align-items: center;
  gap: 10px;
}

.personal-plan-preview-head {
  padding: 8px 10px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.personal-plan-preview-list {
  max-height: min(440px, calc(100vh - 370px));
  margin-top: -12px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.personal-plan-preview-row {
  min-height: 58px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.personal-plan-preview-row:last-child {
  border-bottom: 0;
}

.personal-plan-preview-row.is-changed {
  background: #f7faff;
}

.personal-plan-preview-row > span:first-child,
.personal-plan-preview-row > strong {
  display: grid;
  gap: 2px;
}

.personal-plan-preview-row > span:first-child b {
  font-size: 17px;
}

.personal-plan-preview-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.personal-plan-reason {
  max-width: 560px;
}

.personal-plan-preview .dialog-actions {
  margin-top: 0;
}

@media (max-width: 900px) {
  .personal-plan-toolbar-actions {
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  }

  .personal-plan-toolbar-actions > .button,
  .personal-plan-readonly {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .personal-plan-queue-head,
  .personal-plan-queue-row {
    grid-template-columns: 54px minmax(155px, .85fr) minmax(225px, 1.15fr) minmax(130px, .65fr) 76px;
  }
}

@media (max-width: 620px) {
  .personal-plan-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .personal-plan-toolbar-actions > .button,
  .personal-plan-readonly {
    grid-column: auto;
    width: 100%;
    justify-content: center;
  }

  .personal-plan-queue-head {
    display: none;
  }

  .personal-plan-queue-list {
    display: grid;
    gap: 8px;
    min-height: 180px;
    max-height: none;
    padding: 8px;
    overflow: visible;
  }

  .personal-plan-queue-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .personal-plan-position { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  .personal-plan-order { grid-column: 2; grid-row: 1; padding: 0; }
  .personal-plan-status { grid-column: 3; grid-row: 1; justify-items: end; }
  .personal-plan-time { grid-column: 2 / -1; grid-row: 2; padding-top: 7px; border-top: 1px solid var(--line); }
  .personal-plan-row-actions { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }
  .personal-plan-drag-note,
  .personal-plan-lock-note { display: none; }

  .personal-plan-change-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .personal-plan-effective-mode {
    display: grid;
  }

  .personal-plan-effective-mode label {
    min-width: 0;
  }

  .personal-plan-change-bar .button {
    width: 100%;
    justify-content: center;
  }

  dialog.dialog-personal-plan-preview {
    width: calc(100vw - 12px);
  }

  .personal-plan-preview-head {
    display: none;
  }

  .personal-plan-preview-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 360px);
    margin-top: 0;
    padding: 8px;
    border: 0;
  }

  .personal-plan-preview-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 5px 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .personal-plan-preview-row > span:last-child {
    grid-column: 2 / -1;
    color: var(--muted);
    font-size: 12px;
  }

  .personal-plan-preview .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
/* Personal planning r2: shared page/dialog and local insertion controls. */
.worker-plan-link { border: 0; background: transparent; padding: 0; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; transition: transform .12s ease, color .12s ease; text-align: left; }
.worker-plan-link:hover, .worker-plan-link:focus-visible { color: #2563eb; transform: scale(1.035); text-decoration: underline; text-underline-offset: 3px; }
.app-dialog[data-dialog-suspended="true"] { display: none !important; }
.dialog-worker-plan { width: min(96vw, 1480px); max-width: 96vw; height: min(90dvh, 950px); }
.dialog-worker-plan .dialog-body { overflow-y: auto; overflow-x: hidden; }
.dialog-worker-plan .personal-plan-toolbar { position: sticky; top: 0; z-index: 2; background: white; }
.dialog-worker-plan .personal-plan-toolbar > .section-heading { display: none; }
.personal-plan-queue-heading > .personal-task-status-badge { flex-shrink: 0; white-space: nowrap; }
.personal-plan-time.is-preview-changed strong { color: #2563eb; }
.personal-plan-time small { overflow-wrap: anywhere; }
.personal-plan-completed { margin-top: 16px; border-top: 1px solid #e2e8f0; }
.personal-plan-completed summary { padding: 14px 12px; color: #64748b; cursor: pointer; font-weight: 600; }
.personal-insertion-queue { min-width: 0; width: 100%; }
.personal-insertion-task { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; }
.personal-insertion-task small { color: #64748b; overflow-wrap: anywhere; }
.personal-insertion-current { display: flex; align-items: center; justify-content: space-between; padding: 12px; margin: 8px 0; border: 1px solid #2563eb; border-radius: 7px; background: #eff6ff; color: #2563eb; cursor: grab; }
.personal-insertion-current button { min-width: 36px; min-height: 34px; margin-left: 6px; border: 1px solid #cbd5e1; background: white; border-radius: 6px; cursor: pointer; }
.personal-insertion-slot { display: block; width: 100%; padding: 5px; margin: 4px 0; border: 1px dashed #cbd5e1; border-radius: 5px; background: white; color: #64748b; cursor: pointer; }
.personal-insertion-slot:hover { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.form-error [data-action="split-personal-quantity-increase"], .personal-adjustment-message [data-action="split-personal-quantity-increase"] { display: block; margin-top: 10px; white-space: normal; }
@media (max-width: 640px) {
  .dialog-worker-plan { width: calc(100vw - 16px); max-width: calc(100vw - 16px); }
  .dialog-worker-plan .personal-plan-toolbar-actions { align-items: stretch; }
  .dialog-worker-plan .personal-plan-queue-row { min-width: 0; }
}
/* Detail execution r2: scoped presentation; the dialog body owns vertical scrolling. */
.detail-execution-v2 { display: grid; gap: 14px; min-width: 0; container-type: inline-size; }
.detail-execution-v2 h2, .detail-execution-v2 h3 { margin: 0; }
.detail-overview, .detail-key-dates, .detail-execution-heading, .detail-management, .detail-cut-summary, .detail-cut-actions, .detail-empty-channel, .detail-current-action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-overview, .detail-execution-heading, .detail-cut-summary, .detail-empty-channel, .detail-current-action { justify-content: space-between; }
.detail-key-dates > span { display: grid; gap: 4px; padding: 8px 12px; border-left: 1px solid var(--line); }
.detail-key-dates small, .detail-cut-summary small { display: block; color: var(--muted); }
.detail-current-action, .detail-cut-section, .detail-record-section, .detail-material-section { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; }
.detail-current-action { background: #eef5ff; border-color: #bed4f5; }
.detail-current-action > div { display: grid; gap: 4px; }
.detail-execution-heading { margin-bottom: 10px; }
.detail-management { justify-content: flex-end; gap: 8px; }
.detail-management [data-management-size="auto"] { width: auto; min-width: 0; }
.detail-management [data-management-size="compact"] { width: 100px; }
.detail-management [data-management-size="regular"] { width: 140px; }
.detail-task-grid { display: grid; gap: 14px; align-items: start; min-width: 0; }
.detail-task-grid.has-both { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.detail-task-grid.has-single { grid-template-columns: minmax(0, 1fr); }
.detail-execution-v2 .detail-task-panel { display: block; min-width: 0; height: auto; max-height: none; overflow: visible; margin: 0; }
.detail-execution-v2 .personal-task-operation-table, .detail-execution-v2 .personal-assignment-compact-list { height: auto; max-height: none; overflow: visible; }
.detail-execution-v2 .personal-task-operation-head { display: none; }
.detail-execution-v2 .personal-assignment-compact-row { grid-template-columns: 1fr 0.8fr 1.6fr 0.9fr 1fr; gap: 8px; align-items: start; }
.detail-execution-v2 .personal-assignment-compact-row > div::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; }
.detail-execution-v2 .personal-task-row-actions { justify-content: flex-start; }
.detail-execution-v2 .personal-task-projection strong { white-space: normal; overflow: visible; }
.detail-completed-tasks { margin-top: 12px; }
.detail-completed-tasks > summary, .detail-record-section > summary, .detail-material-section > summary { cursor: pointer; font-weight: 600; padding: 4px; }
.detail-record-section[open] > summary, .detail-material-section[open] > summary { margin-bottom: 12px; }
.detail-empty-channel { padding: 10px 2px; color: var(--muted); }
.detail-cut-summary { gap: 10px; }
.detail-cut-actions { margin-left: auto; }
.detail-cut-section details[data-cut-receipt-summary] > summary { display: none; }
.detail-cut-section details[data-cut-receipt-summary]:not([open]) { margin: 0; padding: 0; border: 0; }
.detail-risks { display: grid; gap: 6px; }
.detail-risk-summary, .detail-risk-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #ecd49c; background: #fff9e9; border-radius: 8px; color: #765000; min-width: 0; }
.detail-risk-summary { width: 100%; cursor: pointer; text-align: left; font: inherit; }
.detail-risk-summary.tone-red, .detail-risk-row.tone-red { background: #fff2f1; border-color: #efc1bc; color: #9f2925; }
.detail-risk-summary > span:nth-child(2), .detail-risk-copy > span:nth-child(2) { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.detail-risk-count { margin-left: auto; flex-shrink: 0; }
.detail-risk-copy { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; color: inherit; text-align: left; font: inherit; }
button.detail-risk-copy { cursor: pointer; align-self: stretch; }
.detail-risk-symbol { display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; }
.detail-risk-row > .button { flex-shrink: 0; }
.detail-risk-more { justify-self: start; margin-left: 30px; }
@container (max-width: 1100px) {
  .detail-task-grid.has-both { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 600px) {
  .detail-execution-v2 .personal-assignment-compact-row { grid-template-columns: minmax(0, 1fr); }
}

/* Detail r3: reference-aligned, page-only visual organization. */
.detail-execution-v3 { gap: 12px; font-size: 14px; line-height: 1.5; color: #24334c; }
.detail-execution-v3 [data-order-alert-zone]:empty { display: none; }
.detail-execution-v3 [data-detail-risk-first] { cursor: pointer; }
.detail-execution-v3 [data-detail-risk-first]:hover { box-shadow: inset 0 0 0 1px #d8ad6a; }
.detail-execution-v3 .detail-overview { padding: 0; min-height: 0; align-items: center; }
.detail-execution-v3 .detail-overview h2 { font-size: 18px; line-height: 1.5; }
.detail-execution-v3 .detail-overview > div:first-child > strong { display: inline-block; margin: 4px 8px 0 0; font-size: 14px; }
.detail-execution-v3 .detail-key-dates { gap: 0; align-items: stretch; }
.detail-execution-v3 .detail-key-dates > span { gap: 1px; padding: 0 14px; min-height: 0; }
.detail-execution-v3 .detail-key-dates > .link-button { display: inline-flex; align-items: center; align-self: stretch; padding: 0 0 0 12px; min-height: 0; }
.detail-execution-v3 [data-action="detail-locate-cut"] { cursor: pointer; border-radius: 4px; }
.detail-execution-v3 [data-action="detail-locate-cut"]:hover { background: #e5efff; }
.detail-execution-v3 [data-action="detail-locate-cut"]:focus-visible { outline: 2px solid #2463bb; outline-offset: 3px; }
.detail-execution-v3 .detail-cut-section:focus-visible { outline: 2px solid #2463bb; outline-offset: 3px; }
.detail-execution-v3 .detail-cut-located { animation: detail-cut-locate 1.6s ease-out; }
@keyframes detail-cut-locate { from { background: #dceaff; box-shadow: 0 0 0 3px #7ba6e9; } to { background: white; box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
 .detail-execution-v3 .detail-cut-located { animation: detail-cut-locate-static 1.6s step-end; }
 @keyframes detail-cut-locate-static { from { background: #dceaff; } to { background: white; } }
}
.detail-execution-v3 .detail-key-dates strong { font-size: 16px; font-weight: 700; }
.detail-execution-v3 .detail-date-status[data-status="inactive"] { color: #52647e; background: #edf1f6; }
.detail-execution-v3 .detail-date-status[data-status="pending"] { color: #925809; background: #fff3d1; }
.detail-execution-v3 .detail-key-dates small { font-size: 13px; line-height: 20px; }
.detail-execution-v3 .detail-date-status { display: inline-block; color: #206746; background: #e8f6ed; padding: 0 5px; border-radius: 4px; font-size: 12px; font-weight: 400; }
.detail-execution-v3 .order-detail-core-metrics { padding: 12px 16px; background: #f0f6ff; border: 1px solid #cbdcf6; border-radius: 8px; gap: 14px; min-height: 0; }
.detail-execution-v3 .order-detail-core-metrics > span { padding: 0 12px; min-height: 0; }
.detail-execution-v3 .order-detail-core-metrics strong { font-size: 20px; line-height: 1.4; }
.detail-execution-v3 .order-detail-core-metrics small { font-size: 13px; }
.detail-execution-v3 .detail-current-action { background: #fff9ea; border-color: #f1dcb3; padding: 9px 12px; gap: 8px; }
.detail-execution-v3 .detail-current-action > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 200px; }
.detail-execution-v3 .detail-todo-label { color: #8b650a; font-size: 13px; }
.detail-execution-v3 .detail-current-action strong { font-size: 14px; }
.detail-execution-v3 .detail-execution-section { padding: 12px; border: 1px solid #cbdcf6; border-radius: 8px; background: #f6f9ff; }
.detail-execution-v3 .detail-execution-heading { gap: 8px; }
.detail-execution-v3 h2, .detail-execution-v3 h3 { font-size: 16px; font-weight: 700; }
.detail-execution-v3 .button { padding: 7px 12px; min-height: 34px; font-size: 14px; border-radius: 6px; white-space: normal; overflow-wrap: normal; }
.detail-execution-v3 .button-small { padding: 6px 8px; }
.detail-execution-v3 .button-secondary { background: #fff; border-color: #c7d9f4; color: #2463bb; }
.detail-execution-v3 .detail-management { gap: 6px; }
.detail-execution-v3 .detail-task-grid { gap: 12px; }
.detail-execution-v3 .detail-task-grid.has-both { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.detail-execution-v3 .detail-task-panel { padding: 0; border: 1px solid #d7e2f0; border-radius: 8px; background: white; }
.detail-execution-v3 .detail-task-panel > .section-heading { padding: 12px; margin: 0; min-height: 0; gap: 8px; }
.detail-execution-v3 .section-heading p { margin: 3px 0 0; font-size: 13px; }
.detail-execution-v3 .personal-order-detail-plan { gap: 0; }
.detail-execution-v3 .personal-task-operation-table { border: 0; border-radius: 0; }
.detail-execution-v3 .personal-task-operation-head,
.detail-execution-v3 .personal-assignment-compact-row { display: grid; grid-template-columns: minmax(90px,1fr) minmax(78px,.8fr) minmax(138px,1.35fr) minmax(82px,.9fr) minmax(88px,.9fr); padding: 9px 12px; gap: 8px; }
.detail-execution-v3 .personal-task-operation-head { background: #edf4ff; color: #52647e; font-size: 13px; font-weight: 700; min-height: 0; }
.detail-execution-v3 .personal-assignment-compact-list { display: block; }
.detail-execution-v3 .personal-assignment-compact-row { border: 0; border-bottom: 1px solid #e8eef6; border-radius: 0; align-items: center; min-height: 0; background: white; }
.detail-execution-v3 .personal-assignment-compact-row > div::before { display: none; }
.detail-execution-v3 .personal-assignment-compact-row > div { min-width: 0; grid-column: auto; grid-row: auto; padding: 0; border: 0; }
.detail-execution-v3 .personal-assignment-compact-row strong { font-size: 14px; font-weight: 700; }
.detail-execution-v3 .personal-assignment-compact-row small { font-size: 13px; line-height: 1.4; }
.detail-execution-v3 .personal-task-projection strong { font-weight: 400; overflow-wrap: normal; }
.detail-execution-v3 .personal-task-status-badge { font-size: 13px; font-weight: 400; white-space: normal; padding: 3px 6px; }
.detail-execution-v3 .personal-task-row-actions { display: flex; justify-content: flex-start; }
.detail-execution-v3 .personal-task-row-actions .button { width: auto; max-width: 100%; }
.detail-execution-v3 .detail-completed-tasks { margin: 0; padding: 10px 12px; background: #f8faff; }
.detail-execution-v3 .detail-outsource-head, .detail-execution-v3 .detail-outsource-values { display: grid; grid-template-columns: minmax(126px,1.6fr) repeat(3,minmax(52px,.7fr)) minmax(78px,1fr); gap: 8px; align-items: center; }
.detail-execution-v3 .detail-outsource-head { padding: 9px 12px; background: #edf4ff; font-size: 13px; font-weight: 700; color: #52647e; }
.detail-execution-v3 .detail-outsource-row { padding: 12px; border-bottom: 1px solid #e8eef6; display: grid; gap: 8px; }
.detail-execution-v3 .detail-outsource-values > div { min-width: 0; }
.detail-execution-v3 .detail-outsource-values small { display: block; color: var(--muted); font-size: 13px; }
.detail-execution-v3 .detail-outsource-balances { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: #52647e; }
.detail-execution-v3 .detail-outsource-balances b { color: #24334c; }
.detail-execution-v3 .detail-outsource-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-execution-v3 .detail-outsource-history { flex-basis: 100%; }
.detail-execution-v3 .detail-outsource-history summary, .detail-execution-v3 .material-evidence summary { cursor: pointer; color: #2463bb; font-size: 13px; }
.detail-execution-v3 .return-history { padding: 10px; background: #f8faff; font-size: 13px; overflow-wrap: anywhere; }
.detail-execution-v3 .detail-boundary-note { color: #925809; background: #fff9e9; padding: 8px; margin: 0; font-size: 13px; }
.detail-execution-v3 .detail-cut-section, .detail-execution-v3 .detail-record-section, .detail-execution-v3 .detail-material-section { border-color: #d0ddf0; border-radius: 8px; padding: 10px 12px; }
.detail-execution-v3 .detail-record-section > summary, .detail-execution-v3 .detail-material-section > summary { font-size: 14px; font-weight: 700; padding: 0; }
.detail-execution-v3 .material-incident-panel { margin: 0; padding: 0; border: 0; background: none; }
.detail-execution-v3 .material-incident-row { padding: 10px; margin-top: 8px; gap: 8px; }
.detail-execution-v3 .material-incident-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.detail-execution-v3 .material-incident-facts > span { display: flex; gap: 6px; align-items: baseline; }
.detail-execution-v3 .material-incident-facts strong { font-size: 14px; }
.detail-execution-v3 .material-incident-row p { margin: 0; font-size: 13px; }
.detail-execution-v3 .material-affected-tasks { font-size: 13px; }
.detail-execution-v3 .material-incident-actions { margin: 0; gap: 6px; }
.detail-execution-v3 .detail-grid { gap: 0; margin-top: 12px; background: white; }
.detail-execution-v3 .detail-task-panel .empty-state { min-height: 0; padding: 18px 12px; }
.detail-execution-v3 .direct-needle-execution {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d7e2f0;
  border-radius: 8px;
}
.detail-execution-v3 .direct-needle-execution > .section-heading {
  min-height: 0;
  margin: 0;
  padding: 12px;
  background: #edf4ff;
  border-bottom: 1px solid #d7e2f0;
}
.detail-execution-v3 .direct-needle-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.detail-execution-v3 .direct-needle-facts > span {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px;
}
.detail-execution-v3 .direct-needle-facts > span + span { border-left: 1px solid #e3eaf3; }
.detail-execution-v3 .direct-needle-facts small { color: #60708a; font-size: 13px; }
.detail-execution-v3 .direct-needle-facts strong { color: #24334c; font-size: 16px; overflow-wrap: anywhere; }
.progress-machine-cell.is-not-applicable {
  --progress-ink: #52647e;
  --progress-body: #6b778c;
  --progress-muted: #7a8798;
  background: #f5f7fa;
}
.route-change-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.route-change-check input { width: 16px; height: 16px; margin-top: 2px; flex: 0 0 auto; }
.route-change-blockers { margin: 0; padding-left: 20px; color: #8f2b27; }
.detail-execution-v3 .return-history { display: grid; gap: 4px; }
.detail-execution-v3 .detail-grid > div { border: 0; border-bottom: 1px solid #e8eef6; padding: 10px; min-height: 0; }
.detail-execution-v3 .detail-grid strong { font-size: 14px; }
.detail-execution-v3 .detail-grid small { font-size: 13px; }
.detail-execution-v3 .detail-risk-summary:hover, .detail-execution-v3 button.detail-risk-copy:hover { filter: brightness(.96); }
.detail-execution-v3 button:focus-visible, .detail-execution-v3 summary:focus-visible { outline: 2px solid #2463bb; outline-offset: 3px; }
.detail-execution-v3 .detail-risk-summary, .detail-execution-v3 .detail-risk-row { padding: 8px 12px; }
@container (max-width: 1239px) {
 .detail-execution-v3 .detail-task-grid.has-both { grid-template-columns: minmax(0,1fr); }
}
@container (max-width: 620px) {
 .detail-execution-v3 .personal-task-operation-head, .detail-execution-v3 .detail-outsource-head { display: none; }
 .detail-execution-v3 .personal-assignment-compact-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; padding: 12px; }
 .detail-execution-v3 .personal-assignment-compact-row > div::before, .detail-execution-v3 .detail-outsource-values > div::before { content: attr(data-label); display: block; font-size: 13px; color: #52647e; }
 .detail-execution-v3 .personal-assignment-compact-row > .personal-task-projection { grid-column: 1 / -1; }
 .detail-execution-v3 .detail-outsource-values { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .detail-execution-v3 .detail-outsource-values > div:first-child { grid-column: 1 / -1; }
 .detail-execution-v3 .detail-current-action > div { min-width: 0; flex-basis: 100%; }
 .detail-execution-v3 .order-detail-core-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .detail-execution-v3 .detail-key-dates { flex-wrap: wrap; gap: 8px; }
 .detail-execution-v3 .detail-key-dates > span { padding: 0 8px; }
 .detail-execution-v3 .direct-needle-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .detail-execution-v3 .direct-needle-facts > span:nth-child(odd) { border-left: 0; }
 .detail-execution-v3 .direct-needle-facts > span:nth-child(n + 3) { border-top: 1px solid #e3eaf3; }
}

@media (max-width: 1100px) {
  .detail-task-grid.has-both { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .detail-key-dates { width: 100%; gap: 6px; }
  .detail-key-dates > span { padding: 6px; }
  .detail-management { justify-content: flex-start; }
  .detail-risk-summary, .detail-risk-row { flex-wrap: wrap; }
  .detail-risk-count { width: calc(100% - 28px); margin-left: 28px; }
  .detail-cut-actions { margin-left: 0; }
  .detail-execution-v2 .personal-assignment-compact-row { grid-template-columns: minmax(0, 1fr); }
  .production-route-choice { grid-template-columns: minmax(0, 1fr); }
}

/* Completion review: one plain-language decision card and compact two-step dialogs. */
.completion-review-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, .9fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #e7c66d;
  border-left: 5px solid #d49a11;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0 0%, #fffdf8 100%);
  box-shadow: 0 8px 24px rgba(146, 104, 12, .08);
}
.completion-review-card.is-overdue {
  border-color: #efb4ac;
  border-left-color: #d8584f;
  background: linear-gradient(135deg, #fff6f4 0%, #fffafa 100%);
}
.completion-review-card-copy { display: grid; gap: 5px; min-width: 0; }
.completion-review-card-copy > span { color: #8a620b; font-size: 12px; font-weight: 700; }
.completion-review-card.is-overdue .completion-review-card-copy > span { color: #b43d35; }
.completion-review-card-copy > strong { color: var(--ink); font-size: 17px; line-height: 1.35; }
.completion-review-card-copy > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.completion-review-card-facts,
.completion-review-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.completion-review-card-facts > span,
.completion-review-facts > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .84);
}
.completion-review-card-facts small,
.completion-review-facts small { color: var(--muted); font-size: 11px; }
.completion-review-card-facts strong,
.completion-review-facts strong { color: var(--ink); font-size: 14px; }
.completion-review-card > .button { white-space: nowrap; }
.dialog-completion-review { width: min(720px, calc(100vw - 28px)); }
.completion-review-form { gap: 16px; }
.completion-review-form .form-summary { margin: 0; }
.completion-review-facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.completion-review-question {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 10px;
  background: #f4f7fb;
}
.completion-review-question > span { color: var(--muted); font-size: 13px; }
.completion-review-question > strong { color: var(--ink); font-size: 18px; line-height: 1.45; }
.completion-review-scope-note,
.completion-review-last {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #eef5ff;
  color: #33577e;
  font-size: 13px;
  line-height: 1.5;
}
.completion-review-last { background: #fff6dc; color: #72540c; }
.completion-review-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.completion-review-actions .link-button { margin-right: auto; }

@media (max-width: 900px) {
  .completion-review-card { grid-template-columns: minmax(0, 1fr) auto; }
  .completion-review-card-facts { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 620px) {
  .completion-review-card { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .completion-review-card-facts { grid-column: auto; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completion-review-card > .button { width: 100%; }
  .completion-review-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .completion-review-actions { align-items: stretch; flex-direction: column; }
  .completion-review-actions .button { width: 100%; }
  .completion-review-actions .link-button { align-self: center; margin: 2px 0 0; }
}
/* Runtime maintenance is instance control; it does not represent an order status. */
.runtime-maintenance-banner {
  position: sticky;
  top: 0;
  z-index: 2000;
  padding: 8px 16px;
  border-bottom: 1px solid #d6a327;
  background: #fff4cc;
  color: #684b00;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
/* Material exception decorates the historical arrival fact; it never changes its quantity. */
.detail-execution-v3 .order-detail-core-metrics > .material-arrival-warning {
  background: #fff4f3;
  box-shadow: inset 0 0 0 1px #f29b94;
  color: #a32620;
}
.detail-execution-v3 .material-arrival-warning strong { color: #a32620; }
.detail-execution-v3 .material-date-adjusted > strong { color: #7753ad; text-decoration: underline dotted; text-underline-offset: 4px; }
.detail-execution-v3 .material-date-history { font-size: 12px; position: relative; }
.detail-execution-v3 .material-date-history summary { cursor: pointer; color: #7753ad; }
.detail-execution-v3 .material-date-history li { display: grid; gap: 4px; margin-block: 8px; }
.detail-execution-v3 .material-date-history p { white-space: normal; line-height: 1.5; }
.material-queue-preview { padding-left: 20px; }
.material-queue-preview li { display: grid; gap: 6px; padding-block: 8px; }
.material-queue-preview small { color: #52627a; }
/* Schema42 compact production preparation: two decisions, one current date. */
.preparation-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.preparation-form legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.preparation-form .execution-due-options { display: flex; gap: 10px; }
.preparation-form .execution-due-options label { display: flex; flex: 1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; padding: 12px; }
.preparation-form .execution-due-options input[type="radio"] { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; margin: 0; }
.preparation-form .execution-due-options label > span { flex: 1; white-space: nowrap; font-size: 14px; }
.preparation-form .execution-due-options strong { font-size: 14px; }
.preparation-form .execution-due-options small { display: block; margin-top: 5px; font-weight: 400; }
.preparation-form [data-preparation-price].is-hidden { display: none; }
.orders-workspace .order-list-toolbar { padding: 6px 8px; min-width: 0; }
.orders-workspace .order-list-toolbar-main { display: flex; flex-wrap: nowrap; min-height: 44px; min-width: 0; gap: 6px; }
.orders-workspace .order-quick-filters { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-width: 0; }
.order-quick-filters > button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 8px 10px; white-space: nowrap; border: 1px solid #d9e0eb; border-radius: 7px; background: #fff; color: #34435e; font: inherit; font-size: 14px; cursor: pointer; }
.order-quick-filters > button.is-active { background: #316af0; color: #fff; border-color: #316af0; }
.order-quick-filters > button:disabled { opacity: .5; cursor: not-allowed; }
.shortcut-count { font-size: 12px; font-variant-numeric: tabular-nums; background: #edf0f6; color: #53617a; border-radius: 4px; padding: 0 4px; }
.is-active > .shortcut-count { background: #ffffff24; color: #fff; }
.order-heading-search { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.order-heading-search > input { width: 270px; height: 36px; }
.orders-workspace #order-results { overflow-x: auto; min-width: 0; max-width: 100%; }
.orders-workspace .order-list-menu-group { flex: 0 0 auto; margin-left: auto; }
.orders-workspace .order-list-filter-menu > div { position: absolute; right: 0; top: 44px; width: 410px; max-width: calc(100vw - 40px); z-index: 80; display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; background: #fff; border: 1px solid #d9e0eb; border-radius: 10px; box-shadow: 0 12px 32px #172e5126; }
.orders-workspace .order-list-filter-menu:not([open]) > div { display: none; }
@media(max-width:1200px) { .order-quick-filters > button[data-order-filter="cancelled"], .order-quick-filters > button[data-order-filter="recycle_bin"] { display: none; } .order-heading-search > input { width: 220px; } }
@media(max-width:1050px) { .orders-workspace .order-list-tools { display: none; } .order-quick-filters > button { padding: 7px; gap: 4px; } }
.system-workspace > [hidden] { display: none !important; }
.system-section-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface, #fff); border: 1px solid #dfe6ef; }
.system-section-nav button { border: 0; border-radius: 9px; padding: 10px 14px; color: #33465f; background: transparent; font: inherit; cursor: pointer; }
.system-section-nav button.is-active { color: #174c9d; background: #eaf2ff; font-weight: 700; }
.system-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.system-category-card { min-height: 94px; text-align: left; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 17px 38px 17px 17px; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; color: #23364f; cursor: pointer; }
.system-category-card:hover, .system-category-card:focus-visible { border-color: #5e91dd; background: #f5f9ff; }
.system-category-card strong { font-size: 16px; }
.system-category-card span { font-size: 13px; line-height: 1.45; color: #63748b; }
.system-category-card i { position: absolute; right: 14px; top: 17px; width: 18px; height: 18px; }
.system-organization-panels { display: grid; gap: 16px; }
.system-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.system-link-list { display: grid; gap: 8px; }
.system-link-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 11px 14px; }
.system-link-list span { display: grid; gap: 3px; }
.system-link-list small { color: #66768a; }
.order-scope-control { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 4px; }
.order-scope-control .button { min-height: 28px; padding: 0 9px; }
.order-owner-form { display: grid; gap: 12px; padding: 14px; border: 1px solid #dfe6ef; border-radius: 10px; background: #f8fbff; }
.order-owner-form fieldset { margin: 0; padding: 10px; border: 1px solid #dfe6ef; border-radius: 8px; }
.order-owner-form fieldset[hidden] { display: none; }
.order-owner-choices { display: flex; flex-wrap: wrap; gap: 8px 16px; max-height: 150px; overflow: auto; }
.order-owner-choices label { display: inline-flex; align-items: center; gap: 5px; }
.order-owner-choices label[hidden] { display: none; }
.order-owner-form > small { color: #62758b; }
@media (max-width: 720px) { .system-section-nav { overflow-x: auto; flex-wrap: nowrap; } .system-section-nav button { white-space: nowrap; } .system-link-list > div { align-items: flex-start; flex-direction: column; } }

/* Production progress r14: six scan columns with contained, source-labelled facts. */
.progress-visual-r14 .progress-filter-bar { display: block; min-width: 0; }
.progress-visual-r14 .progress-filter-tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.progress-visual-r14 .progress-attention-toggle { flex: 0 0 auto; min-height: 36px; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--progress-body, var(--ink)); font: inherit; cursor: pointer; }
.progress-visual-r14 .progress-attention-toggle.is-active { border-color: var(--progress-attention, #c47900); background: var(--progress-attention-soft, #fff7ed); font-weight: 700; }
.progress-visual-r14 .progress-attention-toggle strong { margin-left: 4px; font-variant-numeric: tabular-nums; }
.business-filter-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; width: 100%; min-width: 0; }
.business-filter-primary { flex: 1 1 660px; min-width: 0; max-width: 100%; }
.business-filter-auxiliary { position: relative; flex: 0 1 auto; min-width: 0; max-width: 100%; padding-left: 10px; border-left: 1px solid var(--line); }
.business-filter-heading { display: flex; align-items: center; gap: 4px; min-height: 18px; margin: 0 0 2px; color: #64748b; font-size: 11px; font-weight: 400; line-height: 1.4; }
.business-filter-help { display: inline-flex; }
.business-filter-help-trigger { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #64748b; font: inherit; font-size: 13px; cursor: help; }
.business-filter-help-text { display: none; position: absolute; top: 22px; right: 0; z-index: 30; width: max-content; max-width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-size: 12px; line-height: 1.5; font-weight: 400; }
.business-filter-help:not([data-dismissed]):hover .business-filter-help-text,
.business-filter-help:not([data-dismissed]):focus-within .business-filter-help-text { display: block; }
.business-filter-layout .business-filter-options { display: flex; flex-wrap: nowrap; margin: 0; overflow-x: auto; scrollbar-width: thin; }
.business-filter-layout .progress-filter-tabs button { flex: 1 0 auto; min-width: 0; min-height: 36px; padding: 6px 10px; font-size: 14px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.business-filter-layout .progress-filter-tabs button.is-active { font-weight: 700; }
.business-filter-layout .progress-filter-tabs button strong { font-size: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
.business-filter-auxiliary-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 36px; }
.business-filter-layout .business-delay-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 11px; border: 1px solid #f1c27d; border-radius: 7px; background: #fff7ed; color: #965d00; font: inherit; font-size: 14px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.business-filter-layout .business-delay-filter:hover { background: #ffedc2; }
.business-filter-layout .business-delay-filter.is-active { border-color: #c47900; background: #ffedc2; box-shadow: inset 0 -2px 0 #c47900; font-weight: 700; }
.business-filter-layout .business-delay-filter strong { color: inherit; font-size: inherit; font-weight: 700; font-variant-numeric: tabular-nums; }
.business-filter-layout button:focus-visible,
.business-filter-layout summary:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.business-filter-layout .progress-attention-toggle { font-size: 14px; line-height: 1.4; white-space: nowrap; }
.orders-workspace .order-list-toolbar-main .business-filter-layout { flex: 1 1 auto; }
.orders-workspace .business-filter-primary { flex-basis: 760px; }
.orders-workspace .business-filter-options { gap: 6px; }
.orders-workspace .business-filter-auxiliary-options { min-height: 36px; }
.orders-workspace .business-filter-layout .order-list-menu-group { margin-left: 0; }
.orders-workspace .business-filter-layout .order-list-filter-menu { position: static; }
.orders-workspace .business-filter-layout .order-list-filter-menu > div { top: calc(100% + 4px); right: 0; max-width: min(410px, 100%); }
@media (max-width: 1200px) {
  .business-filter-auxiliary { flex-basis: 100%; padding-left: 0; padding-top: 6px; border-left: 0; border-top: 1px solid var(--line); }
  .orders-workspace .business-filter-primary { flex-basis: 660px; }
}
.production-progress-workspace { gap: 6px; }
.production-progress-workspace .progress-search-panel { gap: 5px; margin: 2px 0; padding: 3px 6px; }
.production-progress-workspace .progress-search-panel textarea { height: 32px; min-height: 32px; padding: 3px 8px; line-height: 1.4; }
.app-shell .production-progress-workspace .progress-search-refresh.button-small { min-height: 32px; }
.production-progress-workspace .progress-matrix-sticky-head { height: 34px; margin-bottom: -34px; }
.production-progress-workspace .progress-matrix-sticky-grid > span { height: 34px; padding: 6px 11px; line-height: 1.4; font-weight: 700; }
.production-progress-workspace .production-flow-matrix th { height: 34px; padding: 6px 11px; line-height: 1.4; font-weight: 700; }
.progress-visual-r14 .production-flow-matrix { min-width: 1300px; }
.progress-visual-r14 .progress-matrix-sticky-grid { min-width: 1300px; grid-template-columns: 14fr 16fr 22fr 13fr 22fr 13fr; }
.progress-visual-r14 .production-flow-matrix th:nth-child(1) { width: 14%; }
.progress-visual-r14 .production-flow-matrix th:nth-child(2) { width: 16%; }
.progress-visual-r14 .production-flow-matrix th:nth-child(3) { width: 22%; }
.progress-visual-r14 .production-flow-matrix th:nth-child(4) { width: 13%; text-align: left; }
.progress-visual-r14 .production-flow-matrix th:nth-child(5) { width: 22%; }
.progress-visual-r14 .production-flow-matrix th:nth-child(6) { width: 13%; }
.progress-visual-r14 .progress-matrix-sticky-grid > span:nth-child(4) { justify-content: flex-start; text-align: left; }
.progress-visual-r14 .production-flow-matrix td { min-width: 0; overflow-wrap: anywhere; word-break: normal; vertical-align: top; padding: 13px 11px; }
.progress-visual-r14 .production-flow-matrix td > * { min-width: 0; max-width: 100%; }
.progress-visual-r14 .progress-process-cell { gap: 5px; }
.progress-visual-r14 .progress-process-cell > strong { font-size: 17px; line-height: 1.35; }
.progress-visual-r14 .progress-process-cell small { white-space: normal; line-height: 1.45; }
.progress-visual-r14 .progress-task-remainder { color: var(--progress-attention, #a86600); font-size: 15px; line-height: 1.4; font-weight: 700; }
.progress-visual-r14 .progress-time-fact { color: var(--progress-body, var(--ink)); font-weight: 600; }
.progress-visual-r14 .progress-matrix-needle { justify-items: start; text-align: left; }
.progress-visual-r14 .progress-matrix-needle > strong { width: auto; max-width: 100%; white-space: normal; }
.progress-visual-r14 .progress-needle-reference { overflow-wrap: anywhere; line-height: 1.5; }
.progress-visual-r14 .progress-matrix-advancement { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 7px; min-height: 0; padding: 0; cursor: default; }
.progress-visual-r14 .progress-issue { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; min-width: 0; gap: 3px; padding: 2px 0; }
.progress-visual-r14 .progress-issue + .progress-issue { padding-top: 7px; border-top: 1px solid var(--line); }
.progress-visual-r14 .progress-issue > span { width: auto; max-width: 100%; padding: 2px 7px; border-radius: 999px; background: var(--progress-attention-soft, #fff7ed); color: var(--progress-attention, #a86600); font-size: 12px; font-weight: 700; }
.progress-visual-r14 .progress-issue.tone-red > span { background: var(--progress-risk-soft, #fef2f2); color: var(--progress-risk, #b42318); }
.progress-visual-r14 .progress-issue > strong { min-width: 0; max-width: 100%; font-size: 14px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.progress-visual-r14 .progress-issue-action { padding: 2px 0; min-height: 27px; text-align: left; }
.progress-visual-r14 .progress-issue-overflow { min-width: 0; border-top: 1px solid var(--line); padding-top: 5px; }
.progress-visual-r14 .progress-issue-overflow > summary { width: max-content; max-width: 100%; color: var(--progress-primary, #225cbb); cursor: pointer; font-size: 13px; font-weight: 700; }
.progress-visual-r14 .progress-issue-overflow .progress-issue { margin-top: 7px; }
.progress-visual-r14 .progress-matrix-due > span, .progress-visual-r14 .progress-matrix-due > strong { padding-right: 0; }
.progress-visual-r14 .progress-matrix-due > strong { overflow-wrap: anywhere; }
.progress-visual-r14 .progress-due-relative, .progress-visual-r14 .progress-batch-due { font-weight: 650; }
@media (min-width: 821px) {
  .progress-visual-r14 .progress-matrix-scroll { overflow-x: auto; scrollbar-width: thin; }
  .view-progress .progress-visual-r14 .progress-matrix-top-scroll:not([hidden]),
  .view-order_progress .progress-visual-r14 .progress-matrix-top-scroll:not([hidden]) { display: block; }
}
@media (max-width: 820px) {
  .progress-visual-r14 .progress-filter-bar { align-items: stretch; flex-direction: column; gap: 7px; }
  .progress-visual-r14 .progress-attention-toggle { align-self: flex-start; }
  .progress-visual-r14 .progress-search-row > strong { display: block; grid-column: 1 / -1; grid-row: 2; }
  .progress-visual-r14 .production-flow-matrix { min-width: 0; }
  .progress-visual-r14 .production-flow-matrix .progress-process-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-visual-r14 .production-flow-matrix td:nth-child(4) { grid-column: 1 / -1; border-right: 0; }
  .progress-visual-r14 .progress-matrix-needle { min-height: 0; }
}

/* Keep the compact allocation summary easy to notice and open. */
.personal-plan-dialog .schedule-allocation-panel > summary {
  min-height: 46px;
  padding: 7px 12px;
}

.personal-plan-dialog .schedule-allocation-panel > summary:hover {
  background: #eef4ff;
}

.personal-plan-dialog .schedule-allocation-panel > summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -3px;
}

.personal-plan-dialog .schedule-allocation-panel > summary > b {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.personal-plan-dialog .schedule-allocation-panel > summary > b::after {
  content: "";
  width: 8px;
  height: 8px;
  margin: -4px 3px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.personal-plan-dialog .schedule-allocation-panel[open] > summary > b::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

/* The creation form remains visible when allocated outsourcing has no tasks. */
.personal-plan-dialog .schedule-outsourcing-current:has(> .empty-state) {
  display: none;
}
/* Keep the adjustment actions above the dialog footer on short desktop screens. */
@media (min-width: 901px) and (max-height: 820px) {
  .personal-plan-dialog .personal-adjustment-drawer {
    max-height: min(var(--personal-adjustment-height), calc(100dvh - 275px));
  }
}

/* Arrange Production: compact 15/30-day cards, with load as the first metric. */
.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) {
  display: flex;
  flex-wrap: nowrap;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day {
  display: flex;
  flex: 0 0 168px;
  flex-direction: column;
  align-items: stretch;
  width: 168px;
  min-width: 168px;
  height: auto;
  min-height: 158px;
  gap: 0;
  padding: 13px 10px;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-date {
  padding-bottom: 9px;
  border-bottom: 1px solid #e5eaf2;
  white-space: nowrap;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-load-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin-top: 9px;
  color: #5f718a;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-load-row small {
  font-size: 12px;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-load {
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  white-space: nowrap;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-load-bar {
  flex: none;
  margin-top: 7px;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-primary {
  margin-top: 11px;
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-context {
  margin-top: 8px;
  font-size: 12px;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-near-full .capacity-day-load,
.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-near-full .capacity-day-primary {
  color: #9a3412;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-overloaded .capacity-day-load,
.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-overloaded .capacity-day-primary {
  color: #b91c1c;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-stopped:not(.is-department-rest) .capacity-day-load {
  font-size: 16px;
  line-height: 1.3;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-department-rest {
  flex-basis: 92px;
  align-items: center;
  width: 92px;
  min-width: 92px;
  padding: 14px 7px;
  background: #f1f5f9;
  text-align: center;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-department-rest .capacity-day-date {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 0;
  border-bottom: 0;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day-rest-label {
  margin-top: 20px;
  color: #475569;
  font-size: 14px;
  white-space: nowrap;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-department-rest .capacity-day-context {
  margin-top: 9px;
  font-size: 11px;
}

.schedule-date-navigator .schedule-capacity-strip:not(.is-seven-day) .capacity-day.is-department-rest.is-selected {
  background: #eef4ff;
}

.personal-shortcut-popover { position: fixed; inset: auto; margin: 0; width: 304px; max-width: calc(100vw - 16px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 5px 18px #18263b20; font-size: 14px; line-height: 1.45; }
.personal-shortcut-popover::backdrop { background: transparent; pointer-events: none; }
.personal-shortcut-heading { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.personal-shortcut-heading > strong { font-size: 14px; }
.personal-shortcut-heading > span { margin-left: auto; color: var(--muted); font-size: 12px; }
.personal-shortcut-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.personal-shortcut-close:hover { background: var(--surface-subtle); }
.personal-shortcut-popover p { margin: 0; }
.personal-shortcut-popover [hidden] { display: none !important; }
.personal-picker-search { display: block; width: 100%; min-height: 32px; height: 32px; padding: 5px 8px; margin-bottom: 8px; font-size: 13px; }
.personal-picker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 176px; overflow-y: auto; overscroll-behavior: contain; }
.personal-worker-chip { min-width: 0; min-height: 36px; padding: 6px 3px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; cursor: pointer; }
.personal-worker-chip.is-selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.personal-worker-chip.is-protected { border-style: dashed; }
.personal-shortcut-popover button:focus-visible, .personal-shortcut-popover input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.personal-shortcut-feedback { margin-top: 7px !important; color: var(--muted); font-size: 13px; line-height: 1.4; }
.personal-picker-add { display: inline-block; padding: 0; margin-top: 6px; font-size: 13px; min-height: 28px; }
.personal-average-trigger { font-size: 13px; min-height: 32px; white-space: nowrap; }
.personal-average-mobile { display: none; }
.personal-plan-summary-heading > [data-action="add-personal-assignment"], .personal-plan-summary-heading > .personal-average-mobile { flex-shrink: 0; white-space: nowrap; }
.personal-shortcut-average { width: 272px; }
.personal-average-summary { color: var(--muted); }
.personal-average-entry { display: flex; align-items: center; gap: 8px; margin-top: 9px; font-size: 14px; }
.personal-average-entry input { min-width: 0; width: 116px; height: 36px; min-height: 36px; padding: 6px 8px; font-size: 14px; }
.personal-average-result { margin-top: 9px !important; font-size: 14px; }
.personal-average-apply { width: 100%; min-height: 36px; margin-top: 10px; padding: 6px 10px; }
.personal-average-overwrite { margin-top: 9px; font-size: 13px; }
.personal-average-overwrite > div { display: flex; gap: 6px; margin-top: 8px; }
.personal-average-overwrite button { flex: 1; min-height: 36px; padding: 6px; font-size: 13px; }
.dialog-production-print .dialog-body { background: var(--canvas); }
.production-print-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.production-print-toolbar p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.production-print-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.production-print-viewport { position: relative; width: 100%; overflow: auto; background: var(--canvas); }
.production-print-frame { display: block; border: 0; margin: 0; transform-origin: top left; background: #fff; }
@media (max-width: 640px) {
  .personal-average-mobile { display: inline-flex; }
  .personal-plan-summary-heading { flex-wrap: wrap; gap: 6px 8px; }
  .personal-plan-summary-heading .personal-plan-heading-copy { flex: 1 0 100%; }
  .personal-plan-summary-heading > .button { width: auto; flex: none; }
  .personal-worker-chip, .personal-average-entry input, .personal-average-apply, .personal-average-overwrite button { min-height: 40px; }
  .production-print-toolbar { display: grid; gap: 12px; }
  .production-print-toolbar > div button { min-height: 44px; }
}
