/* BT-S5-PROTECTED-DATA-RECONFIRM-WORKFLOW-001
   S4 建立的 workspace 區塊樣式。沿用既有色系，不引入框架、不改設計系統。
   受保護內容與一般摘要有明確視覺區隔（左側色條 + 底色）。 */

.workspace-stage { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; }

/* ── Badge ─────────────────────────────────────────── */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; line-height: 1.8; white-space: nowrap;
  background: #eef2f1; color: #375; border: 1px solid #cfdcd8;
}
.badge[data-badge="待確認"] { background: #fdf0e6; color: #9a5b1e; border-color: #f0d2b4; }
.badge[data-badge="待補件"] { background: #fdecec; color: #9a2b2b; border-color: #f2c4c4; }
.badge[data-badge="可送件"] { background: #e9f6ee; color: #1e6b3a; border-color: #bfe3cd; }

/* ── Stage Card ────────────────────────────────────── */
.stage-card {
  border: 1px solid #dfe7e5; border-radius: 10px; padding: 12px 14px; background: #fbfdfc;
}
.stage-card--unavailable { background: #fdf6f6; border-color: #f0d4d4; color: #8a4b4b; }
.stage-card__phase { font-size: 14px; margin-bottom: 8px; color: #33504a; }
.stage-card__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.stage-card__title { font-size: 12px; color: #6b807b; min-width: 5.5em; }
.stage-chip {
  font-size: 12px; padding: 2px 8px; border-radius: 6px;
  background: #eef2f1; border: 1px solid #d6e0dd; color: #3c5a53;
}
.stage-card__group.is-editable .stage-chip { background: #e9f6ee; border-color: #bfe3cd; color: #1e6b3a; }
.stage-card__group.is-readonly .stage-chip { background: #f2f4f4; border-color: #dcdfdf; color: #6a7472; }
.stage-card__group.is-hidden   .stage-chip { background: #f7f7f8; border-color: #e3e4e6; color: #9aa0a2;
                                             text-decoration: line-through; }

/* ── Need Reconfirm ────────────────────────────────── */
.reconfirm--none { display: none; }
.reconfirm--pending { display: flex; flex-direction: column; gap: 10px; }
.reconfirm__item {
  border: 1px solid #f0d2b4; border-left: 4px solid #d98b3a; border-radius: 10px;
  padding: 12px 14px; background: #fffaf4;
}
.reconfirm__title { font-weight: 600; color: #8a5216; margin-bottom: 6px; }
.reconfirm__meta { font-size: 13px; color: #6b5a45; line-height: 1.9; }
/* 受保護內容：與摘要明顯區隔 */
.reconfirm__changes {
  margin: 8px 0 10px; padding: 8px 10px 8px 26px; list-style: disc;
  background: #fff; border: 1px dashed #e0c39c; border-radius: 8px;
  font-size: 13px; color: #4a3c2c; word-break: break-all;
}
.reconfirm__changes del { color: #9a2b2b; text-decoration: line-through; }
.reconfirm__changes ins { color: #1e6b3a; text-decoration: none; font-weight: 600; }
.reconfirm__confirm {
  align-self: flex-start; padding: 6px 16px; border-radius: 8px; cursor: pointer;
  background: #2f7d55; color: #fff; border: 1px solid #2a6f4c; font-size: 13px;
}
.reconfirm__confirm:disabled { background: #a9bdb2; border-color: #a9bdb2; cursor: default; }
.reconfirm__no-permission { font-size: 12px; color: #8a7a63; }

/* ── Timeline ──────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e2e8e6; }
.timeline[data-timeline="empty"] { display: none; }
.timeline__item {
  position: relative; padding: 4px 0 4px 14px; font-size: 13px; color: #4a5a56;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
}
.timeline__item::before {
  content: ""; position: absolute; left: -5px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; background: #b9c9c4;
}
.timeline__item[data-timeline-type="Need Reconfirm Created"]::before { background: #d98b3a; }
.timeline__item[data-timeline-type="Reconfirm Completed"]::before { background: #2f7d55; }
.timeline__type { font-weight: 600; }
.timeline__at { color: #7d8b87; font-size: 12px; }
.timeline__count { color: #7d8b87; font-size: 12px; }

/* ── 手機 ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .stage-card, .reconfirm__item { padding: 10px; }
  .stage-card__group { flex-direction: column; align-items: flex-start; gap: 4px; }
  .stage-card__title { min-width: 0; }
  .timeline__item { flex-direction: column; gap: 2px; }
  .reconfirm__changes { word-break: break-word; }
}
