:root {
  --bg: #eef5f3;
  --panel: #ffffff;
  --text: #18333b;
  --muted: #66777f;
  --line: #d4e1df;
  --primary: #246b68;
  --primary-strong: #185754;
  --success: #287a4f;
  --warning: #b66a24;
  --danger: #b63d3d;
  --teal: #246b68;
  --violet: #68529b;
  --ink: #102f37;
  --paper: #fffdf8;
  --cream: #fff7e8;
  --mint: #eefbf7;
  --rose: #fff1ef;
  --blue-paper: #f5f7ff;
  --studio-shadow: 0 16px 36px rgba(31, 72, 78, 0.10);
  --shadow: 0 18px 48px rgba(27, 58, 66, 0.16);
}

/* 兰哈丁工作台基线：让品牌、任务和状态形成稳定的视觉语言。 */
:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --text: #16383c;
  --muted: #718486;
  --line: #d8e3e0;
  --primary: #135e63;
  --primary-strong: #0e4c52;
  --success: #2e8b70;
  --warning: #b97822;
  --danger: #c84d4d;
  --teal: #135e63;
  --violet: #725ba6;
  --ink: #14363b;
  --paper: #fffdf8;
  --cream: #fff6e7;
  --mint: #eef8f4;
  --rose: #fff1ef;
  --blue-paper: #f2f6fb;
  --studio-shadow: 0 12px 28px rgba(22, 56, 60, 0.09);
  --shadow: 0 18px 44px rgba(22, 56, 60, 0.16);
}

.topbar {
  min-height: 72px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #cfdedb;
  box-shadow: 0 6px 22px rgba(22, 56, 60, 0.08);
  backdrop-filter: blur(12px);
}

.topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #aecfc8;
  border-radius: 8px 8px 3px 8px;
  color: #fffdf8;
  background: #135e63;
  box-shadow: 4px 4px 0 #e8c995;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.brand-lockup h1 {
  margin: 0;
  color: #14363b;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.topbar h1::after {
  content: none;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: #718486 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.topbar .header-time {
  gap: 6px;
  min-height: 24px;
  margin-top: 0;
  padding-left: 13px;
  border-left: 1px solid #d8e3e0;
}

.topbar-actions {
  gap: 8px;
}

.topbar-actions button {
  min-height: 34px;
  border-radius: 7px;
  font-weight: 800;
}

.topbar-actions .new-action {
  box-shadow: 0 5px 12px rgba(19, 94, 99, 0.16);
}

.board,
.alert-panel,
.smart-workbench,
.studio-wall {
  border-color: #cfdedb;
  box-shadow: 0 8px 22px rgba(22, 56, 60, 0.055);
}

.smart-workbench-head > div > span,
.studio-eyebrow,
.redline-head > span {
  color: #8b6b2d;
  letter-spacing: 0.08em;
}

.smart-workbench-head > div > strong {
  color: #135e63;
}

.order-next-step {
  display: block;
  max-width: 190px;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #718486;
  font-size: 11px;
  line-height: 1.35;
}

tbody tr:hover .order-next-step {
  color: #135e63;
}

.ai-check-kicker {
  color: #8b6b2d !important;
}

.ai-check-panel {
  border-left-width: 4px;
}

.toast,
.toast-in-modal {
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 42, 46, 0.22);
  font-weight: 800;
}

dialog,
.drawer-panel {
  border-color: #c7d9d5;
}

dialog .dialog-actions {
  border-top: 1px solid #d8e3e0;
  background: rgba(255, 253, 248, 0.96);
}

.detail-tabs {
  border-color: #cfdedb;
}

.detail-tabs button.active {
  background: #135e63;
  box-shadow: 0 5px 12px rgba(19, 94, 99, 0.15);
}

.mobile-dock {
  display: none;
}

.production-ledger {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #cfe1dc;
  border-left: 4px solid #b97822;
  border-radius: 7px;
  background: #fffaf0;
}

.production-ledger-head,
.production-ledger-grid,
.production-ledger-item {
  min-width: 0;
}

.production-ledger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.production-ledger-head > div {
  display: grid;
  gap: 3px;
}

.production-ledger-head span {
  color: #8b6b2d;
  font-size: 11px;
  font-weight: 800;
}

.production-ledger-head strong {
  color: #254d52;
  font-size: 14px;
}

.production-ledger-head em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #e4c892;
  border-radius: 999px;
  color: #98621f;
  background: #fff6e7;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.production-ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.production-ledger-grid > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #eadfca;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
}

.production-ledger-grid span,
.production-ledger-item span {
  display: block;
  color: #7a898a;
  font-size: 11px;
}

.production-ledger-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #254d52;
  font-size: 13px;
}

.production-ledger-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.production-ledger-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #e7d9be;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
}

.production-ledger-item.pending {
  border-color: #e4b4b4;
  background: #fff5f3;
}

.production-ledger-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #254d52;
  font-size: 12px;
}

.production-ledger-item.pending strong,
.production-ledger-item.pending span {
  color: #a84545;
}

.detail-section h3 {
  letter-spacing: 0.02em;
}

.status-badge,
.badge {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .topbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .topbar .header-time {
    padding-left: 0;
    border-left: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .brand-lockup h1 {
    font-size: 18px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .scan-action,
  .topbar-actions .report-action {
    display: none;
  }

  .topbar-actions .new-action {
    padding: 8px 9px;
    font-size: 12px;
  }

  .order-next-step {
    max-width: none;
  }

  .mobile-dock {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border: 1px solid #c8dad6;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(22, 56, 60, 0.16);
    backdrop-filter: blur(10px);
  }

  .mobile-dock button {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 42px;
    padding: 4px 2px;
    border-radius: 7px;
    color: #718486;
    background: transparent;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-dock button:first-child {
    color: #135e63;
    background: #eef8f4;
  }

  .mobile-dock button:hover,
  .mobile-dock button:focus-visible {
    color: #135e63;
    background: #eef8f4;
  }

  .mobile-dock button span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1;
  }

  .drawer-content {
    padding-bottom: 78px;
  }

  .production-ledger-grid,
  .production-ledger-items {
    grid-template-columns: 1fr;
  }

  .production-ledger-head {
    align-items: flex-start;
  }
}

/* 转发建单的附件确认区：先让操作者知道会带哪些资料，再确认建单。 */
.draft-attachment-summary {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #b7ddd5;
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: #f1faf8;
  color: #164e63;
}

.draft-attachment-summary > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.draft-attachment-summary strong {
  font-size: 14px;
}

.draft-attachment-summary span,
.draft-attachment-summary p {
  color: #5b7280;
  font-size: 12px;
}

.draft-attachment-summary p {
  margin: 7px 0 0;
  line-height: 1.7;
}

.source-attachment-warning {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #f0b36b;
  border-left: 4px solid #c97316;
  border-radius: 9px;
  background: #fff7e8;
  color: #7a430d;
}

.source-attachment-warning strong {
  font-size: 13px;
}

.source-attachment-warning span {
  color: #8b6a43;
  font-size: 12px;
}

/* Forwarded WeCom messages are confirmed in a small, focused workspace. */
.draft-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.draft-action b {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #d88a28;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
}

#inboundDraftDialog {
  width: min(1080px, calc(100vw - 28px));
  max-width: 1080px;
  padding: 0;
}

.inbound-draft-box {
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #fbfcf9;
}

.inbound-draft-layout {
  display: grid;
  grid-template-columns: minmax(230px, .75fr) minmax(0, 1.6fr);
  min-height: 440px;
  border: 1px solid #d7e4df;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.inbound-draft-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-right: 1px solid #e1ebe7;
  background: #f2f8f5;
  overflow: auto;
}

.inbound-draft-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d3e4df;
  border-left: 3px solid #d98b29;
  border-radius: 8px;
  background: #fffdf8;
  color: #274951;
  text-align: left;
  cursor: pointer;
}

.inbound-draft-card:hover,
.inbound-draft-card.is-selected {
  border-color: #19716e;
  box-shadow: 0 3px 12px rgba(25, 113, 110, .12);
  background: #f1fbf8;
}

.inbound-draft-card strong { font-size: 13px; }
.inbound-draft-card small { color: #6a8083; }

.inbound-draft-detail {
  min-width: 0;
  padding: 16px;
  overflow: auto;
}

.draft-detail-head,
.draft-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draft-detail-head { margin-bottom: 12px; }
.draft-detail-head h3 { margin: 0; color: #173f47; }
.draft-meta { color: #6b8185; font-size: 12px; }

.draft-warning {
  margin: 10px 0;
  padding: 9px 11px;
  border: 1px solid #efc26e;
  border-radius: 7px;
  background: #fff8e9;
  color: #855b18;
  font-size: 12px;
}

.draft-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.draft-fields label { display: grid; gap: 4px; color: #5b7277; font-size: 12px; }
.draft-fields .wide { grid-column: 1 / -1; }
.draft-fields input,
.draft-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #cfe0dc;
  border-radius: 6px;
  color: #274951;
  background: #fff;
  font: inherit;
}
.draft-fields textarea { min-height: 62px; resize: vertical; }
.draft-original {
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px dashed #c8dad6;
  border-radius: 7px;
  background: #f8fbfa;
}
.draft-original summary { cursor: pointer; color: #176d6b; font-size: 12px; font-weight: 700; }
.draft-original pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #5e7477; font: 12px/1.55 inherit; }
.draft-detail-actions { margin-top: 14px; justify-content: flex-end; }

.order-source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: -4px 0 10px;
  color: #6d8285;
  font-size: 11px;
}
.order-source-line b {
  color: #8a5c18;
  font-weight: 700;
}

@media (max-width: 720px) {
  #inboundDraftDialog { width: calc(100vw - 14px); }
  .inbound-draft-box { padding: 12px; }
  .inbound-draft-layout { grid-template-columns: 1fr; min-height: 0; }
  .inbound-draft-list { max-height: 180px; border-right: 0; border-bottom: 1px solid #e1ebe7; }
  .draft-fields { grid-template-columns: 1fr; }
  .draft-fields .wide { grid-column: auto; }
}

/* Home queue: a compact worklist replaces tall repeated task cards. */
.smart-queue {
  gap: 9px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #f4fbfa, #fffdf8);
}

.smart-queue .smart-workbench-head {
  align-items: center;
}

.smart-queue .smart-workbench-head strong {
  font-size: 18px;
}

.smart-queue .smart-workbench-head small {
  max-width: none;
}

.smart-task-list {
  display: grid;
  gap: 6px;
}

.smart-task-row {
  display: grid;
  grid-template-columns: 30px minmax(170px, 1.05fr) minmax(220px, 1.7fr) minmax(86px, 0.7fr) minmax(112px, 0.85fr) auto;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #d5e2e2;
  border-left: 3px solid #197d75;
  border-radius: 7px;
  color: #173b44;
  background: #fff;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.smart-task-row:hover,
.smart-task-row:focus-visible {
  border-color: #5d9f98;
  box-shadow: 0 5px 14px rgba(31, 72, 78, 0.09);
  transform: translateY(-1px);
}

.smart-task-row.tone-red { border-left-color: #c74343; background: #fff7f5; }
.smart-task-row.tone-amber { border-left-color: #c27820; background: #fffaf0; }
.smart-task-row.tone-violet { border-left-color: #7858ac; background: #fbf8ff; }
.smart-task-row.tone-teal { border-left-color: #197d75; background: #f4fbf8; }

.smart-row-index {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: #246b68;
  font-size: 10px;
  font-weight: 900;
}

.smart-row-main,
.smart-row-hint,
.smart-row-owner,
.smart-row-deadline {
  min-width: 0;
  overflow: hidden;
}

.smart-row-main {
  display: grid;
  gap: 2px;
}

.smart-row-main strong,
.smart-row-main small,
.smart-row-hint,
.smart-row-owner,
.smart-row-deadline {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-row-main strong {
  font-size: 13px;
}

.smart-row-main small,
.smart-row-hint,
.smart-row-owner,
.smart-row-deadline {
  color: #667b82;
  font-size: 11px;
}

.smart-row-hint {
  color: #49676f;
}

.smart-row-action {
  padding: 4px 7px;
  border: 1px solid #b8d7d1;
  border-radius: 999px;
  color: #0f7068;
  background: #eff9f5;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.smart-task-row:hover .smart-row-action,
.smart-task-row:focus-visible .smart-row-action {
  color: #fff;
  border-color: #135e63;
  background: #135e63;
}

.smart-queue .smart-task-empty {
  padding: 12px;
}

.intelligence-compact {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(250px, 1fr) minmax(260px, 1.35fr);
  align-items: center;
  gap: 10px 16px;
  padding: 10px 13px;
}

.intelligence-compact .intelligence-strip-head {
  min-width: 0;
}

.intelligence-compact .intelligence-strip-head strong {
  font-size: 16px;
}

.intelligence-compact .intelligence-strip-head small {
  white-space: nowrap;
}

.intelligence-compact .intelligence-strip-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0;
}

.intelligence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #d8e3e0;
  border-radius: 999px;
  color: #61777d;
  background: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.intelligence-pill b {
  color: #173b44;
  font-size: 13px;
}

.intelligence-pill.ready { border-color: #b8dcca; background: #f1fbf6; }
.intelligence-pill.review { border-color: #ead19b; background: #fff9ee; }
.intelligence-pill.blocked { border-color: #e4b4b4; background: #fff2f0; }
.intelligence-pill.risk { border-color: #d4c9e8; background: #f8f4ff; }

.intelligence-compact .intelligence-review-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 7px 9px;
  border: 1px solid #d8e3e0;
  border-radius: 8px;
  color: #315e65;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.intelligence-compact .intelligence-review-link:hover,
.intelligence-compact .intelligence-review-link:focus-visible {
  border-color: #c68a27;
  background: #fffaf0;
}

.intelligence-compact .intelligence-review-link span {
  color: #718486;
  font-size: 11px;
}

.intelligence-compact .intelligence-review-link strong,
.intelligence-compact .intelligence-review-link em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intelligence-compact .intelligence-review-link strong {
  padding: 0 10px;
  color: #173b44;
  font-size: 12px;
}

.intelligence-compact .intelligence-review-link em {
  color: #a86817;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.intelligence-compact .intelligence-empty {
  margin: 0;
}

@media (max-width: 1180px) {
  .smart-task-row {
    grid-template-columns: 30px minmax(160px, 1fr) minmax(180px, 1.25fr) minmax(90px, 0.7fr) auto;
  }

  .smart-row-deadline { display: none; }

  .intelligence-compact {
    grid-template-columns: minmax(190px, 0.8fr) minmax(220px, 1fr);
  }

  .intelligence-compact .intelligence-review-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .smart-queue .smart-workbench-head {
    align-items: flex-start;
  }

  .smart-queue .smart-workbench-head small {
    max-width: 46%;
    text-align: right;
  }

  .smart-task-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 6px 9px;
    padding: 9px;
  }

  .smart-row-hint {
    grid-column: 2 / -1;
  }

  .smart-row-owner,
  .smart-row-deadline {
    display: none;
  }

  .smart-row-action {
    grid-column: 3;
    grid-row: 1;
  }

  .intelligence-compact {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .intelligence-compact .intelligence-strip-head small {
    white-space: normal;
  }

  .intelligence-compact .intelligence-review-link {
    grid-column: auto;
  }
}

/* Explainable intelligence layer: evidence first, action second. */
.intelligence-strip,
.intelligence-detail-panel {
  min-width: 0;
  border: 1px solid #cfe1dc;
  border-left: 4px solid #246b68;
  border-radius: 10px;
  background: linear-gradient(135deg, #f7fcfa 0%, #fffdf8 100%);
  box-shadow: 0 8px 20px rgba(22, 56, 60, 0.06);
}

.intelligence-strip {
  margin-top: 12px;
  padding: 14px;
}

.intelligence-strip-head,
.intelligence-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intelligence-strip-head > div,
.intelligence-detail-head > div:first-child {
  display: grid;
  gap: 3px;
}

.intelligence-strip-head span,
.intelligence-detail-head span,
.intelligence-reasons > span,
.intelligence-findings > span,
.intelligence-assignment > span {
  color: #8b6b2d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.intelligence-strip-head strong,
.intelligence-detail-head strong {
  color: #135e63;
  font-size: 18px;
}

.intelligence-strip-head small,
.intelligence-footnote {
  color: #718486;
  font-size: 11px;
  line-height: 1.45;
}

.intelligence-strip-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.intelligence-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #d8e3e0;
  border-left: 3px solid #246b68;
  border-radius: 8px;
  background: #fff;
}

.intelligence-metric span {
  overflow-wrap: anywhere;
  color: #66777f;
  font-size: 12px;
}

.intelligence-metric b {
  color: #16383c;
  font-size: 20px;
  line-height: 1;
}

.intelligence-metric.ready { border-left-color: #2e8b70; background: #f1fbf6; }
.intelligence-metric.review { border-left-color: #b97822; background: #fff9ee; }
.intelligence-metric.blocked { border-left-color: #c84d4d; background: #fff2f0; }
.intelligence-metric.risk { border-left-color: #725ba6; background: #f8f4ff; }

.badge.intelligence-ready { color: #287a4f; background: #eef8f4; border-color: #a5d5bf; }
.badge.intelligence-review { color: #8b5a1b; background: #fff6df; border-color: #e6c887; }
.badge.intelligence-blocked { color: #a83d3d; background: #fff0ee; border-color: #e3a09a; }
.badge.intelligence-archived { color: #63777b; background: #f2f5f4; border-color: #cbd9d6; }

.intelligence-top-order {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  color: #16383c;
  border: 1px solid #d8e3e0;
  border-left: 3px solid #b97822;
  border-radius: 8px;
  background: #fffaf0;
  text-align: left;
}

.intelligence-top-order span,
.intelligence-top-order small {
  color: #718486;
  font-size: 11px;
}

.intelligence-top-order strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.intelligence-top-order em {
  color: #135e63;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.intelligence-empty {
  margin: 10px 0 0;
  color: #718486;
  font-size: 12px;
}

.intelligence-detail-panel {
  margin-top: 12px;
  padding: 13px;
}

.intelligence-detail-panel.ready { border-left-color: #2e8b70; background: #f1fbf6; }
.intelligence-detail-panel.review { border-left-color: #b97822; background: #fffaf0; }
.intelligence-detail-panel.blocked { border-left-color: #c84d4d; background: #fff3f1; }
.intelligence-detail-panel.archived { border-left-color: #87999b; background: #f7f9f8; }

.intelligence-risk-badge {
  padding: 5px 8px;
  border: 1px solid #b9d8d2;
  border-radius: 999px;
  color: #246b68;
  background: #effaf6;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.intelligence-risk-badge.attention { color: #8b5a1b; border-color: #e7c788; background: #fff5d9; }
.intelligence-risk-badge.high { color: #a83d3d; border-color: #e8a5a0; background: #fff0ee; }

.intelligence-next-action {
  margin: 10px 0;
  color: #16383c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.intelligence-delay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #cfe1dc;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
  color: #246b68;
  font-size: 12px;
}
.intelligence-delay.watch { color: #8b5a1b; border-color: #e6c887; background: #fff8e9; }
.intelligence-delay.overdue { color: #a83d3d; border-color: #e3a09a; background: #fff0ee; }
.intelligence-delay span { text-align: right; white-space: nowrap; }
.intelligence-delay small { grid-column: 1 / -1; color: #718486; }

.intelligence-reasons,
.intelligence-findings,
.intelligence-assignment {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.intelligence-reasons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.intelligence-reasons em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #8b5a1b;
  background: #fff2cd;
  font-size: 11px;
  font-style: normal;
}

.intelligence-finding {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #e6c887;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

.intelligence-finding.critical { border-color: #e3a09a; background: #fff0ee; }
.intelligence-finding b { color: #16383c; font-size: 12px; }
.intelligence-finding small { color: #66777f; line-height: 1.4; }
.intelligence-finding em { color: #8b5a1b; font-size: 11px; font-style: normal; font-weight: 800; }
.intelligence-clear { margin-top: 9px; color: #287a4f; font-size: 12px; font-weight: 800; }

.intelligence-assignment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assignment-suggestion {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d8e3e0;
  border-radius: 7px;
  color: #16383c;
  background: #fff;
  text-align: left;
}

.assignment-suggestion small { color: #718486; }
.intelligence-footnote { display: block; margin-top: 11px; }

.revision-comparison {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #e7c788;
  border-radius: 7px;
  background: #fffaf0;
}

.revision-comparison > span { color: #8b5a1b; font-size: 11px; font-weight: 900; }
.revision-comparison > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  font-size: 12px;
}
.revision-comparison b { color: #66777f; }
.revision-comparison small { color: #8a5b5b; overflow-wrap: anywhere; }
.revision-comparison i { color: #b97822; font-style: normal; text-align: center; }
.revision-comparison strong { color: #135e63; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .intelligence-strip-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-strip-head,
  .intelligence-detail-head { display: grid; }
  .intelligence-top-order { grid-template-columns: 1fr; }
  .intelligence-top-order em { justify-self: start; }
  .intelligence-assignment { grid-template-columns: 1fr; }
  .intelligence-delay { grid-template-columns: 1fr; }
  .intelligence-delay span { text-align: left; }
  .revision-comparison > div { grid-template-columns: 64px minmax(0, 1fr); }
  .revision-comparison i { display: none; }
  .revision-comparison strong { grid-column: 2; }
}

.studio-swatch em,
.redline-note em,
.receipt-line em,
.station-tag em {
  display: block;
  color: currentColor;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  opacity: .86;
}

.studio-swatch em {
  align-self: end;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed currentColor;
}

.redline-note {
  grid-template-areas:
    "label value"
    "hint value"
    "cta value";
}

.redline-note em {
  grid-area: cta;
  margin-top: 4px;
}

.receipt-line,
.station-tag {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px;
}

.receipt-line em,
.station-tag em {
  white-space: nowrap;
}

/* 真实工作语义：待办卡片先回答“现在做什么、谁负责、截止到哪”。 */
.smart-task-card {
  position: relative;
  grid-template-areas:
    "top top"
    "title title"
    "order order"
    "hint hint"
    "meta meta"
    "signals signals"
    "cta cta";
  min-height: 184px;
  padding: 14px 15px 12px;
  text-align: left;
  border: 1px solid #d7e4df;
  border-top: 3px solid #246b68;
  border-radius: 8px;
  background: #fffefa;
  box-shadow: 0 8px 18px rgba(31, 72, 78, 0.07);
}

.smart-task-card.is-primary {
  min-height: 202px;
  border-top-width: 5px;
  box-shadow: 0 12px 24px rgba(31, 72, 78, 0.11);
}

.smart-task-card.tone-red { border-top-color: #c74343; background: #fff7f5; }
.smart-task-card.tone-amber { border-top-color: #c27820; background: #fffaf0; }
.smart-task-card.tone-violet { border-top-color: #7858ac; background: #fbf8ff; }
.smart-task-card.tone-teal { border-top-color: #197d75; background: #f4fbf8; }

.smart-task-card strong {
  color: #173b44;
  font-size: 16px;
  line-height: 1.3;
}

.smart-task-card p {
  min-height: 32px;
  margin: 2px 0 0;
  color: #48646b;
  line-height: 1.45;
}

.smart-task-meta {
  display: flex;
  grid-area: meta;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px dashed #d5e1dd;
  color: #60767b;
  font-size: 11px;
  line-height: 1.35;
}

.smart-task-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.smart-task-cta {
  display: inline-flex;
  grid-area: cta;
  align-items: center;
  justify-self: start;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid #b8d7d1;
  border-radius: 999px;
  color: #0f7068;
  background: #eff9f5;
  font-size: 11px;
  font-weight: 900;
}

.smart-task-card:hover .smart-task-cta,
.smart-task-card:focus-visible .smart-task-cta {
  color: #fff;
  background: #135e63;
  border-color: #135e63;
}

.smart-task-signals {
  grid-area: signals;
  min-height: 18px;
}

.current-action-card {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid #c9e0da;
  border-left: 5px solid #197d75;
  border-radius: 8px;
  background: linear-gradient(135deg, #f1fbf7, #fffefa);
}

.current-action-card.is-critical {
  border-color: #edb8b2;
  border-left-color: #c74343;
  background: #fff6f4;
}

.current-action-card.is-locked {
  border-color: #d6e0e3;
  border-left-color: #778990;
  background: #f7fafb;
}

.current-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.current-action-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.current-action-head span {
  color: #8b6b2d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

.current-action-head strong {
  min-width: 0;
  color: #173b44;
  font-size: 17px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.current-action-head em {
  flex: 0 0 auto;
  max-width: 42%;
  padding: 4px 8px;
  border: 1px solid #b8d7d1;
  border-radius: 999px;
  color: #0f7068;
  background: #f4fffb;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  overflow-wrap: anywhere;
  text-align: center;
}

.current-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.current-action-grid > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(190, 215, 210, 0.85);
  border-radius: 6px;
  background: rgba(255,255,255,.75);
}

.current-action-grid span,
.current-action-grid b {
  display: block;
  overflow-wrap: anywhere;
}

.current-action-grid span {
  margin-bottom: 3px;
  color: #668087;
  font-size: 10px;
}

.current-action-grid b {
  color: #214c54;
  font-size: 12px;
  line-height: 1.35;
}

.current-action-card p {
  margin: 0;
  color: #5e7479;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .smart-task-card,
  .smart-task-card.is-primary {
    min-height: 0;
  }

  .smart-task-card p {
    min-height: 0;
  }

  .current-action-grid {
    grid-template-columns: 1fr;
  }

  .current-action-head {
    flex-direction: column;
  }

  .current-action-head em {
    max-width: 100%;
  }
}

/* 兰哈丁工作台视觉改版：品牌带、纸张网格与三种工作语气。 */
body {
  background-color: #edf3f0;
  background-image:
    linear-gradient(rgba(19, 94, 99, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 94, 99, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

.topbar {
  min-height: 76px;
  padding: 13px 22px;
  color: #fffdf8;
  background: #123f44;
  border-bottom: 4px solid #d6a64e;
  box-shadow: 0 8px 24px rgba(18, 63, 68, 0.22);
}

.brand-mark {
  color: #123f44;
  background: #fff4dc;
  border-color: #f0d193;
  box-shadow: 4px 4px 0 #d6a64e;
}

.brand-lockup h1 {
  color: #fffdf8;
}

.brand-subtitle {
  color: #c9dcda !important;
}

.topbar .header-time {
  color: #e9f3ed;
  border-left-color: rgba(255, 253, 248, 0.28);
}

.topbar-actions .user-badge {
  color: #eaf5ef;
  background: rgba(255, 253, 248, 0.11);
  border-color: rgba(255, 253, 248, 0.28);
}

.topbar-actions button.ghost {
  color: #fff4dc;
  background: rgba(255, 253, 248, 0.08);
  border-color: rgba(255, 253, 248, 0.34);
}

.topbar-actions button.ghost:hover,
.topbar-actions button.ghost:focus-visible {
  color: #123f44;
  background: #fff4dc;
  border-color: #fff4dc;
}

.topbar-actions .report-action {
  color: #d7f0e9;
  border-color: #6cb4a3;
}

.topbar-actions .new-action {
  color: #123f44;
  background: #e5bb67;
  border-color: #f1d18d;
  box-shadow: 0 4px 0 #a97725;
}

.topbar-actions .new-action:hover,
.topbar-actions .new-action:focus-visible {
  background: #f0cf88;
}

.layout {
  gap: 16px;
  padding-top: 16px;
}

.studio-wall {
  gap: 14px;
  padding: 14px;
  background: #fffdf8;
  border: 1px solid #c9ddd7;
  border-top: 4px solid #135e63;
  box-shadow: 0 14px 30px rgba(18, 63, 68, 0.1);
}

.studio-main {
  min-height: 252px;
  padding: 20px;
  background-color: #f1fbf7;
  background-image:
    linear-gradient(rgba(19, 94, 99, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 94, 99, 0.055) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid #b9d8d0;
  border-radius: 12px;
}

.studio-copy {
  max-width: 310px;
}

.studio-copy strong {
  max-width: 360px;
  color: #0f5d60;
  font-size: clamp(25px, 2.2vw, 34px);
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.studio-copy p {
  max-width: 290px;
  color: #557475;
  font-size: 13px;
  line-height: 1.65;
}

.swatch-board {
  gap: 10px;
  align-self: stretch;
}

.studio-swatch {
  min-height: 156px;
  padding: 15px 14px;
  border-radius: 10px;
  box-shadow: 0 7px 0 rgba(18, 63, 68, 0.06);
}

.studio-swatch strong {
  margin-top: 18px;
  font-size: 34px;
}

.redline-board {
  padding: 18px;
  background: #fff8f5;
  border: 1px solid #f0c9c0;
  border-top: 4px solid #c84d4d;
  border-radius: 12px;
}

.redline-head strong {
  font-size: 24px;
}

.redline-note {
  min-height: 66px;
  border-radius: 9px;
}

.studio-info-hub {
  padding: 18px;
  background: #f5f7ff;
  border: 1px solid #c9d4ee;
  border-top: 4px solid #5369c7;
  border-radius: 12px;
}

.info-hub-head strong {
  color: #3453bb;
  font-size: 25px;
}

.receipt-line,
.station-tag {
  min-height: 42px;
  border-radius: 8px;
}

.smart-workbench {
  padding: 18px;
  background: #fffaf0;
  border: 1px solid #e6d2a7;
  border-top: 4px solid #c4862d;
  box-shadow: 0 10px 24px rgba(158, 102, 28, 0.08);
}

.smart-workbench-head strong {
  color: #174e52;
  font-size: 23px;
}

.smart-task-card {
  border-radius: 10px;
}

.board,
.alert-panel {
  background: #fffdf8;
  border-color: #c9ddd7;
  box-shadow: 0 12px 26px rgba(18, 63, 68, 0.08);
}

.board-head,
.panel-head {
  padding: 16px 18px;
}

.board-head h2,
.panel-head h2 {
  color: #123f44;
  font-size: 18px;
}

.board .table-wrap {
  border-top: 1px solid #d7e4e0;
}

.board thead th {
  color: #44686a;
  background: #eef6f2;
}

.alert-panel {
  border-top: 4px solid #c84d4d;
}

@media (max-width: 720px) {
  .topbar {
    min-height: 70px;
    padding: 10px 12px;
  }

  .studio-wall {
    padding: 9px;
  }

  .studio-main,
  .redline-board,
  .studio-info-hub,
  .smart-workbench {
    padding: 13px;
  }

  .studio-copy strong {
    font-size: 27px;
  }

  .studio-swatch {
    min-height: 112px;
  }

  .studio-swatch strong {
    margin-top: 8px;
    font-size: 28px;
  }
}

.revision-target-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #f4f0ff;
  border: 1px solid #cbb8ef;
  border-left: 4px solid #725ba6;
  border-radius: 9px;
}

.revision-target-fields label {
  margin: 0;
}

.revision-target-hint {
  margin: 0;
  color: #725ba6;
  font-weight: 700;
}

.design-item-card:has(.template-change-row) {
  border-color: #d8b86b;
  background: #fffaf0;
  box-shadow: inset 4px 0 0 #c4862d;
}

.template-change-badge,
.template-change-mark {
  display: inline-flex;
  align-items: center;
  color: #7b4f10;
  background: #ffe8b3;
  border: 1px solid #e5b957;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.template-change-badge {
  padding: 4px 8px;
}

.template-change-row {
  padding: 10px;
  border: 1px solid #e5b957;
  border-radius: 7px;
  background: #fff4d6;
}

.template-change-row b {
  color: #8b5d12;
}

.template-change-values {
  display: grid;
  gap: 5px;
}

.template-change-mark {
  width: fit-content;
  padding: 3px 7px;
}

.template-change-values strong {
  color: #6f4b13;
  overflow-wrap: anywhere;
}

.revision-template-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  margin: 8px 0;
  padding: 10px 12px;
  color: #6f4b13;
  background: #fff4d6;
  border: 1px solid #e5b957;
  border-left: 4px solid #c4862d;
  border-radius: 8px;
}

.revision-template-highlight b,
.revision-template-highlight span {
  overflow-wrap: anywhere;
}

.revision-template-highlight em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 5px 8px;
  color: #7b4f10;
  background: #ffe8b3;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .revision-target-fields {
    grid-template-columns: 1fr;
  }

  .revision-template-highlight {
    grid-template-columns: 1fr;
  }

  .revision-template-highlight em {
    grid-column: 1;
    grid-row: auto;
    width: fit-content;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(36,107,104,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36,107,104,0.028) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(36, 107, 104, 0.36);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(246,251,249,0.94)),
    rgba(252, 254, 254, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(24, 51, 59, 0.06);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.topbar h1::after {
  content: " 兰哈丁";
  color: #9a6a22;
  font-size: 13px;
  font-weight: 800;
}

.topbar span {
  color: var(--muted);
  font-size: 12px;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar .header-time {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
  margin-top: 4px;
  color: #557078;
  font-size: 11px;
  line-height: 1.2;
}

.topbar .header-date,
.topbar .header-now {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  box-sizing: border-box;
  border-radius: 999px;
}

.topbar .header-date {
  padding: 3px 8px;
  color: #466770;
  background: #f0f8f6;
  border: 1px solid #cfe4de;
  font-weight: 700;
}

.topbar .header-date em {
  margin-left: 4px;
  color: #0f766e;
  font-style: normal;
  font-weight: 900;
}

.topbar .header-now {
  gap: 5px;
  padding: 3px 8px 3px 6px;
  color: #7b5a23;
  background: #fff8e9;
  border: 1px solid #ecd5a7;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.topbar .header-now b {
  color: #98601b;
  font-size: 10px;
  font-weight: 900;
}

.topbar .header-now i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #16834a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22, 131, 74, 0.12);
  animation: header-pulse 2s ease-in-out infinite;
}

@keyframes header-pulse {
  0%, 100% { opacity: 0.72; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.recognize-evidence {
  flex: 1 1 100%;
  min-width: 0;
  margin-top: 2px;
  color: #557078;
  font-size: 11px;
}

.recognize-evidence summary {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #0f7068;
  cursor: pointer;
  font-weight: 800;
}

.recognize-evidence > div {
  display: grid;
  gap: 3px;
  max-height: 140px;
  margin-top: 5px;
  padding: 7px 9px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d7e6e2;
  border-radius: 6px;
}

.recognize-evidence > div span {
  overflow-wrap: anywhere;
  color: #6f8185;
  font-size: 10px;
  line-height: 1.4;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  color: #1d5552;
  background: #e8f5f3;
  border: 1px solid #add5d1;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(15, 118, 110, 0.10);
}

.topbar-actions,
.dialog-actions,
.filters,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 18px 24px 28px;
}

.summary-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.command-center {
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(300px, 0.72fr) minmax(410px, 0.96fr);
  align-items: stretch;
  gap: 12px;
}

.command-main,
.command-risk,
.command-ledger-card,
.command-ribbon {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 72, 78, 0.08);
}

.command-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, 0.58fr) minmax(330px, 1.42fr);
  align-items: start;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  color: #0f766e;
  background: linear-gradient(135deg, #effaf8 0%, #ffffff 74%);
  border-left: 4px solid #0f766e;
}

.command-main::before,
.command-risk::before,
.command-ledger-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 38px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.42), rgba(255,255,255,0.42) 9px, rgba(255,255,255,0) 9px, rgba(255,255,255,0) 18px);
  opacity: 0.85;
  pointer-events: none;
}

.command-main-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 1;
  grid-column: 1;
}

.command-kicker,
.command-section-head span,
.command-ribbon > div:first-child span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.command-main-copy strong {
  display: block;
  margin-top: 8px;
  color: #0f766e;
  font-size: 24px;
  line-height: 1.16;
}

.command-main-copy p {
  max-width: 220px;
  margin: 8px 0 0;
  color: #567079;
  font-size: 12px;
  line-height: 1.45;
}

.command-score {
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 1;
  min-width: 110px;
  margin-top: 18px;
  padding: 12px 14px 11px;
  color: #102c34;
  text-align: left;
  background: #ffffff;
  border: 1px solid #cfe0dc;
  border-radius: 7px;
  box-shadow: 0 10px 22px rgba(21, 85, 82, 0.12);
}

.command-score b,
.command-score span {
  display: block;
}

.command-score b {
  font-size: 38px;
  line-height: 0.92;
}

.command-score span {
  margin-top: 6px;
  color: #60767d;
  font-size: 11px;
  font-weight: 700;
}

.command-focus-grid {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  position: relative;
  z-index: 1;
}

.command-stat,
.command-task,
.ledger-item,
.team-metric,
.command-ribbon-item {
  min-width: 0;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #dbe7e6;
  border-left: 3px solid var(--primary);
  border-radius: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.command-stat:hover,
.command-task:hover,
.ledger-item:hover,
.team-metric:hover,
.command-ribbon-item:hover,
.command-score:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 52, 58, 0.12);
}

.command-stat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 132px;
  padding: 12px;
}

.command-stat span,
.command-stat strong,
.command-stat small,
.command-task span,
.command-task strong,
.command-task small,
.ledger-item span,
.ledger-item strong,
.team-metric span,
.team-metric strong,
.command-ribbon-item span,
.command-ribbon-item strong,
.command-ribbon-item small {
  display: block;
}

.command-stat span,
.command-task span,
.ledger-item span,
.team-metric span,
.command-ribbon-item span {
  color: #526a72;
  font-size: 11px;
  white-space: nowrap;
}

.command-stat strong {
  align-self: center;
  font-size: 31px;
  line-height: 1;
}

.command-stat small,
.command-task small,
.command-ribbon-item small {
  color: #7a8b91;
  font-size: 10px;
  line-height: 1.3;
}

.command-risk {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #fff2ef 0%, #ffffff 78%);
  border-left: 4px solid #b63d3d;
}

.command-section-head {
  position: relative;
  z-index: 1;
}

.command-section-head strong,
.command-ribbon > div:first-child strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.2;
}

.command-section-head small {
  display: block;
  margin-top: 6px;
  color: #6d7e86;
  font-size: 11px;
}

.risk-stack {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.command-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "hint value";
  align-items: center;
  min-height: 52px;
  padding: 9px 10px;
}

.command-task span,
.command-ribbon-item span { grid-area: label; }
.command-task strong,
.command-ribbon-item strong { grid-area: value; font-size: 18px; line-height: 1; }
.command-task small,
.command-ribbon-item small { grid-area: hint; margin-top: 4px; }

.command-ledger {
  display: block;
  min-width: 0;
}

.command-ledger-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 10px 12px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f4f6ff 0%, #ffffff 78%);
  border-left: 4px solid #4456b8;
}

.command-section-head.compact strong {
  font-size: 17px;
}

.command-ledger-card > .command-section-head:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.command-ledger-card > .ledger-grid {
  grid-column: 1;
  grid-row: 2;
}

.command-ledger-card > .command-section-head:nth-child(4) {
  grid-column: 2;
  grid-row: 1;
}

.command-ledger-card > .team-metrics {
  grid-column: 2;
  grid-row: 2;
}

.ledger-grid,
.team-metrics {
  display: grid;
  gap: 7px;
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.ledger-divider {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1px;
  height: auto;
  margin: 0 0 0 -7px;
  background: #dfe7e8;
}

.ledger-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ledger-item,
.team-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 40px;
  padding: 8px 9px;
}

.ledger-item strong,
.team-metric strong {
  font-size: 18px;
  line-height: 1;
}

.command-ribbon {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  background: #fffaf2;
  border-left: 4px solid #b66a24;
}

.command-ribbon-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.command-ribbon-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-areas:
    "index label value"
    "index hint value";
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
}

.command-ribbon-item i {
  grid-area: index;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background: #8a6822;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.command-ribbon-empty {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: #63777d;
  background: #ffffff;
  border: 1px dashed #d5dfdc;
  border-radius: 7px;
}

.command-stat.tone-green,
.command-task.tone-green,
.command-ribbon-item.tone-green { border-left-color: #16834a; background: rgba(243, 251, 246, 0.94); }
.command-stat.tone-teal,
.command-task.tone-teal,
.command-ribbon-item.tone-teal { border-left-color: #0f766e; background: rgba(240, 253, 250, 0.94); }
.command-stat.tone-amber,
.command-task.tone-amber,
.command-ribbon-item.tone-amber { border-left-color: #b66a24; background: rgba(255, 248, 234, 0.94); }
.command-stat.tone-violet,
.command-task.tone-violet,
.command-ribbon-item.tone-violet { border-left-color: #68529b; background: rgba(250, 247, 255, 0.94); }
.command-stat.tone-indigo,
.command-task.tone-indigo,
.command-ribbon-item.tone-indigo { border-left-color: #4456b8; background: rgba(245, 246, 255, 0.94); }
.command-stat.tone-gray,
.command-task.tone-gray,
.command-ribbon-item.tone-gray { border-left-color: #7a8494; background: rgba(248, 250, 252, 0.94); }
.command-stat.tone-red,
.command-task.tone-red,
.command-ribbon-item.tone-red { border-left-color: var(--danger); background: rgba(255, 242, 242, 0.94); }

.studio-wall {
  display: grid;
  grid-template-columns: minmax(520px, 1.12fr) minmax(270px, 0.62fr) minmax(360px, 0.78fr);
  gap: 12px;
  align-items: stretch;
  color: #102f37;
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: optimizeLegibility;
}

.studio-main,
.redline-board,
.receipt-card,
.station-card,
.route-tape {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 72, 78, 0.08);
}

.studio-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(380px, 1.28fr);
  grid-template-rows: auto;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(36,107,104,0.032) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36,107,104,0.026) 1px, transparent 1px),
    linear-gradient(135deg, #f7fcfa 0%, #ffffff 72%);
  background-size: 28px 28px, 28px 28px, auto;
  border-left: 4px solid #0f766e;
}

.studio-main::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 52px;
  height: 8px;
  border-radius: 999px;
  background: #b7dad6;
  opacity: 0.8;
}

.studio-copy,
.swatch-board,
.redline-head,
.redline-notes,
.receipt-card > *,
.station-card > *,
.route-tape > * {
  position: relative;
  z-index: 1;
}

.studio-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-column: 1;
  grid-row: 1;
}

.studio-eyebrow,
.redline-head span,
.receipt-head span,
.station-head span,
.route-tape > div:first-child span {
  display: block;
  color: #38535b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.studio-copy strong,
.redline-head strong,
.receipt-head strong,
.station-head strong,
.route-tape > div:first-child strong {
  display: block;
  margin-top: 6px;
  color: #15333b;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
}

.studio-copy strong {
  color: #0b6f67;
  font-size: 27px;
  line-height: 1.18;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.studio-copy strong span {
  display: block;
}

.studio-copy strong b {
  color: #064f4b;
  font-size: 1.12em;
  font-weight: 900;
}

.studio-copy p,
.redline-head small,
.receipt-head small,
.station-head small {
  margin: 8px 0 0;
  color: #405b64;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.studio-ticket {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  margin-top: auto;
  padding: 12px 13px 10px;
  color: #15333b;
  background: #ffffff;
  border: 1px solid #cfe1de;
  border-radius: 7px;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.12);
}

.studio-ticket b,
.studio-ticket span {
  display: block;
}

.studio-ticket b {
  font-size: 38px;
  line-height: 0.9;
  font-weight: 900;
}

.studio-ticket span {
  padding-bottom: 2px;
  color: #38535b;
  font-size: 12px;
  font-weight: 850;
}

.swatch-board {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.swatch-board::before {
  content: "工作概览";
  grid-column: 1 / -1;
  align-self: end;
  color: #38535b;
  font-size: 13px;
  font-weight: 850;
}

.studio-swatch {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 136px;
  padding: 13px;
  color: #15333b;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dbe7e6;
  border-left: 4px solid #0f766e;
  border-radius: 7px;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.studio-swatch::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 22px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
}

.studio-swatch:hover,
.redline-note:hover,
.receipt-line:hover,
.station-tag:hover,
.route-step:hover,
.studio-ticket:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 52, 58, 0.13);
}

.studio-swatch span,
.studio-swatch strong,
.studio-swatch small,
.redline-note span,
.redline-note strong,
.redline-note small,
.receipt-line span,
.receipt-line strong,
.station-tag span,
.station-tag strong,
.route-step span,
.route-step strong,
.route-step small {
  display: block;
}

.studio-swatch span,
.redline-note span,
.receipt-line span,
.station-tag span,
.route-step span {
  color: #2f4f58;
  font-size: 12px;
  font-weight: 850;
}

.studio-swatch strong {
  align-self: center;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.studio-swatch small,
.redline-note small,
.route-step small {
  color: #4a646c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.studio-swatch.tone-coral { color: #b84b4b; border-left-color: #c94b4b; background: #fff1ef; }
.studio-swatch.tone-apricot { color: #a95f1f; border-left-color: #d47a25; background: #fff7e8; }
.studio-swatch.tone-lake { color: #0f766e; border-left-color: #0f766e; background: #effaf7; }
.studio-swatch.tone-mist { color: #44708a; border-left-color: #5e91ac; background: #f1f8fb; }

.redline-board {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(199,75,75,0.08) 0%, rgba(255,255,255,0) 45%),
    #ffffff;
  border-left: 4px solid #c94b4b;
}

.redline-board::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 58px;
  height: 2px;
  background: #e7b1ad;
  transform: rotate(-1deg);
  opacity: 0.38;
}

.redline-head strong {
  color: #9d2f2f;
}

.redline-notes {
  display: grid;
  gap: 8px;
}

.redline-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "hint value";
  align-items: center;
  min-height: 54px;
  padding: 10px 11px;
  color: #15333b;
  text-align: left;
  background: rgba(255,255,255,0.94);
  border: 1px solid #eadada;
  border-left: 4px solid #c94b4b;
  border-radius: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.redline-note span,
.route-step span { grid-area: label; }
.redline-note strong,
.route-step strong {
  grid-area: value;
  color: #102f37;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}
.redline-note small,
.route-step small { grid-area: hint; margin-top: 4px; }
.redline-note.tone-violet { border-left-color: #7756a6; background: #faf6ff; }
.redline-note.tone-coral { border-left-color: #c94b4b; background: #fff1ef; }
.redline-note.tone-gray { border-left-color: #7a8494; background: #f8fafc; }

.studio-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.receipt-card,
.station-card {
  padding: 14px;
  overflow: hidden;
}

.receipt-card {
  background:
    linear-gradient(#eef2ff 1px, transparent 1px),
    #fbfcff;
  background-size: 100% 28px;
  border-left: 4px solid #4b5fc4;
}

.station-card {
  background: linear-gradient(135deg, #fff8ed 0%, #ffffff 82%);
  border-left: 4px solid #9a6a22;
}

.receipt-head strong {
  color: #3349b5;
}

.station-head strong {
  color: #7a4f14;
}

.receipt-lines,
.station-tags {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.receipt-line,
.station-tag {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  padding: 8px 9px;
  color: #15333b;
  text-align: left;
  background: rgba(255,255,255,0.96);
  border: 1px solid #dbe7e6;
  border-left: 3px solid #246b68;
  border-radius: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.receipt-line strong,
.station-tag strong {
  color: #102f37;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.route-tape {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  background:
    linear-gradient(90deg, rgba(182,106,36,0.08), rgba(255,255,255,0) 48%),
    #fffaf2;
  border-left: 4px solid #b66a24;
}

.route-tape > div:first-child strong {
  color: #714d19;
}

.route-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.route-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-areas:
    "index label value"
    "index hint value";
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  color: #15333b;
  text-align: left;
  background: rgba(255,255,255,0.94);
  border: 1px solid #e8dcc4;
  border-left: 4px solid #b66a24;
  border-radius: 7px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.route-step i {
  grid-area: index;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background: #8a6822;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.route-step.tone-red { border-left-color: #c94b4b; background: #fff1ef; }
.route-step.tone-amber { border-left-color: #d47a25; background: #fff7e8; }
.route-step.tone-teal { border-left-color: #0f766e; background: #effaf7; }
.route-step.tone-violet { border-left-color: #7756a6; background: #faf6ff; }
.route-step.tone-gray { border-left-color: #7a8494; background: #f8fafc; }

.route-empty {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: #63777d;
  background: #ffffff;
  border: 1px dashed #d5dfdc;
  border-radius: 7px;
}

.smart-workbench {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #f4fbfa, #fffdf8);
  border: 1px solid #c8dedb;
  border-left: 4px solid #246b68;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 72, 78, 0.07);
}

.smart-workbench-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.smart-workbench-head div {
  display: grid;
  gap: 4px;
}

.smart-workbench-head span {
  color: #0f7068;
  font-size: 12px;
  font-weight: 900;
}

.smart-workbench-head strong {
  color: #173b44;
  font-size: 18px;
}

.smart-workbench-head small {
  color: #6c8185;
  font-size: 11px;
}

.smart-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.smart-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "top top"
    "title title"
    "order order"
    "hint hint"
    "signals signals";
  gap: 4px;
  min-width: 0;
  min-height: 142px;
  padding: 12px;
  color: #173b44;
  text-align: left;
  background: #ffffff;
  border: 1px solid #d7e3df;
  border-left: 4px solid #246b68;
  border-radius: 7px;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.smart-task-card:hover {
  transform: translateY(-1px);
  border-color: #5d9f98;
  box-shadow: 0 8px 18px rgba(28, 60, 68, 0.10);
}

.smart-task-top {
  display: flex;
  grid-area: top;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.smart-task-top i {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  background: #246b68;
  border-radius: 50%;
}

.smart-task-top span {
  color: #0f7068;
  font-size: 10px;
  font-weight: 900;
}

.smart-task-card strong {
  grid-area: title;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.smart-task-card small {
  grid-area: order;
  overflow: hidden;
  color: #667b82;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-task-card p {
  grid-area: hint;
  margin: 2px 0 0;
  color: #536b72;
  font-size: 11px;
  line-height: 1.35;
}

.smart-task-signals {
  display: flex;
  grid-area: signals;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.smart-task-signals em {
  padding: 2px 6px;
  color: #6c5b35;
  font-size: 10px;
  font-style: normal;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(212, 122, 37, 0.24);
  border-radius: 999px;
}

.smart-task-card.tone-red { border-left-color: #c94b4b; background: #fff5f3; }
.smart-task-card.tone-amber { border-left-color: #d47a25; background: #fff9ed; }
.smart-task-card.tone-violet { border-left-color: #7756a6; background: #fbf8ff; }
.smart-task-card.tone-teal { border-left-color: #0f766e; background: #f1fbf8; }

.smart-task-empty {
  padding: 12px;
  color: #5f777d;
  border: 1px dashed #cbded9;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.board,
.alert-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.board-head,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.board-head h2,
.panel-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.board-head p,
.panel-head span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.filters input,
.filters select,
label input,
label select,
label textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.filters input {
  width: 270px;
}

.filters select {
  width: 128px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f5f8;
}

.segmented-control button {
  min-width: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  color: #596273;
  background: transparent;
  white-space: nowrap;
}

.segmented-control button.active {
  color: #153f78;
  background: #fff;
  box-shadow: 0 1px 4px rgb(26 39 60 / 14%);
  font-weight: 700;
}

#monthFilter {
  width: 176px;
}

.month-summary {
  margin-top: 5px !important;
  color: #315982 !important;
  font-weight: 700;
}

.filters input:focus,
.filters select:focus,
label input:focus,
label select:focus,
label textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.12);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 265px);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #4c556b;
  background: #f9fbff;
  font-size: 12px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f1f8f7;
}

.search-result-row {
  background: #fffdf5;
}

.search-highlight {
  padding: 1px 3px;
  color: #531900;
  border-radius: 3px;
  background: #ffd54f;
  box-shadow: 0 0 0 1px #e9ad1a;
  font-weight: 800;
}

.search-match-preview {
  margin-top: 5px;
  padding: 5px 7px;
  color: #71411a;
  border-left: 3px solid #e9ad1a;
  background: #fff7d6;
  font-size: 11px;
  line-height: 1.45;
}

.order-no {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.subtle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.system-text,
.system-meta,
.record-time {
  color: #52627a;
}

.customer-meta {
  color: #475569;
}

.sensitive-lock {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #6f4a12;
  border: 1px solid #ead7a6;
  border-radius: 999px;
  background: #fff8e7;
  font-size: 12px;
  font-weight: 800;
}

.content-text {
  color: var(--text);
  font-weight: 650;
}

.system-token {
  color: var(--primary);
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  white-space: nowrap;
}

.badge.success {
  background: #e8f5ee;
  color: var(--success);
}

.badge.warning {
  background: #fff7ed;
  color: var(--warning);
}

.badge.danger {
  background: #fef2f2;
  color: var(--danger);
}

.badge.closed {
  background: #f1f5f9;
  color: #64748b;
}

.badge.preorder {
  color: #056b5c;
  border-color: #85d6c7;
  background: #e8f8f4;
}

.badge.cod {
  border: 1px solid transparent;
}

.badge.cod.pending {
  color: #8a4a12;
  border-color: #e7c38c;
  background: #fff5df;
}

.badge.cod.collected {
  color: #216943;
  border-color: #a8d4bb;
  background: #eaf8f0;
}

.cod-money {
  color: #9a5417;
  font-weight: 700;
}

.badge.reship-review {
  color: #9d2d24;
  border-color: #e5a49c;
  background: #fff0ed;
}

.badge.pulse {
  animation: pulseDanger 1.5s ease-in-out infinite;
}

@keyframes pulseDanger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(185, 28, 28, 0); }
}

.badge.neutral {
  background: #eef1f6;
  color: #4b5563;
}

.badge.status-pending-assignment { color: #8a4a08; background: #fff4d8; }
.badge.status-assigned { color: #14569a; background: #eaf4ff; }
.badge.status-designing { color: #6330a5; background: #f2eaff; }
.badge.status-drafted { color: #08708f; background: #e8f9ff; }
.badge.status-confirmed { color: #167044; background: #eaf8f0; }
.badge.status-completed { color: #16663c; background: #e8f6ee; }
.badge.status-cancelled { color: #667085; background: #eef1f5; }
.badge.status-abnormal { color: #a61b1b; background: #ffebeb; }

.primary,
.ghost,
.danger-btn,
.danger-outline,
.flow-btn,
.cod-confirm-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.primary {
  color: #fff;
  background: var(--primary);
}

.primary:hover {
  background: var(--primary-strong);
}

.ghost {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.danger-outline {
  color: var(--danger);
  background: #fff;
  border: 1px solid rgba(185, 28, 28, 0.35);
}

.danger-outline:hover {
  background: #fef2f2;
  border-color: var(--danger);
}

.flow-btn {
  color: #fff;
  border: 1px solid transparent;
}

.flow-btn:hover,
.revision-actions button:hover,
.primary:hover,
.ghost:hover,
.cod-confirm-btn:hover {
  transform: translateY(-1px);
}

.assign-flow { background: #2d6f91; }
.design-flow { background: #6b5799; }
.draft-flow { background: #426f9b; }
.confirm-flow { background: #287a4f; }
.queue-flow { color: #3e4ca1; border-color: #aeb8ec; background: #f0f2ff; }
.production-flow { background: #b66a24; }
.ready-flow { background: #246b68; }
.shipping-flow { background: #2d7186; }
.complete-flow { background: #287a4f; }
.restore-flow { background: #506d9d; }
.action-edit { color: #285b91; border-color: #b9cee4; background: #f5f9fd; }
.scan-action { color: #8a4a08; border-color: #e7c58a; background: #fff9eb; }
.report-action { color: #0f7068; border-color: #9fd7ce; background: #effbf8; }
.new-action { background: #285f73; }

.cod-confirm-btn {
  color: #fff;
  background: #bd6b1e;
}

.cod-confirm-btn:hover {
  background: #9d5715;
  box-shadow: 0 7px 18px rgba(157, 87, 21, 0.18);
}

.warning-action {
  color: var(--warning);
  border-color: rgba(180, 83, 9, 0.35);
  background: #fffbeb;
}

.warning-action:hover {
  color: var(--warning);
  border-color: var(--warning);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #4b5563;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}

.icon-btn:hover {
  background: #edf1f7;
}

.alerts-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-height: calc(100vh - 265px);
  overflow: auto;
}

.alert-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  background: #fff;
}

.alert-item[data-alert-order] {
  cursor: pointer;
}

.alert-item.critical {
  border-left-color: var(--danger);
  background: #fff1f2;
  border-color: #fecdd3;
}

tbody tr[data-status="abnormal"] td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}

tbody tr[data-status="abnormal"] {
  color: #6f2626;
  background: #fff0f0;
  box-shadow: inset 0 1px 0 #f1b5b5, inset 0 -1px 0 #f1b5b5;
}

tbody tr[data-status="abnormal"]:hover {
  background: #ffe7e7;
}

tbody tr[data-status="completed"] td:first-child {
  box-shadow: inset 3px 0 0 var(--success);
}

.alert-panel.has-critical {
  border-color: #fca5a5;
  box-shadow: 0 14px 36px rgba(185, 28, 28, 0.14);
}

.alert-item strong {
  display: block;
  margin-bottom: 4px;
}

.alert-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr min(760px, calc(100vw - 24px));
}

.drawer.hidden,
.hidden {
  display: none !important;
}

.drawer-shade {
  background: rgba(15, 23, 42, 0.45);
}

.drawer-panel {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.drawer-content {
  height: calc(100vh - 78px);
  overflow: auto;
  padding: 16px 20px 28px;
}

.detail-section {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid #9ab6b4;
  border-radius: 8px;
  background: #fff;
}

.detail-section h3 {
  margin: 0 0 13px;
  color: #24434b;
  font-size: 15px;
}

.workflow-card { border-left-color: #4b8790; background: #fbfdfd; }
.information-card { border-left-color: #3f7fa1; }
.delivery-card { border-left-color: #b27332; }
.responsibility-card { border-left-color: #4f8a69; }
.design-card { border-left-color: #5277a4; }
.attachments-card { border-left-color: #a6753d; }
.revision-card { border-left-color: #72599c; }
.reship-card { border-left-color: #b75a4e; }
.log-card { border-left-color: #7b8a90; }

.detail-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 247, 246, 0.96);
  backdrop-filter: blur(8px);
}

.detail-tabs button {
  min-height: 38px;
  padding: 7px 9px;
  color: #607177;
  border-radius: 6px;
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}

.detail-tabs button:hover {
  color: var(--primary);
  background: #e7f1f0;
}

.detail-tabs button.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 5px 14px rgba(36, 107, 104, 0.2);
}

.detail-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding: 0 4px;
  color: #4d696f;
  border-radius: 9px;
  background: #dfeae9;
  font-size: 10px;
}

.detail-tabs button.active span {
  color: var(--primary);
  background: #fff;
}

.detail-panel {
  min-width: 0;
}

.detail-field {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 6px;
  background: #f6f9f9;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.detail-field span {
  display: block;
  color: #4f6d75;
  font-size: 12px;
  font-weight: 800;
}

.detail-field > strong,
.detail-field > .detail-value {
  display: block;
  margin-top: 3px;
  word-break: break-word;
  white-space: pre-line;
}

.customer-history-card {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #c9ddd9;
  border-radius: 8px;
  background: linear-gradient(135deg, #f4fbfa, #fffdf8);
}

.customer-history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.customer-history-head strong {
  color: #1d5552;
  font-size: 13px;
}

.customer-history-head span {
  color: #71858a;
  font-size: 11px;
}

.customer-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.customer-history-list button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  color: #244b52;
  text-align: left;
  border: 1px solid #d8e6e2;
  border-radius: 7px;
  background: #ffffff;
}

.customer-history-list button:hover {
  border-color: #5d9f98;
  box-shadow: 0 6px 14px rgba(28, 60, 68, 0.09);
}

.customer-history-list strong,
.customer-history-list span,
.customer-history-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-history-list strong {
  font-size: 12px;
}

.customer-history-list span {
  color: #526f76;
  font-size: 11px;
}

.customer-history-list small {
  color: #819096;
  font-size: 10px;
}

.cod-detail-field {
  grid-column: 1 / -1;
  border: 1px solid #e4c38e;
  background: #fff9ee;
}

.cod-detail-field.collected {
  border-color: #a8d4bb;
  background: #f0faf4;
}

.cod-detail-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.cod-detail-value strong,
.cod-detail-value small {
  display: block;
}

.cod-detail-value strong {
  color: #8b4b13;
  font-size: 19px;
}

.cod-detail-field.collected .cod-detail-value strong {
  color: var(--success);
}

.cod-detail-value small {
  margin-top: 3px;
  color: var(--muted);
}

.cod-ship-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: #7b4517;
  border: 1px solid #e7c38c;
  border-left: 4px solid #bd6b1e;
  border-radius: 7px;
  background: #fff8ec;
}

.cod-ship-notice span {
  color: #765b42;
  font-size: 12px;
}

.fixed-time {
  color: var(--muted);
}

.design-items-field {
  grid-column: 1 / -1;
}

.design-item-list {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 8px;
}

.design-item-card {
  padding: 11px 13px;
  border: 1px solid #cbd8ec;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f8fbff;
}

.design-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.design-item-head strong {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.design-item-head em {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: #e7f0ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.design-item-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
}

.design-item-row b {
  display: block;
  color: #52627a;
  font-size: 12px;
}

.design-item-row p {
  margin: 2px 0 0;
  color: var(--text);
  white-space: pre-wrap;
}

.design-summary {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
}

.design-summary summary {
  padding: 10px 12px;
  color: #49676f;
  cursor: pointer;
  font-weight: 700;
}

.design-summary[open] summary {
  border-bottom: 1px solid var(--line);
}

.design-summary .detail-grid {
  padding: 10px;
}

.permission-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #c9d8ee;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #f4f8ff;
}

.permission-banner strong {
  color: var(--text);
}

.permission-banner span,
.revision-entry p {
  color: var(--muted);
  font-size: 12px;
}

.reship-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid #dc5f4a;
  background: #fff3ef;
}

.reship-entry p {
  margin: 4px 0 0;
  color: #775048;
}

.reship-btn {
  flex: 0 0 auto;
  color: #fff;
  border-color: #b94332;
  background: #b94332;
}

.permission-banner.readonly-view {
  border-color: #f0c36a;
  border-left-color: var(--warning);
  background: #fff9eb;
}

.permission-banner.owner-view {
  border-color: #9bd9c4;
  border-left-color: #079669;
  background: #effbf6;
}

.main-actions {
  min-height: 34px;
}

.readonly-note {
  color: var(--muted);
  font-size: 12px;
}

.revision-entry {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8c9ef;
  border-left: 4px solid var(--violet);
  border-radius: 8px;
  background: #faf7ff;
}

.revision-entry strong {
  display: block;
  color: #5b2b91;
}

.revision-entry p {
  margin: 3px 0 0;
}

.revision-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.revision-actions button {
  border-width: 1px;
  border-style: solid;
  font-weight: 800;
}

.revision-btn {
  color: #7a2e2e;
  border-color: #e6b7b7;
  background: #fff1f1;
}

.add-on-btn {
  color: #175a91;
  border-color: #b6d4ef;
  background: #eff7ff;
}

.size-btn {
  color: #8a4a08;
  border-color: #efc88c;
  background: #fff7e8;
}

.template-btn {
  color: #5b2b91;
  border-color: #d8c2ef;
  background: #f6efff;
}

.form-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.remark-field {
  grid-column: 1 / -1;
}

.remark-field details {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.remark-field summary {
  cursor: pointer;
  padding: 9px 11px;
  color: var(--primary);
  font-weight: 700;
}

.remark-field pre {
  max-height: 320px;
  overflow: auto;
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding-left: 12px;
  border-left: 3px solid #c9d4e5;
}

.timeline-item.add_on,
.timeline-item.size_change,
.timeline-item.template_change {
  padding: 10px 12px;
  border-radius: 8px;
}

.timeline-item.reshipment {
  border-left-color: #dc5f4a;
}

.timeline-item.reshipment.done {
  border-left-color: #188f78;
}

.reship-done {
  color: #08715f;
  font-weight: 700;
}

.quality-unreviewed {
  color: #a63b2d;
  font-weight: 700;
}

.quality-review-result {
  margin: 8px 0;
  padding: 9px 10px;
  border-left: 3px solid #188f78;
  background: #edf8f5;
}

.quality-review-result p {
  margin: 4px 0 0;
}

.quality-review-btn {
  margin-top: 8px;
}

.quality-review-section {
  border-left: 4px solid #b94332;
}

.quality-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quality-review-heading h3 {
  margin: 0;
}

.quality-review-heading span {
  color: #8b3e34;
  font-size: 12px;
  font-weight: 700;
}

.quality-person-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quality-person-list > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #ead3ce;
  background: #fff8f6;
}

.quality-person-list span {
  color: var(--muted);
  font-size: 12px;
}

.quality-detail-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.quality-detail-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid #188f78;
  background: #fff;
}

.quality-detail-list button.unreviewed {
  border-left-color: #c63f32;
  background: #fff5f2;
}

.quality-detail-list span {
  color: var(--muted);
  font-size: 12px;
}

.cod-report-section {
  border-left: 4px solid #bd6b1e;
  background: #fffdf8;
}

.cod-report-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.cod-report-list button {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid #bd6b1e;
  background: #fff;
}

.cod-report-list button.collected {
  border-left-color: var(--success);
  background: #f4fbf7;
}

.cod-report-list span {
  color: var(--muted);
  font-size: 12px;
}

.cod-report-list em {
  color: #8a4a12;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.cod-report-list .collected em {
  color: var(--success);
}

.timeline-item.add_on {
  background: #eff6ff;
  border-left-color: var(--primary);
}

.timeline-item.size_change {
  background: #fff7ed;
  border-left-color: var(--warning);
}

.timeline-item.template_change {
  background: #f5f3ff;
  border-left-color: var(--violet);
}

.timeline-item strong {
  display: block;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

dialog {
  width: min(920px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.form-grid.compact,
.report-box,
.preview-box {
  width: min(620px, calc(100vw - 32px));
}

.recognize-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
}

.recognize-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recognize-actions span {
  color: var(--muted);
  font-size: 12px;
}

.recognize-actions #recognizeResult {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  line-height: 1.45;
}

.recognize-confidence {
  padding: 3px 7px;
  border: 1px solid #9bcac4;
  border-radius: 999px;
  color: #0f7068 !important;
  background: #effaf7;
  font-weight: 900;
}

.recognize-confidence.needs-review {
  color: #9a4e12 !important;
  border-color: #edbb62;
  background: #fff3d9;
}

.file-zone {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 14px;
  color: var(--muted);
  background: #fbfcff;
  border: 1px dashed #a9b8cf;
  border-radius: 8px;
  text-align: center;
}

.file-zone:hover,
.file-zone.dragover,
.file-zone:focus {
  color: var(--primary);
  background: #f0f6ff;
  border-color: var(--primary);
  outline: none;
}

.attachment-upload-bar {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.attachment-pick {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 13px;
  color: #315c68;
  border: 1px solid #b9cfd2;
  border-radius: 6px;
  background: #f4f9f9;
  cursor: pointer;
  font-weight: 700;
}

.attachment-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.attachment-upload-bar select {
  min-height: 38px;
  padding: 7px 9px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.detail-file-zone {
  min-height: 66px;
  margin-bottom: 10px;
}

.file-preview-list,
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 168px));
  gap: 12px;
  margin-top: 10px;
}

.attachment-group + .attachment-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.attachment-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
}

.attachment-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.file-preview,
.attachment-card {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 7px 18px rgba(28, 60, 68, 0.07);
}

.file-preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #c5394b;
  font-size: 18px;
  line-height: 26px;
}

.file-preview {
  padding: 7px;
}

.file-preview img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  background: #eef1f6;
}

.file-preview strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  word-break: break-word;
}

.attachment-preview-trigger {
  position: relative;
  display: block;
  width: 100%;
  height: 92px;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: #eaf0f0;
}

.attachment-preview-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #4e6870;
  background: #eaf0f0;
  font-size: 16px;
  font-weight: 800;
}

.attachment-preview-label {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 7px;
  color: #fff;
  border-radius: 4px;
  background: rgba(24, 51, 59, 0.82);
  font-size: 11px;
}

.attachment-card-body {
  padding: 8px 9px 5px;
}

.attachment-card-body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta {
  min-height: 30px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.attachment-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 8px;
  border-top: 1px solid var(--line);
  background: #f8faf9;
}

.attachment-card-footer span {
  flex: 1;
  color: var(--muted);
  font-size: 10px;
}

.attachment-card-footer button,
.attachment-card-footer a {
  padding: 2px 3px;
  color: var(--primary);
  text-decoration: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.attachment-card-footer .delete {
  color: var(--danger);
}

label {
  display: grid;
  gap: 7px;
  color: #384152;
  font-size: 13px;
}

.wide,
.dialog-head {
  grid-column: 1 / -1;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-actions {
  justify-content: flex-end;
}

.add-on-fields {
  padding: 9px 10px;
  border: 1px dashed #c18a48;
  border-radius: 8px;
  background: #fff9ed;
}

.revision-target-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  padding: 11px;
  border: 1px solid #e2ae63;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8e9, #fffdf8);
}

.revision-target-fields label {
  color: #87531b;
  font-weight: 800;
}

.revision-type-display {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  color: #5b2b91;
  border: 1px solid #d9c8f0;
  border-radius: 7px;
  background: #fbf8ff;
  font-weight: 900;
}

.revision-target-fields input[readonly] {
  color: #5c6970;
  background: #f4f6f6;
}

.design-item-row.size-change-row {
  padding: 8px 9px;
  border: 1px solid #e5a23a;
  border-radius: 7px;
  background: #fff3d9;
}

.size-change-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.size-change-value {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.size-change-value span {
  color: #a56a2a;
  font-size: 11px;
  font-weight: 800;
}

.size-change-value strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #7f3d0c;
  font-size: 13px;
}

.size-change-arrow {
  color: #c87818;
  font-size: 18px;
  font-weight: 900;
}

.design-item-row.size-change-row b,
.design-item-row.size-change-row p {
  color: #9a4e12;
  font-weight: 900;
}

.revision-size-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 4px 8px;
  color: #8b4a0b;
  border: 1px solid #edbb62;
  border-radius: 999px;
  background: #fff3d9;
  font-size: 11px;
  font-weight: 900;
}

.revision-size-highlight span {
  padding-left: 6px;
  border-left: 1px solid #edbb62;
  font-weight: 800;
}

.confirm-dialog {
  width: min(430px, calc(100vw - 28px));
}

.confirm-box {
  min-width: min(430px, calc(100vw - 28px));
  padding: 18px;
  background: #fffdf8;
}

.confirm-box p {
  margin: 14px 0 18px;
  color: #425c63;
  line-height: 1.7;
  white-space: pre-line;
}

.confirm-box .dialog-actions {
  padding: 0;
}

.confirm-box .primary {
  background: linear-gradient(135deg, #b84d48, #923d3d);
}

@media (max-width: 520px) {
  .confirm-box {
    min-width: 0;
  }
}

.reship-cause-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.reship-cause-field legend {
  margin-bottom: 8px;
  color: #2e4a52;
  font-size: 13px;
  font-weight: 800;
}

.reship-cause-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.reship-cause-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 68px;
  padding: 9px 10px 9px 30px;
  border: 1px solid #d8e2df;
  border-left: 4px solid #b8c9c7;
  border-radius: 8px;
  color: #173b44;
  background: #fffdf8;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.reship-cause-card:hover {
  transform: translateY(-1px);
  border-color: #8bbab4;
  box-shadow: 0 7px 16px rgba(28, 60, 68, 0.10);
}

.reship-cause-card input {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0;
  accent-color: #246b68;
}

.reship-cause-card span {
  font-size: 13px;
  font-weight: 900;
}

.reship-cause-card small {
  color: #6f8388;
  font-size: 11px;
  line-height: 1.35;
}

.reship-cause-card:has(input:checked) {
  border-color: #246b68;
  box-shadow: 0 0 0 3px rgba(36, 107, 104, 0.12), 0 8px 18px rgba(28, 60, 68, 0.10);
}

.reship-cause-card.design-cause { border-left-color: #c94b4b; background: #fff7f6; }
.reship-cause-card.customer-cause { border-left-color: #d47a25; background: #fffaf0; }
.reship-cause-card.production-cause { border-left-color: #7560a8; background: #fbf8ff; }
.reship-cause-card.shipping-cause { border-left-color: #3f7fa1; background: #f5faff; }

.reship-items-field {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cbded9;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fffc, #fffdf8);
}

.reship-items-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.reship-items-heading strong {
  color: #244b52;
  font-size: 13px;
}

.reship-items-heading span {
  color: #b04e2d;
  font-size: 12px;
  font-weight: 800;
}

.reship-item-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reship-item-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d7e3df;
  border-radius: 7px;
  color: #23434a;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.reship-item-option:hover {
  transform: translateY(-1px);
  border-color: #61a59b;
  box-shadow: 0 5px 14px rgba(36, 107, 104, 0.10);
}

.reship-item-option:has(input:checked) {
  border-color: #167b70;
  background: #effaf7;
  box-shadow: 0 0 0 2px rgba(22, 123, 112, 0.12);
}

.reship-item-option input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 0;
  accent-color: #167b70;
}

.reship-item-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reship-item-option strong,
.reship-item-option small {
  overflow-wrap: anywhere;
}

.reship-item-option strong {
  color: #244b52;
  font-size: 13px;
}

.reship-item-option small {
  color: #6c8185;
  font-size: 11px;
  line-height: 1.35;
}

.reship-item-option em {
  padding: 2px 6px;
  color: #9a4e12;
  border: 1px solid #edb45f;
  border-radius: 999px;
  background: #fff1cf;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.reship-item-option.is-added {
  border-color: #e6ae5e;
  background: #fffaf0;
}

.reship-items-empty {
  padding: 12px;
  color: #9a4e12;
  border: 1px dashed #e6ae5e;
  border-radius: 7px;
  background: #fffaf0;
  font-size: 12px;
}

@media (max-width: 680px) {
  .reship-cause-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reship-item-options {
    grid-template-columns: 1fr;
  }
}

.report-box {
  width: min(920px, calc(100vw - 32px));
  padding: 18px;
}

.preview-box {
  padding: 18px;
}

.preview-content {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.report-box pre {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  color: #182235;
  white-space: pre-wrap;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.report-view {
  max-height: min(70vh, 760px);
  overflow: auto;
  margin: 14px 0;
  padding-right: 4px;
}

.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
  background: #243b63;
  border-radius: 8px;
}

.report-heading strong,
.report-heading span {
  display: block;
}

.report-heading strong {
  font-size: 17px;
}

.report-heading span {
  margin-top: 3px;
  color: #dbe7f7;
  font-size: 12px;
}

.report-heading .report-accuracy {
  margin: 0;
  padding: 4px 8px;
  color: #d9f7ee;
  background: #176453;
  border-radius: 6px;
  font-weight: 700;
}

.monthly-heading {
  background: #315b59;
}

.report-kpis,
.report-backlog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.report-stat {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: #fff;
}

.report-stat span,
.report-stat strong {
  display: block;
}

.report-stat span {
  color: var(--muted);
  font-size: 11px;
}

.report-stat strong {
  margin-top: 4px;
  font-size: 17px;
}

.report-stat.tone-green { border-left-color: #16834a; background: #f3fbf6; }
.report-stat.tone-teal { border-left-color: #0f766e; background: #f0fdfa; }
.report-stat.tone-cyan { border-left-color: #087da4; background: #f0faff; }
.report-stat.tone-amber { border-left-color: #c26a08; background: #fffaf0; }
.report-stat.tone-violet { border-left-color: #7047b8; background: #faf7ff; }
.report-stat.tone-indigo { border-left-color: #4456b8; background: #f5f6ff; }
.report-stat.tone-gray { border-left-color: #7a8494; background: #f8fafc; }
.report-stat.tone-red { border-left-color: var(--danger); background: #fff3f3; }

.report-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.report-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.report-progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.report-progress-grid > div {
  padding: 8px 0;
}

.report-progress-grid span,
.report-progress-grid strong,
.report-progress-grid small {
  display: block;
}

.report-progress-grid span,
.report-progress-grid small,
.report-footnote,
.report-empty {
  color: var(--muted);
  font-size: 12px;
}

.report-progress-grid strong {
  margin-top: 3px;
}

.report-progress-grid small {
  margin-top: 3px;
}

.report-footnote {
  margin: 9px 0 0;
}

.report-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.report-table-head,
.report-table-row {
  display: grid;
  grid-template-columns: minmax(86px, 1.4fr) repeat(5, minmax(52px, 0.7fr));
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  text-align: center;
}

.report-table-head {
  color: #52627a;
  background: #f2f5f9;
  font-size: 11px;
  font-weight: 800;
}

.report-table-row + .report-table-row {
  border-top: 1px solid var(--line);
}

.report-table-row strong,
.report-table-head span:first-child {
  text-align: left;
}

.report-alert-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #f2b7b7;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fff6f6;
}

.report-alert-list {
  display: grid;
  gap: 8px;
}

.report-alert-list > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr);
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1cccc;
}

.report-alert-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.report-alert-list span {
  color: #8d3434;
}

.report-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.monthly-status-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.monthly-staff-table .report-table-head,
.monthly-staff-table .report-table-row {
  grid-template-columns: minmax(86px, 1.3fr) repeat(5, minmax(48px, 0.65fr)) minmax(92px, 1fr);
}

.monthly-staff-table .report-table-head.hide-money-col,
.monthly-staff-table .report-table-row.hide-money-col {
  grid-template-columns: minmax(86px, 1.3fr) repeat(5, minmax(48px, 0.65fr));
}

.locked-report-section {
  border-left: 4px solid #9a7a2c;
  background: #fffaf0;
}

.daily-volume-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.daily-volume-list > div {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto auto;
  gap: 9px;
  padding: 8px 10px;
  background: #f7f9fc;
  border-left: 3px solid #315b59;
  border-radius: 6px;
  font-size: 12px;
}

.daily-volume-list > div span:last-child {
  color: var(--muted);
}

.report-list {
  display: grid;
  gap: 6px;
}

.report-list-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 72px;
  gap: 8px;
  padding: 7px 8px;
  background: #f7f9fc;
  border-radius: 5px;
  font-size: 12px;
}

.report-list-row span:last-child {
  color: var(--muted);
  text-align: right;
}

.report-raw {
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  max-width: 360px;
  padding: 12px 14px;
  color: #fff;
  background: #111827;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.selection-copy {
  position: fixed;
  z-index: 120;
  min-height: 34px;
  padding: 7px 11px;
  color: #fffdf8;
  border: 0;
  border-radius: 7px;
  background: #173b44;
  box-shadow: 0 8px 20px rgba(23, 59, 68, 0.24);
  font-size: 12px;
  font-weight: 800;
}

.selection-copy:hover {
  background: #246b68;
}

/* Keep every working dialog proportional to its content. The old 920px
   outer dialog around a 620px compact form created a large dead area. */
#revisionDialog,
#shipDialog,
#reshipDialog,
#reshipReviewDialog {
  width: min(760px, calc(100vw - 28px));
}

#revisionDialog > .form-grid.compact,
#shipDialog > .form-grid.compact,
#reshipDialog > .form-grid.compact,
#reshipReviewDialog > .form-grid.compact {
  width: 100%;
  box-sizing: border-box;
}

#reportDialog {
  width: min(960px, calc(100vw - 28px));
}

#reportOrderDialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 24px);
}

#reportDialog > .report-box,
#previewDialog > .preview-box,
#reportOrderDialog > .report-order-box {
  width: 100%;
  box-sizing: border-box;
}

.report-order-box {
  position: relative;
  overflow: hidden;
  background: #fffdf8;
}

.report-order-head {
  position: relative;
  z-index: 1;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e4ebe7;
}

.report-order-head > div {
  min-width: 0;
}

.report-order-head h2 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #173b44;
  font-size: 20px;
  line-height: 1.2;
}

.report-order-context {
  display: block;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.report-order-view {
  box-sizing: border-box;
  min-width: 0;
  max-height: min(66vh, 640px);
  padding: 14px 18px 18px;
  overflow: auto;
  border-top: 1px solid #e4ebe7;
}

.report-quick-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  background: linear-gradient(135deg, #eef8f5, #fffaf0);
  border: 1px solid #cfe4de;
  border-radius: 9px;
}

.report-quick-intro > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.report-quick-intro strong,
.report-quick-intro span {
  display: block;
}

.report-quick-intro strong {
  color: #205b61;
  font-size: 13px;
}

.report-quick-intro span {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #6b7f83;
  font-size: 11px;
  line-height: 1.45;
}

.report-quick-tags {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.report-quick-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  color: #49636a;
  background: #ffffff;
  border: 1px solid #d9e5e1;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.report-quick-chip.chip-status {
  color: #0f766e;
  border-color: #a8d6c9;
}

.report-quick-chip.chip-urgent {
  color: #b34036;
  background: #fff1ef;
  border-color: #f0b8b0;
}

.report-quick-chip.chip-cod {
  color: #98601b;
  background: #fff8e9;
  border-color: #efd39c;
}

.report-quick-block {
  min-width: 0;
  margin-top: 11px;
  padding: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce7e3;
  border-radius: 9px;
}

.report-quick-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.report-quick-block-head h3 {
  margin: 0;
  color: #234b54;
  font-size: 14px;
}

.report-quick-block-head span {
  max-width: 58%;
  overflow-wrap: anywhere;
  color: #87969a;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.report-quick-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-quick-field {
  min-width: 0;
  padding: 9px 10px;
  background: #f8fbfa;
  border: 1px solid #e5eeeb;
  border-radius: 7px;
}

.report-quick-field span,
.report-quick-field strong {
  display: block;
}

.report-quick-field span {
  color: #7a8d91;
  font-size: 10px;
}

.report-quick-field strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #193e48;
  font-size: 13px;
  line-height: 1.35;
  white-space: pre-line;
}

.report-quick-field.tone-amber {
  background: #fffaf0;
  border-color: #efddb7;
}

.report-quick-field.tone-amber strong {
  color: #a86219;
}

.report-quick-field.tone-green {
  background: #f1faf5;
  border-color: #c9e8d4;
}

.report-quick-field.tone-green strong {
  color: #16834a;
}

.report-quick-field.tone-red {
  background: #fff5f3;
  border-color: #f1c6c0;
}

.report-quick-field.tone-red strong {
  color: #b63e37;
}

.report-quick-field.tone-violet {
  background: #faf7ff;
  border-color: #e1d5f3;
}

.report-quick-field.tone-violet strong {
  color: #68459b;
}

.report-quick-field.tone-locked strong {
  color: #7a8494;
  font-size: 12px;
}

.report-quick-reship-list {
  display: grid;
  gap: 7px;
}

.report-quick-reship-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  background: #fffaf0;
  border-left: 3px solid #d47a25;
  border-radius: 6px;
}

.report-quick-reship-row > div {
  min-width: 0;
}

.report-quick-reship-row strong,
.report-quick-reship-row span {
  display: block;
}

.report-quick-reship-row strong {
  overflow-wrap: anywhere;
  color: #654b2d;
  font-size: 12px;
}

.report-quick-reship-row span {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #7b807f;
  font-size: 10px;
  line-height: 1.4;
}

.report-quick-empty,
.report-quick-design p {
  margin: 0;
  color: #718287;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-line;
}

.report-quick-design {
  background: #fbfdfc;
}

@media (max-width: 760px) {
  .report-quick-intro {
    flex-direction: column;
  }

  .report-quick-tags {
    justify-content: flex-start;
  }

  .report-quick-grid,
  .report-quick-reship-row {
    grid-template-columns: 1fr;
  }
}

/* Daily reports use the same calm, readable rhythm as the monthly report. */
.daily-report-heading {
  min-height: 76px;
  padding: 16px 18px;
}

.daily-report-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin: 0 -2px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid #dfe8e4;
  border-radius: 8px;
}

.daily-report-nav a {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #557078;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.daily-report-nav a:hover {
  color: #0f7068;
  background: #eef8f5;
}

.daily-report-section {
  min-width: 0;
  padding: 14px 0;
  scroll-margin-top: 54px;
}

.daily-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 0 8px;
}

.daily-section-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.daily-section-heading > div > span {
  display: inline-grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  background: #246b68;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.daily-section-heading h3 {
  min-width: 0;
  margin: 0;
  color: #173b44;
  font-size: 15px;
  line-height: 1.3;
}

.daily-section-heading p {
  max-width: 46%;
  margin: 0;
  overflow-wrap: anywhere;
  color: #7a8d91;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.daily-primary-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0;
}

.daily-conclusion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 12px;
  background: #eef8f5;
  border-left: 4px solid #0f766e;
  border-radius: 7px;
}

.daily-conclusion strong,
.daily-conclusion span {
  min-width: 0;
}

.daily-conclusion strong {
  color: #205b61;
  font-size: 15px;
}

.daily-conclusion span {
  overflow-wrap: anywhere;
  color: #60787c;
  font-size: 11px;
  text-align: right;
}

.report-quantity-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #c9e0dc;
  border-left: 4px solid #167b70;
  border-radius: 8px;
  background: linear-gradient(100deg, #eff9f6, #fffaf0);
}

.report-quantity-strip div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-quantity-strip span,
.report-quantity-strip em {
  color: #668087;
  font-size: 11px;
  font-style: normal;
}

.report-quantity-strip strong {
  color: #174652;
  font-size: 14px;
}

.report-quantity-strip em {
  max-width: 55%;
  overflow-wrap: anywhere;
  text-align: right;
}

.monthly-usage-section {
  border-left: 4px solid #b47b24;
  background: #fffaf0;
}

.usage-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.usage-columns > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #ead9b6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.usage-columns > div > strong {
  display: block;
  margin-bottom: 7px;
  color: #805719;
  font-size: 12px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 7px 0;
  border-top: 1px solid #f0e5cf;
}

.usage-row span {
  color: #31545b;
  font-weight: 800;
}

.usage-row b {
  color: #174652;
  text-align: right;
}

.usage-row small {
  grid-column: 1 / -1;
  color: #71858a;
  font-size: 11px;
}

.usage-locked {
  padding: 12px;
  border: 1px dashed #d5b877;
  border-radius: 8px;
  color: #805719;
  background: #fffdf8;
  font-size: 12px;
}

.usage-additional {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #e4c987;
  border-radius: 8px;
  color: #805719;
  background: #fffdf8;
  font-size: 12px;
}

.usage-additional span {
  overflow-wrap: anywhere;
  text-align: right;
}

.usage-pending-summary {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #edc3c3;
  border-radius: 8px;
  background: #fff7f7;
}

.usage-pending-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #a72f3d;
  font-size: 12px;
}

.usage-pending-heading span,
.usage-pending-more {
  color: #7e686b;
  font-size: 11px;
}

.usage-pending-links {
  display: grid;
  gap: 5px;
}

.usage-pending-links-wrap {
  display: grid;
  gap: 6px;
}

.usage-pending-link {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #efd3d3;
  border-radius: 6px;
  color: #174652;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.usage-pending-link:hover {
  border-color: #c5394b;
  background: #fff1f1;
}

.usage-pending-link strong {
  font-size: 11px;
}

.usage-pending-link span {
  color: #7e686b;
  font-size: 11px;
}

.usage-pending-toggle {
  justify-self: start;
  padding: 5px 8px;
  border: 1px solid #d59a9f;
  border-radius: 6px;
  color: #a72f3d;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.usage-pending-toggle:hover {
  background: #fff1f1;
}

.usage-focus {
  border-left-color: #c5394b;
  background: #fff7f7;
}

.report-quick-help {
  margin: 8px 0 0;
  color: #7e686b;
  font-size: 11px;
  line-height: 1.5;
}

.daily-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.daily-metric-grid > div {
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid #dfe8e4;
  border-radius: 7px;
}

.daily-metric-grid span,
.daily-metric-grid strong,
.daily-metric-grid small {
  display: block;
}

.daily-metric-grid span,
.daily-metric-grid small {
  color: #74878b;
  font-size: 10px;
}

.daily-metric-grid strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #173b44;
  font-size: 15px;
}

.daily-metric-grid small {
  margin-top: 3px;
  line-height: 1.35;
}

.daily-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.daily-flow-step {
  position: relative;
  min-width: 0;
  min-height: 112px;
  padding: 11px 10px 10px;
  background: linear-gradient(145deg, #f4fbf8, #ffffff);
  border: 1px solid #d9e8e3;
  border-top: 3px solid #246b68;
  border-radius: 8px;
}

.daily-flow-step > span,
.daily-flow-step > strong,
.daily-flow-step > b,
.daily-flow-step > small {
  display: block;
}

.daily-flow-step > span {
  color: #7b9295;
  font-size: 10px;
  font-weight: 900;
}

.daily-flow-step > strong {
  margin-top: 8px;
  color: #315a61;
  font-size: 12px;
}

.daily-flow-step > b {
  margin-top: 4px;
  color: #0f766e;
  font-size: 24px;
  line-height: 1;
}

.daily-flow-step > small {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow-wrap: anywhere;
  color: #7a8d91;
  font-size: 10px;
}

.daily-section-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 15px 8px 8px;
}

.daily-section-subhead strong {
  color: #315a61;
  font-size: 13px;
}

.daily-section-subhead span {
  color: #7a8d91;
  font-size: 10px;
}

.daily-backlog {
  margin-top: 0;
}

.daily-staff-table {
  margin: 0 8px;
}

.daily-alert-list {
  display: grid;
  gap: 8px;
  margin: 0 8px;
}

.daily-order-link {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(135px, 0.8fr) minmax(180px, 1.3fr);
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: #173b44;
  text-align: left;
  background: #fff;
  border: 1px solid #dfe8e4;
  border-left: 4px solid #246b68;
  border-radius: 8px;
}

.daily-order-link:hover {
  background: #f5fbf9;
  box-shadow: 0 8px 18px rgba(28, 60, 68, 0.08);
  transform: translateY(-1px);
}

.daily-order-link strong,
.daily-order-link span,
.daily-order-link em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-order-link strong {
  color: #234b54;
  font-size: 12px;
}

.daily-order-link span {
  color: #718287;
  font-size: 10px;
  line-height: 1.4;
}

.daily-order-link em {
  color: #6a596f;
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.daily-order-link.critical {
  background: #fff6f5;
  border-left-color: #c94b4b;
}

.daily-order-link.critical em {
  color: #b63e37;
  font-weight: 800;
}

.daily-order-link.warning {
  background: #fffaf0;
  border-left-color: #d47a25;
}

.daily-order-link.completed {
  background: #f5fbf7;
  border-left-color: #16834a;
}

.daily-order-link.cancelled {
  background: #f8fafc;
  border-left-color: #7a8494;
}

.daily-closed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 8px;
}

.daily-closed-grid > div {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dfe8e4;
  border-radius: 8px;
}

.daily-closed-grid h4 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  color: #315a61;
  font-size: 13px;
}

.daily-closed-grid h4 span {
  color: #7a8d91;
  font-size: 10px;
  font-weight: 700;
}

.daily-closed-grid .daily-order-link + .daily-order-link {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .daily-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .daily-section-heading p {
    max-width: 100%;
    text-align: left;
  }

  .daily-primary-kpis,
  .daily-flow-grid,
  .daily-metric-grid,
  .daily-closed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-conclusion {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-conclusion span {
    text-align: left;
  }

  .daily-flow-step {
    min-height: 106px;
  }

  .daily-order-link {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

#previewDialog {
  width: min(760px, calc(100vw - 28px));
}

.form-grid.compact .dialog-actions {
  position: sticky;
  bottom: -18px;
  z-index: 4;
  margin: 4px -18px -18px;
  padding: 10px 18px 14px;
  background: linear-gradient(180deg, rgba(255,253,248,0.78), #fffdf8 38%);
  border-top: 1px solid rgba(212, 225, 223, 0.82);
  box-shadow: 0 -10px 22px rgba(24, 51, 59, 0.07);
}

.feedback-dialog {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 300;
  width: min(560px, calc(100vw - 28px));
  margin: 0;
  padding: 0;
  overflow: visible;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.feedback-dialog::backdrop,
.feedback-dialog::before {
  display: none;
}

.feedback-dialog #toast {
  position: static;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 13px 16px;
  color: #fff;
  border-left: 5px solid #e5a130;
  border-radius: 8px;
  background: #173b44;
  box-shadow: 0 12px 28px rgba(23, 59, 68, 0.24);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.feedback-dialog #toast.toast-error {
  border-left-color: #ef6a68;
  background: #8f2f36;
}

.feedback-dialog #toast.toast-success {
  border-left-color: #53c58b;
  background: #17664e;
}

.toast-in-modal {
  position: absolute;
  top: 10px;
  right: auto !important;
  bottom: auto !important;
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100% - 28px));
  height: auto !important;
  min-height: 0 !important;
  max-height: 58px;
  box-sizing: border-box;
  margin: 0;
  padding: 11px 14px;
  transform: translateX(-50%);
  display: block !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  border-left: 5px solid #e5a130;
  border-radius: 8px;
  background: #173b44;
  box-shadow: 0 12px 28px rgba(23, 59, 68, 0.24);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  pointer-events: none;
}

.toast-in-modal.toast-error {
  border-left-color: #ef6a68;
  background: #8f2f36;
}

.toast-in-modal.toast-success {
  border-left-color: #53c58b;
  background: #17664e;
}

.input-error,
.input-error:focus {
  border-color: #c5394b !important;
  box-shadow: 0 0 0 3px rgba(197, 57, 75, 0.13) !important;
}

.reship-cause-field.input-error {
  padding: 8px;
  border: 1px solid #c5394b;
  border-radius: 8px;
  background: #fff4f4;
}

.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.login-box {
  width: min(380px, calc(100vw - 36px));
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 0 0 18px;
}

.login-box p {
  color: var(--danger);
}

/* Studio-wide visual refresh: keep the workflow practical, but make it feel like a design workbench. */
.board,
.alert-panel,
.drawer-panel,
dialog {
  border-color: rgba(103, 132, 130, 0.34);
  box-shadow: var(--studio-shadow);
}

.board,
.alert-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,253,248,0.96)),
    var(--panel);
}

.board::before,
.alert-panel::before,
.detail-section::before,
dialog::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #0f766e, #c94b4b 36%, #d47a25 66%, #4b5fc4);
  opacity: 0.72;
}

.board-head,
.panel-head {
  position: relative;
  padding: 18px 18px 15px;
  background:
    linear-gradient(90deg, rgba(239,250,247,0.92), rgba(255,255,255,0.78) 58%, rgba(255,247,232,0.55));
}

.board-head h2,
.panel-head h2,
.drawer-head h2,
dialog h2 {
  color: var(--ink);
}

.board-head h2::before,
.panel-head h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 2px;
  background: #0f766e;
  box-shadow: 5px 5px 0 #d47a25;
  vertical-align: 1px;
}

.board-head p,
.panel-head span,
.month-summary {
  color: #466770 !important;
}

.filters input,
.filters select,
label input,
label select,
label textarea,
.attachment-upload-bar select {
  color: var(--ink);
  background: rgba(255,255,255,0.94);
  border-color: #c9dad7;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

.filters input::placeholder,
label input::placeholder,
label textarea::placeholder {
  color: #8b9da2;
}

.filters input:focus,
.filters select:focus,
label input:focus,
label select:focus,
label textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.segmented-control {
  min-height: 40px;
  padding: 4px;
  background: #eef5f3;
  border-color: #c7d9d6;
  border-radius: 8px;
}

.segmented-control button {
  border-radius: 6px;
  color: #516b72;
  font-weight: 800;
}

.segmented-control button.active {
  color: #0f5f59;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(24, 51, 59, 0.10);
}

.primary,
.ghost,
.danger-btn,
.danger-outline,
.flow-btn,
.cod-confirm-btn,
.warning-action,
.attachment-pick {
  min-height: 40px;
  border-radius: 7px;
}

.primary,
.new-action {
  background: linear-gradient(135deg, #1f6670, #164b56);
  box-shadow: 0 8px 18px rgba(31, 102, 112, 0.18);
}

.primary:hover,
.new-action:hover {
  background: linear-gradient(135deg, #195a61, #123f48);
}

.ghost,
.danger-outline,
.warning-action,
.attachment-pick {
  background: #fffdf8;
  border-color: #d8e2df;
}

.scan-action {
  color: #8a4a08;
  border-color: #e9c887;
  background: #fff8e7;
}

.report-action {
  color: #0f7068;
  border-color: #9fd7ce;
  background: #ecfbf7;
}

.table-wrap {
  padding: 10px 12px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.68), rgba(239,245,243,0.85));
}

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

th {
  top: -10px;
  color: #4f6970;
  background: #f8fbfa;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

tbody tr[data-order-id] {
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(28, 60, 68, 0.06);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

tbody tr[data-order-id]:hover {
  background: #f8fdfb;
  box-shadow: 0 12px 26px rgba(28, 60, 68, 0.11);
  transform: translateY(-1px);
}

tbody tr[data-order-id] td:first-child {
  border-left: 4px solid #6e9794;
  border-radius: 8px 0 0 8px;
}

tbody tr[data-order-id] td:last-child {
  border-radius: 0 8px 8px 0;
}

tbody tr[data-status="abnormal"],
tbody tr[data-status="abnormal"]:hover {
  color: #6f2626;
  background:
    linear-gradient(90deg, rgba(255,229,229,0.98), rgba(255,248,248,0.96));
  box-shadow: 0 10px 28px rgba(185, 28, 28, 0.14);
}

tbody tr[data-status="abnormal"] td:first-child {
  border-left-color: var(--danger);
  box-shadow: inset 4px 0 0 var(--danger);
}

tbody tr[data-status="completed"] td:first-child { border-left-color: var(--success); }

.order-no {
  color: #0e3340;
}

.badge {
  border: 1px solid rgba(80, 106, 116, 0.12);
  font-weight: 800;
}

.badge.status-pending-assignment { color: #8a4a08; background: #fff4d8; border-color: #efce84; }
.badge.status-designing { color: #6330a5; background: #f2eaff; border-color: #d8c5ff; }
.badge.status-drafted { color: #08708f; background: #e8f9ff; border-color: #b6e6f4; }
.badge.status-completed { color: #16663c; background: #e8f6ee; border-color: #a8d4bb; }
.badge.status-abnormal { color: #a61b1b; background: #ffebeb; border-color: #f3b5b5; }

.alerts-list {
  background: #fffdf8;
}

.alert-item {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,247,232,0.92), rgba(255,255,255,0.96));
  border-color: #eadbc0;
  box-shadow: 0 8px 20px rgba(80, 52, 22, 0.06);
}

.alert-item::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.12;
}

.alert-item.critical {
  color: #7b2020;
  background:
    linear-gradient(135deg, rgba(255,229,229,0.98), rgba(255,248,248,0.96));
  box-shadow: 0 10px 26px rgba(185, 28, 28, 0.12);
}

.drawer-shade,
dialog::backdrop {
  background: rgba(16, 47, 55, 0.48);
  backdrop-filter: blur(3px);
}

.drawer-panel {
  background:
    linear-gradient(90deg, rgba(36,107,104,0.038) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36,107,104,0.032) 1px, transparent 1px),
    #f7fbfa;
  background-size: 30px 30px, 30px 30px, auto;
}

.drawer-head {
  background:
    linear-gradient(135deg, #ffffff 0%, #effaf7 70%, #fff7e8 100%);
  box-shadow: 0 8px 22px rgba(24, 51, 59, 0.06);
}

.drawer-head h2 {
  font-size: 21px;
}

.detail-section {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 24px rgba(28, 60, 68, 0.07);
}

.detail-section::before {
  left: 0;
  right: auto;
  top: 12px;
  width: 4px;
  height: calc(100% - 24px);
  border-radius: 0 999px 999px 0;
  background: currentColor;
  opacity: 0.95;
}

.workflow-card { color: #4b8790; background: #fbfdfd; }
.information-card { color: #3f7fa1; background: #f8fbff; }
.delivery-card { color: #b27332; background: #fffaf2; }
.responsibility-card { color: #4f8a69; background: #f7fcf8; }
.design-card { color: #5277a4; background: #f8fbff; }
.attachments-card { color: #a6753d; background: #fffaf2; }
.revision-card { color: #72599c; background: #fbf8ff; }
.reship-card { color: #b75a4e; background: #fff6f4; }
.log-card { color: #7b8a90; background: #f8fafb; }

.detail-section h3 {
  color: #173b44;
  letter-spacing: 0;
}

.detail-field {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(212, 225, 223, 0.74);
}

.detail-field span {
  color: #0f7068;
}

.detail-tabs {
  background: rgba(245, 250, 248, 0.94);
  box-shadow: 0 8px 20px rgba(24, 51, 59, 0.07);
}

.detail-tabs button.active {
  background: linear-gradient(135deg, #246b68, #185754);
}

.file-zone,
.detail-file-zone {
  background:
    linear-gradient(135deg, rgba(239,250,247,0.90), rgba(255,253,248,0.96));
  border-color: #9bcac4;
  border-radius: 8px;
}

.file-zone:hover,
.file-zone.dragover,
.file-zone:focus {
  color: #0f766e;
  background: #eefbf7;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.10);
}

.attachment-group-head {
  padding: 8px 10px;
  border-radius: 7px;
  background: #f8fbfa;
}

.file-preview,
.attachment-card {
  background: #fffdf8;
  border-color: #d8e2df;
  box-shadow: 0 10px 22px rgba(28, 60, 68, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.file-preview:hover,
.attachment-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(28, 60, 68, 0.13);
}

.attachment-preview-trigger {
  background:
    linear-gradient(135deg, #edf6f5, #fff7e8);
}

.attachment-preview-label {
  background: rgba(16, 47, 55, 0.86);
}

dialog {
  position: relative;
  overflow: hidden;
  background: #fffdf8;
}

dialog h2,
dialog h3 {
  color: var(--ink);
}

.form-grid {
  background:
    linear-gradient(90deg, rgba(36,107,104,0.028) 1px, transparent 1px),
    linear-gradient(0deg, rgba(36,107,104,0.024) 1px, transparent 1px),
    #fffdf8;
  background-size: 30px 30px, 30px 30px, auto;
}

.recognize-box {
  background:
    linear-gradient(135deg, rgba(239,250,247,0.96), rgba(255,247,232,0.64));
  border-color: #b8d9d4;
}

.report-box {
  background: #fffdf8;
}

.report-view {
  padding-right: 4px;
}

.report-heading {
  border-radius: 8px;
  background:
    linear-gradient(135deg, #173b44 0%, #246b68 58%, #9a6a22 100%);
  box-shadow: 0 12px 26px rgba(23, 59, 68, 0.12);
}

.report-heading strong {
  color: #fffdf8;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(8, 31, 35, 0.26);
}

.report-heading span {
  color: rgba(238, 250, 247, 0.92);
  font-weight: 700;
}

.report-heading .report-accuracy {
  color: #ffffff;
  background: rgba(15, 118, 110, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.report-stat {
  border-radius: 7px;
  box-shadow: 0 7px 16px rgba(28, 60, 68, 0.06);
}

.report-section {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid rgba(212, 225, 223, 0.78);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}

.report-section + .report-section {
  border-top: 1px solid rgba(212, 225, 223, 0.78);
}

.report-section h3 {
  color: #173b44;
}

.report-table,
.cod-report-list button,
.quality-person-list > div,
.daily-volume-list > div,
.monthly-status-list .report-stat,
.report-list-row {
  border-radius: 7px;
  background: #ffffff;
}

.design-item-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(248,251,255,0.98), rgba(255,253,248,0.92));
  border-color: #cadbe8;
  box-shadow: 0 8px 20px rgba(49, 91, 89, 0.07);
}

.design-item-card::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 24px;
  height: 7px;
  border-radius: 999px;
  background: #9bcac4;
  opacity: 0.7;
}

.design-item-head .size-change-badge {
  color: #8b4a0b;
  border-color: #e5a23a;
  background: #fff3d9;
}

.design-item-card.add-on-item-card {
  padding-top: 34px;
  border-color: #e49a38;
  border-left-color: #d97706;
  background: linear-gradient(135deg, #fffaf0, #fff4dc);
  box-shadow: 0 8px 20px rgba(190, 111, 17, 0.13);
}

.design-item-card.add-on-item-card::before {
  content: "后加";
  position: absolute;
  top: 10px;
  left: -4px;
  padding: 3px 8px 3px 9px;
  color: #fff;
  border-radius: 0 999px 999px 0;
  background: #d97706;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.design-item-head .add-on-badge {
  color: #9a4e12;
  border-color: #e7a84e;
  background: #ffedc2;
}

.design-item-row.add-on-type-row {
  border: 1px solid #efb35b;
  background: rgba(255, 237, 194, 0.78);
}

.design-item-row.add-on-type-row b,
.design-item-row.add-on-type-row p {
  color: #9a4e12;
  font-weight: 900;
}

.design-item-head strong {
  color: #173b44;
}

.design-item-head em {
  color: #0f7068;
  background: #e8f8f4;
  border: 1px solid #b8ded8;
}

.design-item-row {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 7px;
  background: rgba(255,255,255,0.70);
}

.design-item-row b {
  color: #60757c;
}

.design-item-row p {
  color: #17333c;
  line-height: 1.45;
}

.design-summary {
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(212, 225, 223, 0.54);
}

.design-summary summary {
  color: #0f7068;
}

.permission-banner,
.revision-entry,
.reship-entry,
.cod-ship-notice,
.quality-review-result {
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(28, 60, 68, 0.06);
}

.permission-banner {
  background:
    linear-gradient(135deg, rgba(239,250,247,0.90), rgba(255,255,255,0.92));
  border-color: #b8d9d4;
}

.permission-banner.owner-view {
  background:
    linear-gradient(135deg, #effbf6, #ffffff);
}

.permission-banner.readonly-view {
  background:
    linear-gradient(135deg, #fff9eb, #ffffff);
}

.revision-entry {
  background:
    linear-gradient(135deg, #fbf8ff, #ffffff);
  border-color: #d9c8f0;
}

.revision-actions button {
  border-radius: 7px;
}

.reship-entry {
  background:
    linear-gradient(135deg, #fff3ef, #ffffff);
  border: 1px solid #f0c7be;
  border-left: 4px solid #dc5f4a;
}

.timeline {
  gap: 9px;
}

.timeline-item {
  position: relative;
  padding: 10px 12px 10px 14px;
  border: 1px solid #dce6e4;
  border-left: 4px solid #8aa4a2;
  border-radius: 8px;
  background: rgba(255,255,255,0.84);
}

.timeline-item.add_on,
.timeline-item.size_change,
.timeline-item.template_change {
  box-shadow: 0 8px 18px rgba(28, 60, 68, 0.06);
}

.timeline-item.add_on { background: #eff8ff; }
.timeline-item.size_change { background: #fff7ed; }
.timeline-item.template_change { background: #f7f3ff; }

.timeline-item strong {
  color: #173b44;
}

.timeline-item p {
  color: #5d7077;
}

.quality-person-list > div,
.quality-detail-list button,
.cod-report-list button {
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(28, 60, 68, 0.06);
}

.quality-detail-list button:hover,
.cod-report-list button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(28, 60, 68, 0.11);
}

.dialog-actions {
  padding: 0 18px 18px;
}

#orderDialog {
  width: min(900px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

#orderForm.order-form {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 14px 18px 0;
}

#orderForm .dialog-head {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: -14px -18px 0;
  padding: 14px 18px 10px;
  background:
    linear-gradient(135deg, rgba(255,253,248,0.98), rgba(239,250,247,0.96));
  border-bottom: 1px solid rgba(212, 225, 223, 0.70);
}

#orderForm .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 6px -18px 0;
  padding: 10px 18px 14px;
  background:
    linear-gradient(180deg, rgba(255,253,248,0.72), #fffdf8 34%);
  border-top: 1px solid rgba(212, 225, 223, 0.82);
  box-shadow: 0 -10px 24px rgba(24, 51, 59, 0.08);
}

#orderForm label {
  gap: 5px;
  color: #2e4a52;
  font-size: 12px;
  font-weight: 800;
}

#orderForm label input,
#orderForm label select,
#orderForm label textarea {
  min-height: 36px;
  padding: 7px 9px;
}

#orderForm .system-date-field {
  color: #536e73;
  background: #edf6f4;
  border-color: #bed8d2;
  cursor: not-allowed;
  pointer-events: none;
  font-weight: 700;
}

.ai-check-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #c9e0dc;
  border-left: 4px solid #167b70;
  border-radius: 9px;
  background: linear-gradient(135deg, #f2faf8, #fffdf8);
}

.recognize-materials {
  color: #176d66;
  font-weight: 800;
}

.ai-check-panel.attention {
  border-color: #e9d09b;
  border-left-color: #c57b16;
  background: #fffaf0;
}

.ai-check-panel.critical {
  border-color: #e7b4b7;
  border-left-color: #c5394b;
  background: #fff5f5;
}

.ai-check-head,
.ship-check-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-check-head > div,
.ship-check-head > div {
  display: grid;
  gap: 3px;
}

.ai-check-kicker,
.ship-check-head span {
  color: #668087;
  font-size: 11px;
  font-weight: 800;
}

.ai-check-head strong,
.ship-check-head strong {
  color: #173b44;
  font-size: 14px;
}

.ai-check-head em,
.ship-check-head em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #176d66;
  background: #e5f5f0;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ai-check-components {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #c8ddd8;
  font-size: 12px;
}

.ai-check-components span {
  color: #6d8186;
}

.ai-check-components strong {
  overflow-wrap: anywhere;
  color: #154f58;
}

.ai-check-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ai-check-ledger > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #d6e7e3;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.ai-check-ledger span,
.ship-check-section-title span {
  color: #6d8186;
  font-size: 11px;
}

.ai-check-ledger strong {
  overflow-wrap: anywhere;
  color: #174652;
  font-size: 13px;
}

.ai-check-warnings,
.ai-check-ok {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #8a641d;
  font-size: 12px;
}

.ai-check-warnings span::before {
  content: "!";
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c57b16;
  font-weight: 900;
}

.ai-check-warnings span.critical {
  color: #a72f3d;
  font-weight: 800;
}

.ai-check-warnings span.critical::before {
  background: #c5394b;
}

.ai-check-ok {
  color: #32766b;
}

.ai-check-ok::before {
  content: "✓";
  display: inline-block;
  margin-right: 5px;
  color: #167b70;
  font-weight: 900;
}

.ship-checklist,
.ship-check-empty {
  padding: 12px 14px;
  border: 1px solid #c9e0dc;
  border-left: 4px solid #167b70;
  border-radius: 9px;
  background: #f3faf8;
}

.ship-checklist.has-blocker,
.ship-check-empty {
  border-color: #e7b4b7;
  border-left-color: #c5394b;
  background: #fff5f5;
}

.ship-check-head em {
  color: #8a641d;
  background: #fff0cc;
}

.ship-check-items {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.ship-check-section + .ship-check-section {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed #c8ddd8;
}

.ship-check-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ship-check-section-title strong {
  color: #174652;
  font-size: 12px;
}

.ship-check-item.unresolved {
  border-color: #e7b4b7;
  background: #fff7f7;
  cursor: not-allowed;
}

.ship-check-item.unresolved strong {
  color: #a72f3d;
}

.ship-check-item.unresolved input {
  accent-color: #c5394b;
}

.ship-check-note {
  padding: 9px 10px;
  border: 1px dashed #c8ddd8;
  border-radius: 7px;
  color: #6d8186;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.ship-check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #d8e8e5;
  border-radius: 7px;
  background: rgba(255,255,255,0.86);
  cursor: pointer;
}

.ship-check-item:has(input:checked) {
  border-color: #75b9a6;
  background: #eaf8f3;
}

.ship-check-item.is-added {
  border-color: #d58a1a;
  background: #fff8e8;
  box-shadow: inset 4px 0 0 #d58a1a;
}

.ship-check-item.is-added:has(input:checked) {
  border-color: #b66c12;
  background: #fff1cf;
}

.ship-check-item.is-incomplete {
  border-color: #d78b8f;
  background: #fff5f5;
  cursor: not-allowed;
}

.ship-check-item.is-incomplete input {
  cursor: not-allowed;
  accent-color: #c5394b;
}

.ship-check-item .ship-item-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.ship-add-on-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid #d58a1a;
  border-radius: 999px;
  color: #9a5e0b;
  background: #ffedbe;
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  white-space: nowrap;
}

.ship-check-item input {
  width: 17px;
  min-width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #167b70;
}

.ship-check-item .ship-product-count {
  flex: 0 0 82px;
  width: 82px;
  min-width: 82px;
  height: 30px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #d59a9f;
  border-radius: 6px;
  color: #174652;
  background: #fff;
  font-size: 12px;
}

.ship-check-item.unresolved.resolved {
  border-color: #75b9a6;
  background: #eaf8f3;
}

.ship-check-item.unresolved.resolved strong {
  color: #176d66;
}

.ship-check-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ship-check-item strong {
  color: #174652;
  font-size: 12px;
}

.ship-check-item small,
.ship-check-empty span {
  color: #6d8186;
  font-size: 11px;
  line-height: 1.45;
}

.ship-check-warning {
  display: grid;
  gap: 3px;
  margin-top: 9px;
  color: #a72f3d;
  font-size: 12px;
  font-weight: 800;
}

.ship-check-empty {
  display: grid;
  gap: 4px;
}

#orderForm textarea {
  resize: vertical;
}

#recognizeBox {
  padding: 10px 12px;
}

#recognizeText {
  min-height: 76px;
}

#orderForm textarea[name="design_items"] {
  min-height: 190px;
  line-height: 1.55;
  white-space: pre-wrap;
}

#orderForm textarea[name="requirements"] {
  min-height: 66px;
}

#orderForm textarea[name="remark"] {
  min-height: 56px;
}

#orderForm .form-hint {
  margin: -2px 0 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(239, 250, 247, 0.72);
}

.rare-fields {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(177, 200, 196, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.rare-fields summary {
  cursor: pointer;
  padding: 10px 12px;
  color: #386068;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.rare-fields summary::-webkit-details-marker {
  display: none;
}

.rare-fields summary::after {
  content: "+";
  float: right;
  color: #0f766e;
  font-size: 16px;
  line-height: 1;
}

.rare-fields[open] summary {
  color: #0f7068;
  background: rgba(239, 250, 247, 0.84);
  border-bottom: 1px solid rgba(177, 200, 196, 0.68);
}

.rare-fields[open] summary::after {
  content: "-";
}

.rare-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
  gap: 10px;
  padding: 10px 12px 12px;
}

.rare-field-grid .form-hint {
  align-self: stretch;
  margin: 0;
}

.order-file-input {
  display: none;
}

#orderForm .file-zone {
  min-height: 56px;
  margin-top: 0;
  padding: 10px 12px;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .studio-wall {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  }

  .studio-main {
    grid-column: 1 / -1;
  }

  .studio-side {
    grid-column: 1 / -1;
  }

  .route-tape {
    grid-template-columns: 1fr;
  }

  .smart-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-center {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  }

  .command-main {
    grid-column: 1 / -1;
  }

  .command-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }

  .command-ledger-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-ribbon {
    grid-template-columns: 1fr;
  }

  .alert-panel {
    order: 3;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .topbar,
  .board-head {
    align-items: stretch;
    flex-direction: column;
  }

  .layout {
    gap: 10px;
    padding: 10px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .studio-wall,
  .studio-main,
  .studio-side,
  .route-tape {
    grid-template-columns: 1fr;
  }

  .studio-main,
  .redline-board,
  .receipt-card,
  .station-card,
  .route-tape {
    padding: 12px;
  }

  .studio-copy strong {
    font-size: 21px;
  }

  .studio-copy,
  .studio-ticket,
  .swatch-board {
    grid-column: 1;
    grid-row: auto;
  }

  .studio-ticket {
    margin-top: 10px;
  }

  .rare-field-grid {
    grid-template-columns: 1fr;
  }

  .swatch-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-swatch {
    min-height: 122px;
  }

  .redline-board::before,
  .studio-main::after {
    display: none;
  }

  .route-steps {
    grid-template-columns: 1fr;
  }

  .smart-workbench-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .smart-task-grid {
    grid-template-columns: 1fr;
  }

  .command-center,
  .command-main,
  .command-ledger {
    grid-template-columns: 1fr;
  }

  .command-ledger-card {
    grid-template-columns: 1fr;
  }

  .command-ledger-card > .command-section-head:nth-child(1),
  .command-ledger-card > .ledger-grid,
  .command-ledger-card > .command-section-head:nth-child(4),
  .command-ledger-card > .team-metrics {
    grid-column: 1;
    grid-row: auto;
  }

  .ledger-divider {
    grid-column: 1;
    grid-row: auto;
    width: auto;
    height: 1px;
    margin: 2px 0;
  }

  .command-main,
  .command-risk,
  .command-ledger-card,
  .command-ribbon {
    padding: 12px;
  }

  .command-main {
    min-height: 0;
  }

  .command-main-copy,
  .command-score,
  .command-focus-grid {
    grid-column: 1;
    grid-row: auto;
  }

  .command-main-copy strong {
    font-size: 21px;
  }

  .command-focus-grid,
  .ledger-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    position: static;
    width: 100%;
    max-width: 100vw;
    padding: 12px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
  }

  .topbar-actions .user-badge {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .topbar-actions button {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    padding: 8px 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  .segmented-control {
    width: 100%;
  }

  .board-head {
    padding: 13px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
    padding: 9px;
    background: #eef3f2;
  }

  table,
  tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 9px;
  }

  tbody tr[data-order-id] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-left: 4px solid #6e9794;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(28, 60, 68, 0.07);
  }

  tbody tr[data-status="abnormal"] {
    border-color: #e79a9a;
    border-left-color: var(--danger);
    background: #fff0f0;
  }

  tbody tr[data-status="completed"] {
    border-left-color: var(--success);
  }

  tbody td {
    min-width: 0;
    padding: 8px 10px;
    border: 0;
  }

  tbody td::before {
    display: block;
    margin-bottom: 3px;
    color: #708087;
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
  }

  tbody td:nth-child(1),
  tbody td:nth-child(2),
  tbody td:nth-child(3) {
    grid-column: 1 / -1;
  }

  tbody td:nth-child(1) {
    padding-top: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    background: #f7faf9;
  }

  tbody tr[data-status="abnormal"] td:nth-child(1) {
    background: #ffe5e5;
  }

  tbody td:nth-child(9) {
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid var(--line);
  }

  tbody tr:not([data-order-id]) td {
    display: block;
  }

  .reship-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .quality-review-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .detail-grid,
  .design-item-body,
  .design-item-list,
  .revision-entry,
  .revision-target-fields {
    grid-template-columns: 1fr;
  }

  .revision-actions {
    justify-content: flex-start;
  }

  .drawer-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 13px 14px;
    background: #fff;
  }

  .drawer-head h2 {
    font-size: 16px;
  }

  .drawer-content {
    height: calc(100vh - 70px);
    padding: 10px;
  }

  .detail-section {
    margin-bottom: 9px;
    padding: 12px;
  }

  .detail-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin-bottom: 9px;
  }

  .detail-tabs button {
    min-height: 35px;
    padding: 5px 3px;
    font-size: 12px;
  }

  .detail-tabs button span {
    display: none;
  }

  .cod-detail-value,
  .cod-ship-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-grid,
  .file-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .attachment-upload-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attachment-upload-bar button {
    grid-column: 1 / -1;
  }

  .attachment-preview-trigger {
    height: 86px;
  }

  .cod-report-list button {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cod-report-list em {
    text-align: left;
  }

  .report-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-progress-grid,
  .report-detail-columns {
    grid-template-columns: 1fr;
  }

  .report-table {
    overflow-x: auto;
  }

  .report-table-head,
  .report-table-row {
    min-width: 520px;
  }

  .monthly-staff-table .report-table-head,
  .monthly-staff-table .report-table-row {
    min-width: 650px;
  }

  .report-alert-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .drawer {
    grid-template-columns: 0 minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .ai-check-head,
  .ship-check-head {
    display: grid;
  }

  .ai-check-head em,
  .ship-check-head em {
    width: fit-content;
  }

  .ai-check-components {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ai-check-ledger {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .layout {
    gap: 10px;
    padding: 10px;
  }

  .studio-wall {
    gap: 9px;
  }

  .studio-main,
  .redline-board,
  .receipt-card,
  .station-card,
  .route-tape,
  .board,
  .side-panel {
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(31, 72, 78, 0.08);
  }

  .studio-main {
    padding: 12px;
  }

  .studio-copy p {
    display: none;
  }

  .studio-ticket {
    min-height: 58px;
    padding: 8px 10px;
  }

  .swatch-board,
  .redline-notes,
  .receipt-lines,
  .station-tags,
  .route-steps {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .studio-swatch,
  .redline-note,
  .receipt-line,
  .station-tag,
  .route-step {
    min-height: 44px;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filters #searchInput {
    grid-column: 1 / -1;
  }

  tbody tr[data-order-id] {
    grid-template-columns: 1fr;
  }

  tbody td:nth-child(4),
  tbody td:nth-child(5),
  tbody td:nth-child(6),
  tbody td:nth-child(7),
  tbody td:nth-child(8) {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  tbody td::before {
    margin: 0;
  }

  .drawer-panel {
    width: 100%;
    border-radius: 0;
  }

  .drawer-content {
    padding-bottom: 28px;
  }

  .detail-section {
    border-radius: 7px;
  }

  .detail-grid {
    gap: 8px;
  }

  .customer-history-list {
    grid-template-columns: 1fr;
  }

  .detail-field {
    padding: 9px 10px;
  }

  .monthly-staff-table .report-table-head.hide-money-col,
  .monthly-staff-table .report-table-row.hide-money-col {
    min-width: 520px;
  }
}

/* Final dashboard composition: one reading order, one home for each metric. */
.studio-wall {
  grid-template-columns: minmax(500px, 1.08fr) minmax(300px, 0.62fr) minmax(320px, 0.76fr);
  gap: 12px;
}

.studio-main {
  grid-template-rows: auto;
  align-content: stretch;
}

.studio-info-hub {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: 15px;
  color: #173b44;
  background:
    linear-gradient(90deg, rgba(70, 96, 184, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(70, 96, 184, 0.03) 1px, transparent 1px),
    #fbfcff;
  background-size: 24px 24px, 24px 24px, auto;
  border: 1px solid #d9e0ee;
  border-left: 4px solid #4b5fc4;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 72, 78, 0.08);
}

.info-hub-head,
.info-hub-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.info-hub-head > div {
  display: grid;
  gap: 4px;
}

.info-hub-head span,
.info-hub-section-head span {
  color: #38535b;
  font-size: 12px;
  font-weight: 900;
}

.info-hub-head strong {
  color: #3349b5;
  font-size: 18px;
  line-height: 1.1;
}

.info-hub-head small,
.info-hub-section-head em {
  color: #6d7d8e;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.info-hub-section-head em {
  padding: 3px 7px;
  color: #5163a9;
  background: #eef1ff;
  border: 1px solid #d7ddfb;
  border-radius: 999px;
}

.info-hub-ledger .receipt-lines,
.info-hub-team .station-tags {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.info-hub-ledger .receipt-line,
.info-hub-team .station-tag {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 6px;
}

.info-hub-ledger .receipt-line {
  border-left: 3px solid #4b5fc4;
}

.info-hub-team .station-tag {
  border-left: 3px solid #24766e;
}

.info-hub-divider {
  height: 1px;
  background: #dce3ef;
}

.smart-workbench {
  gap: 12px;
  padding: 16px;
}

.smart-workbench-head strong {
  font-size: 20px;
}

.smart-task-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.65fr);
  gap: 10px;
  align-items: stretch;
}

.smart-task-primary,
.smart-task-secondary {
  min-width: 0;
  width: 100%;
}

.smart-task-primary {
  display: flex;
}

.smart-task-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.smart-task-card {
  min-height: 0;
  height: 100%;
  width: 100%;
  padding: 11px;
}

.smart-task-card.is-primary {
  min-height: 164px;
  padding: 15px;
  border-left-width: 5px;
  box-shadow: 0 9px 20px rgba(54, 76, 79, 0.09);
}

.smart-task-card.is-primary strong {
  font-size: 17px;
}

.smart-task-card.is-primary .smart-task-top i {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.smart-task-card.is-compact strong {
  font-size: 13px;
}

.smart-task-card.is-compact p {
  font-size: 10px;
}

.smart-task-empty {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .studio-wall {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  }

  .studio-info-hub {
    grid-column: 1 / -1;
  }

  .smart-task-grid {
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  }

  .smart-task-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .studio-wall {
    grid-template-columns: 1fr;
  }

  .studio-info-hub {
    grid-column: auto;
  }

  .info-hub-ledger .receipt-lines,
  .info-hub-team .station-tags {
    grid-template-columns: 1fr 1fr;
  }

  .smart-task-grid {
    grid-template-columns: 1fr;
  }

  .smart-task-secondary {
    grid-template-columns: 1fr;
  }

  .smart-task-card.is-primary {
    min-height: 150px;
  }
}

/* Monthly report final layout overrides. */
.monthly-report-heading-v2 {
  min-height: 76px;
  padding: 16px 18px;
}

.monthly-report-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.monthly-report-section[id] {
  scroll-margin-top: 58px;
}

/* Reports live inside a scrolling dialog; keep anchor navigation stable and
   prevent long labels from escaping their cards. */
.report-view {
  overscroll-behavior: contain;
  scroll-behavior: auto;
  overflow-anchor: none;
}

.report-section,
.monthly-report-section,
.daily-report-section {
  min-width: 0;
  scroll-margin-top: 58px;
}

.report-section h3,
.report-section p,
.report-section span,
.report-section strong,
.report-section em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reship-item-option em {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.reship-item-option .reship-item-id {
  color: #93a4a8;
  font-size: 10px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.monthly-report-nav a {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #557078;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.monthly-report-nav a:hover {
  color: #0f7068;
  background: #edf8f5;
}

.monthly-report-section {
  padding: 14px 0;
}

.monthly-section-heading {
  display: block;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 8px 8px;
  margin-bottom: 10px;
}

.monthly-section-heading > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.monthly-section-heading > div > span {
  flex: 0 0 22px;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #ffffff;
  background: #246b68;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.monthly-section-heading h3 {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 15px;
}

.monthly-section-heading p {
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
  margin: 4px 0 0 29px;
  color: #74868a;
  font-size: 11px;
  text-align: left;
}

.monthly-primary-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

.monthly-primary-kpis .report-stat {
  min-height: 64px;
  padding: 10px 11px;
}

.monthly-conclusion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 12px;
  color: #24575a;
  background: #eef8f5;
  border-left: 4px solid #0f766e;
  border-radius: 7px;
}

.monthly-conclusion strong {
  font-size: 16px;
}

.monthly-conclusion span {
  color: #5b7479;
  font-size: 12px;
}

.monthly-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.monthly-mini-grid > div {
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #dfe7e3;
  border-radius: 7px;
}

.monthly-mini-grid span,
.monthly-mini-grid strong,
.monthly-mini-grid small {
  display: block;
}

.monthly-mini-grid span,
.monthly-mini-grid small {
  color: #718287;
  font-size: 11px;
}

.monthly-mini-grid strong {
  margin-top: 4px;
  color: #173b44;
  font-size: 15px;
}

.monthly-mini-grid small {
  margin-top: 3px;
}

.monthly-report-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.monthly-report-two-col .report-section {
  min-width: 0;
}

.monthly-status-list-v2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monthly-staff-table-v2 .report-table-head,
.monthly-staff-table-v2 .report-table-row {
  min-height: 38px;
}

.monthly-daily-section {
  overflow: hidden;
}

.monthly-daily-chart {
  display: grid;
  gap: 7px;
  min-height: 0;
  padding: 10px 12px;
  overflow: visible;
  background: #fbfdfc;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
}

.monthly-day-head,
.monthly-day-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 52px 92px;
  align-items: center;
  gap: 10px;
}

.monthly-day-head {
  padding: 0 4px 4px;
  color: #829196;
  border-bottom: 1px solid #e2eae7;
  font-size: 10px;
}

.monthly-day-head span:nth-child(3),
.monthly-day-head span:nth-child(4) {
  text-align: right;
}

.monthly-day-row {
  min-height: 37px;
  padding: 5px 4px;
  border-radius: 6px;
}

.monthly-day-row:hover {
  background: #f0f8f5;
}

.monthly-day-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #3d5a61;
  font-size: 12px;
  font-weight: 800;
}

.monthly-day-label em {
  padding: 2px 5px;
  color: #98601b;
  background: #fff0d1;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
}

.monthly-day-track {
  height: 10px;
  overflow: hidden;
  background: #e4efec;
  border-radius: 999px;
}

.monthly-day-track i {
  display: block;
  height: 100%;
  min-width: 10px;
  background: #246b68;
  border-radius: inherit;
}

.monthly-day-count {
  color: #173b44;
  font-size: 12px;
  text-align: right;
}

.monthly-day-row small {
  overflow: hidden;
  color: #718287;
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-quality-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.monthly-quality-summary span {
  padding: 6px 9px;
  color: #6a596f;
  background: #faf6ff;
  border: 1px solid #e3d7f2;
  border-radius: 999px;
  font-size: 11px;
}

.monthly-quality-summary strong {
  color: #573a84;
  font-size: 14px;
}

.monthly-quality-people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 9px;
}

.monthly-quality-people > div {
  display: grid;
  grid-template-columns: minmax(70px, 0.55fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 8px;
}

.monthly-quality-people em {
  color: #718287;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.monthly-reship-list {
  display: grid;
  gap: 7px;
}

.monthly-reship-card,
.monthly-risk-row {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 5px;
  padding: 10px 11px;
  color: #173b44;
  text-align: left;
  background: #ffffff;
  border: 1px solid #d9e4e1;
  border-left: 4px solid #0f766e;
  border-radius: 7px;
}

.monthly-reship-card:hover,
.monthly-risk-row:hover {
  background: #f7fcfa;
  box-shadow: 0 7px 16px rgba(28, 60, 68, 0.08);
}

.monthly-reship-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.monthly-reship-head strong,
.monthly-risk-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.monthly-reship-head em {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #23675e;
  background: #eaf8f3;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.monthly-reship-card p,
.monthly-reship-card small,
.monthly-risk-row span {
  margin: 0;
  color: #657a80;
  font-size: 11px;
  line-height: 1.4;
}

.monthly-reship-card small {
  color: #839196;
}

.monthly-reship-card.tone-pending {
  border-left-color: #d47a25;
  background: #fffaf0;
}

.monthly-reship-card.tone-reviewed {
  border-left-color: #16834a;
}

.monthly-reship-card.tone-neutral {
  border-left-color: #7a8494;
  background: #f8fafc;
}

.monthly-risk-row {
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
}

.monthly-risk-row.tone-critical {
  border-left-color: #c94b4b;
  background: #fff7f5;
}

.monthly-risk-row.tone-revision {
  border-left-color: #7756a6;
  background: #fbf8ff;
}

@media (max-width: 760px) {
  .monthly-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .monthly-section-heading p {
    max-width: 100%;
    text-align: left;
  }

  .monthly-primary-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-conclusion {
    align-items: flex-start;
    flex-direction: column;
  }

  .monthly-mini-grid,
  .monthly-report-two-col,
  .monthly-quality-people,
  .usage-columns {
    grid-template-columns: 1fr;
  }

  .monthly-quality-people > div {
    grid-template-columns: minmax(70px, 0.55fr) minmax(0, 1fr);
  }

  .monthly-quality-people em {
    grid-column: 2;
  }

  .monthly-risk-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .monthly-day-head,
  .monthly-day-row {
    grid-template-columns: 52px minmax(90px, 1fr) 42px 72px;
    gap: 6px;
  }

  .report-quantity-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-quantity-strip em {
    max-width: 100%;
    text-align: left;
  }

  .usage-additional {
    align-items: flex-start;
    flex-direction: column;
  }

  .usage-additional span {
    text-align: left;
  }
}

/* 最终视觉覆盖层：放在所有旧版细节之后，保证各页面使用同一套规则。 */
.topbar {
  min-height: 72px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #cfdedb;
  box-shadow: 0 6px 22px rgba(22, 56, 60, 0.08);
}

.topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #aecfc8;
  border-radius: 8px 8px 3px 8px;
  color: #fffdf8;
  background: #135e63;
  box-shadow: 4px 4px 0 #e8c995;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.brand-lockup h1 {
  margin: 0;
  color: #14363b;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.topbar h1::after {
  content: none;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: #718486 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.topbar .header-time {
  gap: 6px;
  min-height: 24px;
  margin-top: 0;
  padding-left: 13px;
  border-left: 1px solid #d8e3e0;
}

.topbar-actions {
  gap: 8px;
}

.topbar-actions button {
  min-height: 34px;
  border-radius: 7px;
  font-weight: 800;
}

.board,
.alert-panel,
.smart-workbench,
.studio-wall {
  border-color: #cfdedb;
  box-shadow: 0 8px 22px rgba(22, 56, 60, 0.055);
}

.smart-workbench-head > div > span,
.studio-eyebrow,
.redline-head > span {
  color: #8b6b2d;
  letter-spacing: 0.08em;
}

.smart-workbench-head > div > strong {
  color: #135e63;
}

.order-next-step {
  display: block;
  max-width: 190px;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #718486;
  font-size: 11px;
  line-height: 1.35;
}

tbody tr:hover .order-next-step {
  color: #135e63;
}

.ai-check-kicker {
  color: #8b6b2d !important;
}

.ai-check-panel {
  border-left-width: 4px;
}

.toast,
.toast-in-modal {
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 42, 46, 0.22);
  font-weight: 800;
}

dialog,
.drawer-panel {
  border-color: #c7d9d5;
}

dialog .dialog-actions {
  border-top: 1px solid #d8e3e0;
  background: rgba(255, 253, 248, 0.96);
}

.detail-tabs button.active {
  background: #135e63;
  box-shadow: 0 5px 12px rgba(19, 94, 99, 0.15);
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .topbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .topbar .header-time {
    padding-left: 0;
    border-left: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .brand-lockup h1 {
    font-size: 18px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .scan-action,
  .topbar-actions .report-action {
    display: none;
  }

  .topbar-actions .new-action {
    padding: 8px 9px;
    font-size: 12px;
  }

  .order-next-step {
    max-width: none;
  }

  /* 手机底部快捷栏固定在屏幕上，抽屉操作区必须留出安全高度。 */
  .drawer-content {
    padding-bottom: 92px !important;
  }

  .dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
  }
}

/* 最终层：任务元信息和详情当前一步必须压过旧版布局，保证真实加载后也不退回表面样式。 */
.smart-task-card {
  grid-template-areas:
    "top top"
    "title title"
    "order order"
    "hint hint"
    "meta meta"
    "signals signals"
    "cta cta" !important;
  min-height: 184px !important;
  padding: 14px 15px 12px !important;
  border: 1px solid #d7e4df !important;
  border-top: 3px solid #246b68 !important;
  border-radius: 8px !important;
  background: #fffefa !important;
  box-shadow: 0 8px 18px rgba(31, 72, 78, 0.07) !important;
  text-align: left;
}

.smart-task-card.is-primary {
  min-height: 202px !important;
  border-top-width: 5px !important;
  box-shadow: 0 12px 24px rgba(31, 72, 78, 0.11) !important;
}

.smart-task-card.tone-red { border-top-color: #c74343 !important; background: #fff7f5 !important; }
.smart-task-card.tone-amber { border-top-color: #c27820 !important; background: #fffaf0 !important; }
.smart-task-card.tone-violet { border-top-color: #7858ac !important; background: #fbf8ff !important; }
.smart-task-card.tone-teal { border-top-color: #197d75 !important; background: #f4fbf8 !important; }
.smart-task-card strong { color: #173b44; font-size: 16px; line-height: 1.3; }
.smart-task-card p { min-height: 32px; margin: 2px 0 0; color: #48646b; line-height: 1.45; }
.smart-task-meta {
  display: flex;
  grid-area: meta;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px dashed #d5e1dd;
  color: #60767b;
  font-size: 11px;
  line-height: 1.35;
}
.smart-task-meta span { min-width: 0; overflow-wrap: anywhere; }
.smart-task-cta {
  display: inline-flex;
  grid-area: cta;
  align-items: center;
  justify-self: start;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 8px;
  border: 1px solid #b8d7d1;
  border-radius: 999px;
  color: #0f7068;
  background: #eff9f5;
  font-size: 11px;
  font-weight: 900;
}
.smart-task-card:hover .smart-task-cta,
.smart-task-card:focus-visible .smart-task-cta { color: #fff; background: #135e63; border-color: #135e63; }
.smart-task-signals { grid-area: signals; min-height: 18px; }

.current-action-card {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px solid #c9e0da;
  border-left: 5px solid #197d75;
  border-radius: 8px;
  background: linear-gradient(135deg, #f1fbf7, #fffefa);
}
.current-action-card.is-critical { border-color: #edb8b2; border-left-color: #c74343; background: #fff6f4; }
.current-action-card.is-locked { border-color: #d6e0e3; border-left-color: #778990; background: #f7fafb; }
.current-action-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.current-action-head > div { display: grid; gap: 3px; min-width: 0; }
.current-action-head span { color: #8b6b2d; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.current-action-head strong { min-width: 0; color: #173b44; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.current-action-head em { max-width: 42%; padding: 4px 8px; border: 1px solid #b8d7d1; border-radius: 999px; color: #0f7068; background: #f4fffb; font-size: 11px; font-style: normal; font-weight: 900; overflow-wrap: anywhere; text-align: center; }
.current-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.current-action-grid > div { min-width: 0; padding: 8px 9px; border: 1px solid rgba(190,215,210,.85); border-radius: 6px; background: rgba(255,255,255,.75); }
.current-action-grid span, .current-action-grid b { display: block; overflow-wrap: anywhere; }
.current-action-grid span { margin-bottom: 3px; color: #668087; font-size: 10px; }
.current-action-grid b { color: #214c54; font-size: 12px; line-height: 1.35; }
.current-action-card p { margin: 0; color: #5e7479; font-size: 11px; line-height: 1.45; }

.studio-swatch em, .redline-note em, .receipt-line em, .station-tag em {
  display: block;
  color: currentColor;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  opacity: .86;
}
.studio-swatch em { align-self: end; margin-top: 7px; padding-top: 6px; border-top: 1px dashed currentColor; }
.redline-note { grid-template-areas: "label value" "hint value" "cta value"; }
.redline-note em { grid-area: cta; margin-top: 4px; }
.receipt-line, .station-tag { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; }
.receipt-line em, .station-tag em { white-space: nowrap; }

@media (max-width: 720px) {
  .smart-task-card, .smart-task-card.is-primary { min-height: 0 !important; }
  .smart-task-card p { min-height: 0; }
  .current-action-grid { grid-template-columns: 1fr; }
  .current-action-head { flex-direction: column; }
  .current-action-head em { max-width: 100%; }
  .receipt-line, .station-tag { grid-template-columns: minmax(0, 1fr) auto; }
  .receipt-line em, .station-tag em { grid-column: 1 / -1; justify-self: start; }
}

/* 换模板和改尺寸必须是两种记录模式：换模板不出现“修改后尺寸”输入框。 */
.revision-mode-fields { display: contents; }
.revision-mode-fields label { min-width: 0; }
#revisionTemplateFields label { color: #6f4b13; }
#revisionTemplateFields input:not([readonly]) { border-color: #d9b56c; background: #fffdf5; }
#revisionTemplateFields input:not([readonly]):focus { border-color: #b97a1d; box-shadow: 0 0 0 3px rgba(185, 122, 29, .13); }
.revision-template-highlight { grid-template-columns: minmax(0, 1fr) auto; }
.revision-template-highlight small { grid-column: 1; color: #7d6b52; font-size: 11px; }

@media (max-width: 720px) {
  .revision-mode-fields { display: contents; }
}

/* 首页信息语义层：单位、提醒去重说明和顶部操作必须清楚可读。 */
.studio-swatch strong i,
.redline-note strong i,
.receipt-line strong i,
.station-tag strong i {
  margin-left: 3px;
  color: currentColor;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.receipt-line strong i,
.station-tag strong i { font-size: 10px; }
.smart-workbench-head small { max-width: 62%; color: #5a6f73; line-height: 1.45; overflow-wrap: anywhere; }
.alert-merged-note {
  margin: 8px 10px;
  padding: 9px 10px;
  color: #557071;
  border: 1px dashed #b6d0c9;
  border-radius: 7px;
  background: #f1f8f5;
  font-size: 11px;
  line-height: 1.45;
}
.topbar-actions .user-badge {
  color: #dff4ed !important;
  background: rgba(255,255,255,.13) !important;
  border-color: rgba(223,244,237,.56) !important;
  font-weight: 800;
}
.topbar-actions button.ghost {
  color: #fff4dc !important;
  background: rgba(255,255,255,.1) !important;
  border-color: rgba(255,244,220,.55) !important;
  font-weight: 800;
}
.topbar-actions .report-action { color: #d7f5ec !important; border-color: #79c7b1 !important; }
.board-head input,
.board-head select,
.board-head button {
  color: #204e54;
  border-color: #b9d4ce;
}
.board-head input::placeholder { color: #6d8588; opacity: 1; }

@media (max-width: 720px) {
  .smart-workbench-head small { max-width: 100%; }
}

/* 顶部操作区必须在浅色或深色顶栏上都保持可读。 */
.topbar-actions {
  gap: 8px;
}
.topbar-actions .user-badge,
.topbar-actions button.ghost,
.topbar-actions .report-action,
.topbar-actions .scan-action,
.topbar-actions .new-action {
  min-height: 38px;
  padding: 8px 13px;
  border-width: 1px;
  border-style: solid;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: none;
  white-space: nowrap;
}
.topbar-actions .user-badge {
  color: #145a59 !important;
  background: #e2f2ed !important;
  border-color: #9bcfc0 !important;
}
.topbar-actions .scan-action {
  color: #7b4d0b !important;
  background: #fff1cc !important;
  border-color: #e1b45a !important;
}
.topbar-actions .report-action {
  color: #0b6563 !important;
  background: #e1f5ef !important;
  border-color: #79c7b1 !important;
}
.topbar-actions .new-action {
  color: #fffdf8 !important;
  background: #135e63 !important;
  border-color: #0b4a4e !important;
  box-shadow: 0 3px 0 #0a3f42 !important;
}
.topbar-actions .user-badge:hover,
.topbar-actions .user-badge:focus-visible,
.topbar-actions button.ghost:hover,
.topbar-actions button.ghost:focus-visible,
.topbar-actions .report-action:hover,
.topbar-actions .report-action:focus-visible,
.topbar-actions .scan-action:hover,
.topbar-actions .scan-action:focus-visible {
  filter: brightness(.96) saturate(1.08);
}

@media (max-width: 720px) {
  .topbar-actions { gap: 5px; }
  .topbar-actions .user-badge,
  .topbar-actions button.ghost,
  .topbar-actions .report-action,
  .topbar-actions .scan-action,
  .topbar-actions .new-action {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }
}

/* 品牌字标：用书法字形承载“兰”，保持小尺寸下的识别度。 */
.brand-mark {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 48px;
  height: 48px;
  border: 1px solid #9cc8c0;
  border-radius: 10px 10px 4px 10px;
  background: #135e63;
  box-shadow: 4px 4px 0 #e8c995, inset 0 0 0 2px rgba(255, 253, 248, .08);
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 0;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #e8c995;
  transform: rotate(-8deg);
  opacity: .92;
}
.brand-mark-glyph {
  display: none;
}

.brand-mark::after {
  display: none;
}

.brand-mark-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  overflow: visible;
}

.brand-mark-icon .mark-stroke {
  fill: none;
  stroke: #fff9e8;
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark-icon .mark-accent {
  fill: none;
  stroke: #e8c995;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.brand-mark-icon .mark-dot {
  fill: #e8c995;
}

@media (max-width: 720px) {
  .brand-mark {
    width: 43px;
    height: 43px;
  }
  .brand-mark-icon {
    width: 36px;
    height: 36px;
  }
}

/* 顶部两个功能按钮使用独立高优先级规则，避免旧主题把字压成浅色。 */
.topbar-actions #scanBtn,
.topbar-actions #reportBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 8px;
  opacity: 1 !important;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: none;
  white-space: nowrap;
}
.topbar-actions #scanBtn {
  color: #704406 !important;
  background: #ffedbd !important;
  border-color: #d69b31 !important;
  -webkit-text-fill-color: #704406 !important;
}
.topbar-actions #reportBtn {
  color: #075f5d !important;
  background: #d9f2e9 !important;
  border-color: #56ae9b !important;
  -webkit-text-fill-color: #075f5d !important;
}
.topbar-actions #scanBtn:hover,
.topbar-actions #scanBtn:focus-visible,
.topbar-actions #reportBtn:hover,
.topbar-actions #reportBtn:focus-visible {
  filter: brightness(.95) saturate(1.1);
}

@media (max-width: 720px) {
  .topbar-actions #scanBtn,
  .topbar-actions #reportBtn {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }
}

/* 待确认入口必须在浅色顶栏上保持高对比，不能被旧 ghost 主题覆盖。 */
.topbar-actions #inboundDraftBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  color: #704406 !important;
  background: #fff1cc !important;
  border: 1px solid #d69b31 !important;
  border-radius: 8px;
  box-shadow: 0 3px 0 #b9791d;
  -webkit-text-fill-color: #704406 !important;
}

.topbar-actions #inboundDraftBtn b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fffdf8 !important;
  background: #bd6b1e !important;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
  -webkit-text-fill-color: #fffdf8 !important;
}

.topbar-actions #inboundDraftBtn.has-drafts {
  color: #7a2d27 !important;
  background: #fff0ec !important;
  border-color: #cf5b4f !important;
  box-shadow: 0 3px 0 #a83c36;
  -webkit-text-fill-color: #7a2d27 !important;
}

.topbar-actions #inboundDraftBtn.has-drafts b {
  background: #c64738 !important;
}

.topbar-actions #inboundDraftBtn:hover,
.topbar-actions #inboundDraftBtn:focus-visible {
  filter: brightness(.96) saturate(1.08);
}

@media (max-width: 720px) {
  .topbar-actions #inboundDraftBtn {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }
}

/* 待确认弹窗在视口内固定，内容区独立滚动，底部动作始终可操作。 */
#inboundDraftDialog {
  height: min(760px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
}

#inboundDraftDialog > .inbound-draft-box {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#inboundDraftDialog .inbound-draft-layout {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#inboundDraftDialog .inbound-draft-list,
#inboundDraftDialog .inbound-draft-detail {
  min-height: 0;
  overscroll-behavior: contain;
}

@media (max-width: 720px) {
  #inboundDraftDialog {
    width: calc(100vw - 14px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  #inboundDraftDialog > .inbound-draft-box {
    padding: 12px;
  }

  #inboundDraftDialog .inbound-draft-layout {
    height: 100%;
  }

  #inboundDraftDialog .inbound-draft-list {
    max-height: 170px;
  }
}

/* 书法字要先看得出“兰”，再保留笔势；避免过度变形导致缩小后失认。 */
.brand-mark-glyph {
  color: #fffdf0;
  font-family: "KaiTi", "STKaiti", "FZKai-Z03", "Microsoft YaHei", sans-serif;
  font-size: 43px;
  font-weight: 700;
  line-height: .92;
  letter-spacing: 0;
  transform: translateY(-1px);
  -webkit-text-stroke: 0;
  text-shadow: 1px 1px 0 rgba(7, 57, 60, .36);
}
@media (max-width: 720px) {
  .brand-mark-glyph { font-size: 39px; }
}

/* Interaction contract: dialogs scroll inside their body, while validation
   messages always stay above the modal and remain readable on narrow screens. */
dialog {
  overflow: visible;
  max-height: calc(100vh - 24px);
}

dialog > form,
dialog > .report-box,
dialog > .report-order-box,
dialog > .preview-box {
  max-height: calc(100vh - 34px);
  overflow: auto;
  overscroll-behavior: contain;
}

.toast,
.toast-in-modal {
  z-index: 10000 !important;
  width: min(620px, calc(100vw - 32px));
  max-width: min(620px, calc(100vw - 32px));
  box-sizing: border-box;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
}

.toast {
  right: 16px;
  bottom: 16px;
  max-height: min(30vh, 220px);
  overflow: auto;
}

.toast-in-modal {
  position: fixed !important;
  top: max(16px, 5vh) !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  max-height: min(30vh, 220px);
  overflow: auto;
  transform: translateX(-50%) !important;
}

.wecom-login-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  margin-top: 10px;
  color: #0b625f;
  border: 1px solid #65b9ad;
  border-radius: 8px;
  background: #e6f6f0;
  font-weight: 800;
  text-decoration: none;
}

.wecom-login-button:hover,
.wecom-login-button:focus-visible {
  background: #d1eee5;
}

@media (max-width: 720px) {
  dialog {
    width: calc(100vw - 18px) !important;
    max-height: calc(100vh - 14px);
  }

  dialog > form,
  dialog > .report-box,
  dialog > .report-order-box,
  dialog > .preview-box {
    max-height: calc(100vh - 24px);
  }

  .toast,
  .toast-in-modal {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

/* A single urgent task should use the whole workbench instead of leaving an empty column. */
.smart-task-grid.has-single-task {
  grid-template-columns: minmax(0, 1fr);
}

.smart-task-grid.has-single-task .smart-task-primary {
  max-width: 760px;
}

/* One quiet summary replaces the two verbose intelligence panels in an order
   drawer. Details remain available without competing with the work itself. */
.smart-summary-card {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid #d3e4df;
  border-left: 4px solid #2d8177;
  border-radius: 8px;
  background: #f7fcfa;
}

.smart-summary-card.review { border-color: #e9d49f; border-left-color: #bd781b; background: #fffaf0; }
.smart-summary-card.blocked { border-color: #e9b7b1; border-left-color: #c74d47; background: #fff5f3; }
.smart-summary-card.archived { border-color: #d4dfe1; border-left-color: #7e9297; background: #f7fafb; }

.smart-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.smart-summary-head > div { display: grid; gap: 2px; min-width: 0; }
.smart-summary-head span { color: #8b6b2d; font-size: 11px; font-weight: 800; }
.smart-summary-head strong { color: #174f54; font-size: 16px; line-height: 1.25; }
.smart-summary-head em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #b9d8d2;
  border-radius: 999px;
  color: #246b68;
  background: #effaf6;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.smart-summary-next {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: #173b44;
  font-size: 12px;
}

.smart-summary-next b { color: #8b6b2d; font-size: 11px; white-space: nowrap; }
.smart-summary-next span { overflow-wrap: anywhere; font-weight: 700; }

.smart-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px dashed #cbded9;
  color: #60777b;
  font-size: 11px;
}

.smart-summary-line span:last-child { color: #6f5b2c; font-weight: 700; }
.smart-summary-details { color: #60777b; font-size: 11px; }
.smart-summary-details summary { cursor: pointer; color: #246b68; font-weight: 800; }
.smart-summary-details p { margin: 6px 0 0; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .smart-summary-head { display: grid; }
  .smart-summary-head em { width: fit-content; }
  .smart-summary-line { display: grid; gap: 4px; }
}

/* Keep the workflow header useful without making every explanation compete for
   attention. Detailed reasoning belongs in the smart summary or its tabs. */
.workflow-card > .permission-banner.admin-view {
  margin-bottom: 8px;
  padding: 7px 10px;
  border-left-width: 3px;
  box-shadow: none;
}

.workflow-card > .permission-banner.admin-view span { font-size: 11px; }
.workflow-card .current-action-card { gap: 8px; margin: 10px 0; padding: 11px 12px; }
.workflow-card .revision-entry { gap: 10px; margin-top: 10px; padding: 10px; }
.workflow-card .revision-entry p { font-size: 11px; }

.order-summary-card {
  padding: 12px 14px;
  border-left-color: #3f7fa1;
  background: #fbfdfd;
}

.summary-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfe9e7;
}

.summary-card-head h3 { margin: 0; }
.summary-card-head span { color: #718486; font-size: 11px; }
.summary-group { margin-top: 13px; }
.summary-group-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #1b5c64;
  font-size: 12px;
  font-weight: 900;
}
.summary-group-label::before {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: #2c8581;
  content: "";
}

.summary-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.summary-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f1;
}

.summary-field.wide { grid-column: 1 / -1; }
.summary-field > span { color: #5e777d; font-size: 12px; font-weight: 700; white-space: nowrap; }
.summary-field > strong { color: #173f48; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.summary-field.is-empty > strong { color: #93a4a6; font-weight: 600; }
.summary-field > strong { min-width: 0; overflow-wrap: anywhere; color: #214c54; font-size: 12px; line-height: 1.4; }
.summary-field.is-empty > strong { color: #9aa9aa; font-weight: 600; }
.summary-field.is-pending > strong { color: #a36b1f; }
.summary-field.is-collected > strong { color: #258063; }
.summary-cod-action { margin-left: 6px; padding: 2px 6px; font-size: 10px; }
.summary-note { margin-top: 7px; }
.summary-note .detail-field { padding: 5px 0 0; border: 0; background: transparent; }

@media (max-width: 520px) {
  .summary-card-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .order-summary-grid { grid-template-columns: 1fr; gap: 0; }
  .summary-field.wide { grid-column: auto; }
}

/* Attachment actions stay calm: purpose, add, upload. They never squeeze into a
   narrow row on a phone-sized drawer. */
.attachment-upload-bar {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(112px, 148px);
  align-items: end;
  gap: 10px;
}

.attachment-kind-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.attachment-kind-field > span {
  color: #607177;
  font-size: 11px;
  font-weight: 800;
}

.attachment-kind-field select,
.attachment-upload-bar .attachment-pick,
.attachment-upload-bar > button {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.attachment-upload-bar .attachment-pick {
  min-height: 40px;
}

.attachment-upload-bar > button {
  min-height: 40px;
}

@media (max-width: 900px) {
  .attachment-upload-bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .attachment-upload-bar > button {
    grid-column: auto;
  }
}

/* The design tab is a working checklist: one row per artwork, details only when they matter. */
.design-simple-panel {
  padding: 14px;
  background: #f8fbfc;
}

.design-simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.design-simple-header > div {
  display: grid;
  gap: 2px;
}

.design-simple-header span {
  color: #648087;
  font-size: 11px;
  font-weight: 800;
}

.design-simple-header h3 {
  margin: 0;
  color: #173b44;
  font-size: 18px;
}

.design-simple-header > strong {
  padding: 5px 9px;
  border: 1px solid #b8ded8;
  border-radius: 999px;
  color: #0f7068;
  background: #e8f8f4;
  font-size: 12px;
  white-space: nowrap;
}

.design-simple-list {
  display: grid;
  gap: 6px;
}

.design-simple-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px 10px 8px;
  border: 1px solid #d5e2e2;
  border-left: 3px solid #7aa8ae;
  border-radius: 7px;
  background: #fff;
}

.design-simple-row.is-add-on {
  border-color: #e8c477;
  border-left-color: #d98218;
  background: #fffaf0;
}

.design-simple-row.has-size-change {
  border-left-color: #d98218;
  background: #fffaf0;
}

.design-simple-row.has-template-change {
  border-left-color: #7651a8;
  background: #fbf8ff;
}

.design-simple-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #1b6d70;
  font-size: 11px;
  font-weight: 900;
}

.design-simple-main {
  min-width: 0;
}

.design-simple-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.design-simple-title strong {
  color: #173b44;
  font-size: 14px;
}

.design-simple-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 5px;
  color: #324f57;
  font-size: 12px;
}

.design-simple-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.design-simple-meta b {
  margin-right: 4px;
  color: #789095;
  font-size: 11px;
  font-weight: 800;
}

.design-simple-note {
  max-width: 100%;
  margin: 6px 0 0;
  overflow: hidden;
  color: #61777d;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.design-flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.design-flag.add {
  color: #9a5a0b;
  background: #fff0c9;
}

.design-flag.size {
  color: #9a5a0b;
  background: #fff5df;
}

.design-flag.template {
  color: #7651a8;
  background: #f1eaff;
}

.design-simple-change {
  margin-top: 6px;
}

.design-simple-change .design-item-row {
  padding: 6px 8px;
  border: 1px solid #e3bd72;
  border-radius: 6px;
  background: #fff7e6;
}

.design-simple-change .design-item-row b {
  color: #9a5a0b;
  font-size: 11px;
}

.design-simple-change .size-change-values,
.design-simple-change .template-change-values {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin-top: 3px;
}

.design-simple-change .size-change-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.design-simple-change .size-change-value span {
  color: #92745a;
  font-size: 11px;
}

.design-simple-change .size-change-value strong,
.design-simple-change .template-change-values strong {
  color: #733f0d;
  font-size: 12px;
}

.design-simple-change .size-change-arrow {
  color: #bd751b;
  font-weight: 900;
}

.design-simple-change .template-change-row {
  border-color: #cbb7e6;
  background: #f8f3ff;
}

.design-simple-change .template-change-row b,
.design-simple-change .template-change-values strong {
  color: #7651a8;
}

.design-empty {
  padding: 14px;
  border: 1px dashed #b8cece;
  border-radius: 7px;
  color: #6c8388;
  background: #fff;
  font-size: 12px;
}

.production-check-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #c8dfd9;
  border-left: 3px solid #b97822;
  border-radius: 7px;
  background: #fffaf0;
}

.production-check-line.is-pending {
  border-color: #e5c17c;
  background: #fff7e6;
}

.production-check-title {
  display: grid;
  gap: 2px;
  min-width: 92px;
}

.production-check-title span {
  color: #8b6b2d;
  font-size: 11px;
  font-weight: 800;
}

.production-check-title strong {
  color: #6d4b16;
  font-size: 13px;
}

.production-check-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  min-width: 0;
  color: #6e7e80;
  font-size: 12px;
}

.production-check-facts span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.production-check-facts b {
  color: #324f57;
  font-weight: 800;
}

@media (max-width: 720px) {
  .design-simple-header h3 { font-size: 16px; }
  .production-check-line {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .production-check-facts { gap: 4px 10px; }
}

/*
 * 弹窗统一规范：所有业务弹窗都在视口内完成操作，标题和底部动作不
 * 随内容丢失，长内容只在弹窗内部滚动。具体弹窗的颜色和业务布局仍
 * 由各自规则负责。
 */
dialog:not(.feedback-dialog) {
  box-sizing: border-box;
  width: min(920px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog:not(.feedback-dialog) > form,
dialog:not(.feedback-dialog) > .report-box,
dialog:not(.feedback-dialog) > .report-order-box,
dialog:not(.feedback-dialog) > .preview-box,
dialog:not(.feedback-dialog) > .confirm-box {
  box-sizing: border-box;
  min-height: 0;
  max-height: calc(100vh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

dialog:not(.feedback-dialog) > form > .dialog-head,
dialog:not(.feedback-dialog) > .report-box > .dialog-head,
dialog:not(.feedback-dialog) > .report-order-box > .dialog-head,
dialog:not(.feedback-dialog) > .preview-box > .dialog-head,
dialog:not(.feedback-dialog) > .confirm-box > .dialog-head {
  position: sticky;
  top: 0;
  z-index: 20;
  min-width: 0;
  background: linear-gradient(135deg, rgba(255,253,248,.98), rgba(239,250,247,.98));
}

dialog:not(.feedback-dialog) > form > .dialog-actions,
dialog:not(.feedback-dialog) > .report-box > .dialog-actions,
dialog:not(.feedback-dialog) > .report-order-box > .dialog-actions,
dialog:not(.feedback-dialog) > .confirm-box > .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  min-width: 0;
  flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(255,253,248,.82), #fffdf8 38%);
  border-top: 1px solid #d8e3e0;
  box-shadow: 0 -10px 22px rgba(24, 51, 59, .08);
}

dialog:not(.feedback-dialog) .dialog-head h2,
dialog:not(.feedback-dialog) .dialog-head h3,
dialog:not(.feedback-dialog) label,
dialog:not(.feedback-dialog) fieldset,
dialog:not(.feedback-dialog) .form-hint,
dialog:not(.feedback-dialog) .dialog-actions {
  min-width: 0;
  overflow-wrap: anywhere;
}

dialog:not(.feedback-dialog) fieldset {
  min-inline-size: 0;
}

dialog:not(.feedback-dialog) input,
dialog:not(.feedback-dialog) select,
dialog:not(.feedback-dialog) textarea,
dialog:not(.feedback-dialog) button {
  max-width: 100%;
  box-sizing: border-box;
}

/* 转发确认弹窗使用双栏内部滚动，不能被通用规则改成整块滚动。 */
#inboundDraftDialog {
  overflow: hidden;
}

#inboundDraftDialog > .inbound-draft-box {
  max-height: none;
  overflow: hidden;
}

@media (max-width: 720px) {
  dialog:not(.feedback-dialog) {
    width: calc(100vw - 14px);
    max-width: calc(100vw - 14px);
    max-height: calc(100vh - 14px);
  }

  dialog:not(.feedback-dialog) > form,
  dialog:not(.feedback-dialog) > .report-box,
  dialog:not(.feedback-dialog) > .report-order-box,
  dialog:not(.feedback-dialog) > .preview-box,
  dialog:not(.feedback-dialog) > .confirm-box {
    max-height: calc(100vh - 14px);
  }

  dialog:not(.feedback-dialog) > form > .dialog-head,
  dialog:not(.feedback-dialog) > .report-box > .dialog-head,
  dialog:not(.feedback-dialog) > .report-order-box > .dialog-head,
  dialog:not(.feedback-dialog) > .preview-box > .dialog-head,
  dialog:not(.feedback-dialog) > .confirm-box > .dialog-head {
    gap: 8px;
  }

  dialog:not(.feedback-dialog) .dialog-head h2 {
    font-size: 17px;
    line-height: 1.25;
  }

  dialog:not(.feedback-dialog) > form > .dialog-actions,
  dialog:not(.feedback-dialog) > .report-box > .dialog-actions,
  dialog:not(.feedback-dialog) > .report-order-box > .dialog-actions,
  dialog:not(.feedback-dialog) > .confirm-box > .dialog-actions {
    gap: 8px;
    padding: 10px 12px 12px;
  }

  dialog:not(.feedback-dialog) .dialog-actions button {
    flex: 1 1 120px;
    min-width: 0;
  }
}

/* 短确认弹窗不使用业务大弹窗的横向宽度，避免少量文字被拉成横幅。 */
dialog.confirm-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 28px));
  max-width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  min-width: 0;
}

dialog.confirm-dialog > .confirm-box {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 20px 22px 18px;
}

dialog.confirm-dialog > .confirm-box > .dialog-head {
  min-height: 0;
  padding-bottom: 10px;
}

dialog.confirm-dialog > .confirm-box > .dialog-actions {
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 520px) {
  dialog.confirm-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
}
/* Mobile order board: show a compact work summary; full data remains in the order drawer. */
@media (max-width: 760px) {
  .table-wrap {
    padding: 6px;
  }

  tbody {
    gap: 6px;
  }

  tbody tr[data-order-id] {
    border-radius: 10px;
  }

  tbody td.order-cell {
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  tbody td.order-cell::before {
    margin-bottom: 2px;
    font-size: 9px;
    line-height: 1.2;
  }

  tbody td.order-cell-order {
    padding-top: 9px;
    padding-bottom: 7px;
  }

  tbody td.order-cell-customer,
  tbody td.order-cell-content {
    grid-column: 1 / -1;
  }

  tbody td.order-cell-customer .customer-meta + .customer-meta {
    display: none;
  }

  tbody td.order-cell-content .content-text,
  tbody td.order-cell-content .system-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  tbody td.order-cell-owner .system-text {
    display: none;
  }

  tbody td.order-cell-status .order-next-step {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  tbody td.order-cell-revision {
    text-align: right;
  }

  tbody td.order-cell-delivery,
  tbody td.order-cell-money,
  tbody td.order-cell-updated {
    display: none;
  }
}

/* 手机端只保留能帮助快速判断的四件事：客户、联系方式、异常、下一步。 */
.order-cell-mobile-summary {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 10px 8px calc(92px + env(safe-area-inset-bottom));
  }

  .board,
  .board-head,
  .board-head > div,
  .table-wrap,
  .alert-panel {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .board-head {
    display: block;
    padding: 12px;
  }

  .board-head h2,
  .board-head p {
    overflow-wrap: anywhere;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
  }

  .filters > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
  }

  .filters > input,
  .filters > #responsibilityTabs,
  .filters > #monthReportBtn {
    grid-column: 1 / -1;
  }

  .filters > #responsibilityTabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters > #responsibilityTabs button {
    min-width: 0;
    padding: 7px 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-wrap {
    padding: 6px;
    overflow: visible;
  }

  tbody tr[data-order-id] {
    display: block;
    min-width: 0;
    overflow: hidden;
    border-radius: 10px;
  }

  tbody tr[data-order-id] > td.order-cell-mobile-summary {
    display: block !important;
    width: 100%;
    min-width: 0;
    padding: 11px 12px !important;
    border: 0 !important;
    background: transparent !important;
  }

  tbody tr[data-order-id] > td.order-cell:not(.order-cell-mobile-summary) {
    display: none !important;
  }

  .mobile-order-summary {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  .mobile-order-mainline,
  .mobile-order-progress {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
  }

  .mobile-order-mainline strong,
  .mobile-order-contact,
  .mobile-order-next {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-order-mainline strong {
    color: var(--ink);
    font-size: 15px;
  }

  .mobile-order-contact {
    color: var(--muted);
    font-size: 12px;
  }

  .mobile-order-progress {
    flex-wrap: wrap;
  }

  .mobile-order-progress .badge {
    flex: 0 0 auto;
  }

  .mobile-order-next {
    min-width: 0;
    flex: 1 1 120px;
    color: var(--muted);
    font-size: 11px;
  }

  .mobile-order-attention {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    color: #a53c32;
    background: #fff0ed;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-dock {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
  }

  .mobile-dock button.active {
    color: #135e63;
    background: #eef8f4;
  }

  .board,
  .alert-panel,
  .summary-grid {
    scroll-margin-top: 12px;
  }
}

/* Workbench action hierarchy: identity first, tasks second, one clear create action. */
.account-cluster {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.account-caption {
  color: #6b7f80;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.account-cluster .user-badge {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.header-task-strip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  background: #f5f9f7;
  border: 1px solid #d8e8e3;
  border-radius: 11px;
}

.header-task-strip button {
  min-height: 30px !important;
  padding: 5px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.header-task-strip #inboundDraftBtn:not(.has-drafts) {
  color: #245f5d !important;
  background: transparent !important;
}

.header-task-strip #scanBtn {
  color: #76521b !important;
  background: #fff4d8 !important;
  border: 1px solid #efd292 !important;
}

.top-report-action {
  display: inline-flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 720px) {
  /* 手机上由底部“月报”入口承载报表，顶部只保留轻量操作。 */
  .topbar-actions .top-report-action {
    display: none !important;
  }
}

.drawer-content {
  overflow-anchor: none;
}

.topbar-actions .new-action {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 900;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 78px;
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    flex-wrap: nowrap;
  }

  .topbar > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar .brand-lockup {
    gap: 7px;
  }

  .topbar .brand-mark {
    width: 34px;
    height: 34px;
  }

  .topbar h1 {
    font-size: 16px;
  }

  .topbar .brand-subtitle {
    font-size: 9px;
  }

  .topbar .header-time {
    display: none;
  }

  .topbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .account-caption,
  .topbar-actions .new-action {
    display: none !important;
  }

  .account-cluster .user-badge {
    max-width: 128px;
    min-height: 29px;
    padding: 5px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
  }

  .header-task-strip {
    gap: 2px;
    padding: 2px;
    border-radius: 9px;
  }

  .header-task-strip button {
    min-height: 29px !important;
    padding: 5px 7px !important;
    font-size: 10px;
  }

  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    min-height: 58px;
    padding: 5px 6px;
    border-radius: 16px;
  }

  .mobile-dock button {
    min-width: 0;
    min-height: 48px;
    padding: 4px 2px;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .mobile-dock button span {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .mobile-dock button.mobile-dock-primary {
    position: relative;
    z-index: 1;
    min-height: 58px;
    margin: -13px 2px 0;
    color: #fffdf8;
    background: #135e63;
    border: 3px solid #f4fbf7;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(19, 94, 99, 0.24);
    font-size: 10px;
    font-weight: 900;
  }

  .mobile-dock button.mobile-dock-primary span {
    color: #fff4d8;
    font-size: 18px;
    font-weight: 700;
  }

  .mobile-dock button.mobile-dock-primary.active,
  .mobile-dock button.mobile-dock-primary:hover,
  .mobile-dock button.mobile-dock-primary:focus-visible {
    color: #fffdf8;
    background: #0e4f54;
  }
}

/* Mobile workbench: four stable destinations plus one separate create action. */
.mobile-new-order-fab {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 6px;
    padding: 9px 10px 8px;
  }

  .topbar > div:first-child,
  .topbar-actions {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  .topbar-actions .header-task-strip,
  .topbar-actions .top-report-action,
  .topbar-actions .new-action,
  .topbar-actions #reportBtn {
    display: none !important;
  }

  .account-cluster {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 0;
  }

  .account-caption {
    display: inline !important;
    flex: 0 0 auto;
    font-size: 10px;
  }

  .account-cluster .user-badge {
    max-width: none;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 60px;
    padding: 5px 7px;
  }

  .mobile-dock button {
    min-height: 48px;
    font-size: 11px;
    font-weight: 800;
  }

  .mobile-dock button span {
    width: 20px;
    height: 20px;
  }

  .mobile-dock-badge {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 2px;
    border-radius: 999px;
    color: #fffdf8;
    background: #c94b43;
    font-size: 9px;
    line-height: 1;
    vertical-align: middle;
  }

  .mobile-new-order-fab {
    position: fixed;
    right: max(14px, calc(env(safe-area-inset-right) + 14px));
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 90;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 3px solid #fffdf8;
    border-radius: 50%;
    color: #fffdf8;
    background: #135e63;
    box-shadow: 0 8px 20px rgba(19, 94, 99, 0.28);
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
  }

  .mobile-new-order-fab:active,
  .mobile-new-order-fab:focus-visible {
    background: #0e4f54;
    transform: translateY(1px);
  }

  .layout {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* Mobile create action: lift the primary action into the center of the dock. */
@media (max-width: 760px) {
  .mobile-dock {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 62px;
    padding: 5px 7px;
  }

  .mobile-dock button.mobile-dock-primary {
    position: relative;
    z-index: 2;
    display: grid;
    align-self: start;
    justify-items: center;
    min-width: 0;
    min-height: 72px;
    margin: -19px 1px 0;
    padding: 7px 2px 5px;
    border: 4px solid #fffdf8;
    border-radius: 50%;
    color: #fffdf8;
    background: #135e63;
    box-shadow: 0 8px 20px rgba(19, 94, 99, 0.28);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.05;
  }

  .mobile-dock button.mobile-dock-primary span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    margin-bottom: 2px;
    border: 1.5px solid rgba(255, 253, 248, 0.92);
    border-radius: 7px;
    color: #fffdf8;
    font-size: 20px;
    line-height: 1;
  }

  .mobile-dock button.mobile-dock-primary.active,
  .mobile-dock button.mobile-dock-primary:hover,
  .mobile-dock button.mobile-dock-primary:focus-visible {
    color: #fffdf8;
    background: #0e4f54;
  }

  .mobile-dock button.mobile-dock-primary:active {
    transform: translateY(1px);
  }
}

/* Admin tools: compact, readable lists instead of another dense data table. */
.admin-dialog {
  width: min(820px, calc(100vw - 24px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #173e44;
  background: #fffdf8;
  box-shadow: 0 24px 70px rgba(14, 53, 60, 0.28);
}

.admin-dialog::backdrop {
  background: rgba(17, 52, 59, 0.55);
  backdrop-filter: blur(3px);
}

.admin-dialog-box {
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 22px;
}

.admin-dialog .dialog-head {
  margin-bottom: 8px;
}

.admin-dialog .dialog-kicker {
  display: block;
  margin-bottom: 3px;
  color: #a76620;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.admin-dialog .dialog-note {
  margin: 0 0 16px;
  color: #647b80;
  font-size: 13px;
  line-height: 1.65;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #d8e6e3;
  border-left: 4px solid #2d8a84;
  border-radius: 10px;
  background: #f7fbfa;
}

.recycle-row {
  border-left-color: #b8751a;
  background: #fffbf1;
}

.delivery-row {
  border-left-color: #4e71bc;
  background: #f7f9ff;
}

.admin-row-main {
  min-width: 0;
  flex: 1;
}

.admin-row-main > strong,
.admin-row-main > span,
.admin-row-main > small {
  display: block;
}

.admin-row-main > strong {
  color: #173e44;
  font-size: 15px;
}

.admin-row-main > span {
  margin-top: 3px;
  color: #41646a;
  font-size: 13px;
}

.admin-row-main > small {
  margin-top: 5px;
  color: #789096;
  font-size: 12px;
}

.admin-row-main p {
  margin: 7px 0 0;
  color: #687e83;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.admin-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-chip-success {
  color: #176f63;
  background: #e4f6ef;
}

.status-chip-warn {
  color: #9a6417;
  background: #fff0cf;
}

.status-chip-error {
  color: #a23939;
  background: #ffe3e1;
}

.delivery-error {
  color: #a23939 !important;
}

.admin-empty {
  padding: 34px 16px;
  border: 1px dashed #cbdcda;
  border-radius: 10px;
  color: #789096;
  text-align: center;
  background: #fbfdfc;
}

.admin-empty-error {
  color: #a23939;
  border-color: #e8b7b4;
  background: #fff4f2;
}

@media (max-width: 760px) {
  .admin-dialog {
    width: calc(100vw - 12px);
    margin: 6px;
    border-radius: 12px;
  }

  .admin-dialog-box {
    max-height: calc(100vh - 12px);
    padding: 15px;
  }

  .admin-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-row button {
    align-self: stretch;
  }
}
