/* 진행상태 구조 편집 창 (2026-11-19, 샘플 sample/status-move B안 확정) — 설정 › 상품진행상태관리 [진행상태 편집].
 * 마크업 = views/status_groups/_structure_modal · _structure_review_modal / 동작 = status_structure_controller.js(·_review).
 * 접두어 .ste-* · 색은 전부 var(--ord-*) (라이트/다크, 가드 TOKENIZED 등록). 회원이 정한 진행상태 색은 .ord-st-pill·.ord-uc-chip 변수로만.
 */
.ste { display: flex; flex-direction: column; min-height: 100%; background: var(--ord-surface-2); }
.ste [hidden] { display: none !important; }

/* 머리 — A-4 밴드 + 액센트 제목 */
.ste-hero { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: linear-gradient(180deg, var(--ord-band), var(--ord-surface)); border-bottom: 1px solid var(--ord-line); }
.ste-title { display: flex; align-items: baseline; gap: 10px; padding-left: 12px; border-left: 4px solid var(--ord-accent); }
.ste-title h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--ord-text); }
.ste-title span { font-size: 12px; color: var(--ord-text-3); }
.ste-hist { display: flex; gap: 4px; margin-left: auto; }
.ste-ib { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--ord-line); border-radius: 9px; background: var(--ord-surface); color: var(--ord-text-2); cursor: pointer; }
.ste-ib:hover:not([disabled]) { border-color: var(--ord-accent); color: var(--ord-accent-strong); }
.ste-ib[disabled] { opacity: .35; cursor: default; }
.ste-ib:focus-visible, .ste-lnk:focus-visible, .ste-par button:focus-visible, .ste-seg button:focus-visible { outline: 2px solid var(--ord-accent); outline-offset: 2px; }

.ste-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 14px; padding: 16px; align-items: start; }
.ste-card { background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; }
.ste-band { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; background: var(--ord-band); border-bottom: 1px solid var(--ord-line); border-radius: 12px 12px 0 0; }
.ste-band b { font-size: 12px; font-weight: 700; color: var(--ord-accent-strong); }
.ste-band .ste-hint { margin-left: auto; font-size: 11.5px; color: var(--ord-text-4); }
.ste-back { display: none; align-items: center; gap: 2px; margin-left: -6px; padding: 4px 6px; border: 0; background: none; color: var(--ord-accent-strong); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }

/* ───── 나무 ───── */
.ste-tree { position: relative; padding: 6px 8px 10px; outline: none; }
/* DB진행상태 편집 — 묶음(진행상태·공유용) 머리 (2026-11-19) */
.ste-sect { display: flex; align-items: center; gap: 6px; margin: 12px 4px 2px; font-size: 11.5px; font-weight: 700; color: var(--ord-text-3); }
.ste-sect:first-child { margin-top: 4px; }
.ste-sect span { padding: 0 7px; border-radius: 999px; background: var(--ord-surface-2); font-size: 11px; font-weight: 600; color: var(--ord-text-4); }
.ste-sect + .ste-node.is-root { border-top: 0; }
.ste-node.is-root + .ste-node.is-root { border-top: 1px solid var(--ord-line-soft); }
.ste-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 2px 0; padding: 0 12px 0 2px; border-radius: 10px; cursor: pointer; outline: none; user-select: none; }
.ste-row:hover { background: var(--ord-surface-2); }
.ste-row.is-sel { background: var(--ord-accent-soft); }
.ste-row.is-sel::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--ord-accent); }
.ste-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ord-accent); }
.ste-grip { flex: none; display: grid; place-items: center; width: 22px; height: 30px; border-radius: 6px; color: var(--ord-text-5); cursor: grab; touch-action: none; }
.ste-row:hover .ste-grip, .ste-row.is-sel .ste-grip { color: var(--ord-text-3); }
.ste-grip:active { cursor: grabbing; }
.ste-name { flex: none; min-width: 0; }
.ste-name .ord-st-pill { display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 700; vertical-align: middle; }
.ste-flags { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ste-flags .sg-flag, .ste-opt .sg-flag, .ste-rv .sg-flag { padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sg-flag.is-new { box-shadow: 0 0 0 1.5px var(--ord-tint-amber-fg); }
.sg-flag.is-gone { text-decoration: line-through; opacity: .5; }
.ste-mark { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ste-mark.is-chg { background: var(--ord-tint-amber-fg); }
.ste-mark.is-aff { border: 1.5px solid var(--ord-tint-amber-fg); }
.ste-n { flex: none; min-width: 46px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ord-text-2); font-variant-numeric: tabular-nums; }
.ste-n small { margin-left: 1px; font-size: 11px; font-weight: 500; color: var(--ord-text-4); }
.ste-chev { display: none; flex: none; color: var(--ord-text-5); }
.ste-tag { display: inline-flex; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: var(--ord-band); color: var(--ord-text-3); border: 1px solid var(--ord-line); }
.ste-row.is-off .ord-st-pill { opacity: .5; }
.ste-why-gap { margin: 8px 0 0; }
.ste[aria-busy="true"] .ste-insp { cursor: progress; }
.ste-kids { position: relative; margin-left: 22px; padding-left: 12px; }
.ste-kids::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 12px; width: 1px; background: var(--ord-line); }
.ste-origin { display: flex; align-items: center; gap: 8px; margin: -2px 0 6px 34px; font-size: 11.5px; color: var(--ord-text-4); }
.ste-lnk { padding: 0; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ord-accent-strong); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* 끌기 */
.ste-node.is-dragging .ste-row, .ste-node.is-dragging .ste-origin { opacity: .35; }
.ste-row.is-into { background: var(--ord-accent-soft); box-shadow: inset 0 0 0 2px var(--ord-accent); }
.ste-row.is-into.is-bad { background: var(--ord-tint-red-bg); box-shadow: inset 0 0 0 2px var(--ord-tint-red-fg); }
.ste-drop { position: absolute; height: 2px; border-radius: 2px; background: var(--ord-accent); pointer-events: none; z-index: 2; }
.ste-drop::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; box-sizing: border-box; border: 2px solid var(--ord-accent); border-radius: 50%; background: var(--ord-surface); }
.ste-drop.is-bad { background: var(--ord-tint-red-fg); }
.ste-drop.is-bad::before { border-color: var(--ord-tint-red-fg); }
.ste-ghost { position: fixed; z-index: 12001; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--ord-line-2); border-radius: 10px; background: var(--ord-surface); box-shadow: var(--ord-shadow); pointer-events: none; }
.ste-ghost .ord-st-pill { font-size: 12.5px; font-weight: 700; }
.ste-ghost em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ord-tint-red-fg); }
.ste-ghost em:empty { display: none; }

/* ───── 고른 진행상태 ───── */
.ste-insp { position: sticky; top: 16px; }
.ste-ihd { padding: 14px 16px 12px; }
.ste-ihd-top { display: flex; align-items: center; gap: 10px; }
.ste-ihd .ord-st-pill { font-size: 13.5px; font-weight: 700; padding: 4px 12px; }
.ste-ihd-n { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ord-text); font-variant-numeric: tabular-nums; }
.ste-ihd-n small { font-size: 11.5px; font-weight: 500; color: var(--ord-text-4); }
.ste-path { margin: 6px 0 0; font-size: 12px; color: var(--ord-text-3); }
.ste-path s { color: var(--ord-text-4); }
.ste-sec { padding: 14px 16px; border-top: 1px solid var(--ord-line-soft); }
.ste-h { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding-bottom: 3px; border-bottom: 3px solid var(--ord-accent); font-size: 12px; font-weight: 800; color: var(--ord-text-2); }
.ste-h .ste-lnk { margin-left: 8px; font-weight: 600; }
.ste-sec-h { display: flex; align-items: center; justify-content: space-between; }
.ste-fld { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 10px 10px; }
.ste-fld > span { font-size: 12px; color: var(--ord-text-3); }
.ste-why { font-size: 11.5px; line-height: 1.5; color: var(--ord-text-4); }
.ste-fld .ste-why { grid-column: 2; margin-top: -4px; }
.ste-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--ord-band); border: 1px solid var(--ord-line); justify-self: start; }
.ste-seg button { padding: 4px 14px; border: 0; border-radius: 999px; background: none; color: var(--ord-text-3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ste-seg button.is-on { background: var(--ord-head-bg); color: var(--ord-on-solid); }
.ste-seg button[disabled] { opacity: .4; cursor: not-allowed; }
.ste-par { display: flex; flex-wrap: wrap; gap: 6px; }
.ste-par button { padding: 2px; border: 2px solid transparent; border-radius: 999px; background: none; cursor: pointer; }
.ste-par button .ord-st-pill { font-size: 12px; font-weight: 700; }
.ste-par button.is-on { border-color: var(--ord-accent); }
.ste-par button[disabled] { opacity: .4; cursor: not-allowed; }
.ste-ord { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ord-text-2); font-variant-numeric: tabular-nums; }
.ste-ord .ste-ib { width: 28px; height: 28px; border-radius: 8px; }
.ste-ord span { margin-right: 4px; }

/* 특수상태 — 하나 고르기 */
.ste-note { margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--ord-tint-amber-line); border-radius: 9px; background: var(--ord-tint-amber-bg); color: var(--ord-tint-amber-fg); font-size: 12px; line-height: 1.55; }
.ste-og { margin: 10px 0 2px; padding: 0 10px; font-size: 11px; font-weight: 700; color: var(--ord-text-4); }
.ste-og:first-child { margin-top: 0; }
.ste-og span { margin-left: 4px; font-weight: 500; }
.ste-opt { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; border-radius: 9px; cursor: pointer; }
.ste-opt:hover:not(.is-off) { background: var(--ord-surface-2); }
.ste-opt.is-on { background: var(--ord-accent-soft); }
.ste-opt input { flex: none; margin: 0; accent-color: var(--ord-accent); }
.ste-opt-none { font-size: 12.5px; color: var(--ord-text-2); }
.ste-opt-m { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ord-text-4); }
.ste-opt.is-from .ste-opt-m { color: var(--ord-accent-strong); }
.ste-opt.is-orig .ste-opt-m { color: var(--ord-text-3); }
.ste-opt.is-off { cursor: not-allowed; }
.ste-opt.is-off .sg-flag, .ste-opt.is-off .ste-opt-none { opacity: .45; }
.ste-opt:focus-within { box-shadow: inset 0 0 0 2px var(--ord-accent); }
.ste-credit { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--ord-line); }

/* 판정 변화 */
.ste-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ste-ic { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--ord-line); border-radius: 999px; background: var(--ord-surface); font-size: 12px; color: var(--ord-text-2); white-space: nowrap; }
.ste-ic::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ord-tint-green-fg); }
.ste-ic.is-down::before { background: var(--ord-tint-red-fg); }
.ste-empty { font-size: 12px; color: var(--ord-text-4); }

/* 아래 막대 */
.ste-ft-st { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ord-text-3); }
.ste-ft-st b { color: var(--ord-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.ste-ft-st .ste-mark { width: 7px; height: 7px; }

/* 검토 */
.ste-rv { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--ord-surface-2); }
.ste-rv-hd { display: flex; align-items: baseline; gap: 10px; padding-left: 12px; border-left: 4px solid var(--ord-accent); }
.ste-rv-hd h3 { margin: 0; font-size: 15px; font-weight: 800; }
.ste-rv-hd span { font-size: 12.5px; color: var(--ord-text-3); }
.ste-tbl { width: 100%; border-collapse: collapse; }
.ste-tbl td { padding: 9px 14px; border-top: 1px solid var(--ord-line-soft); vertical-align: top; font-size: 12.5px; color: var(--ord-text-2); }
.ste-tbl tr:first-child td { border-top: 0; }
.ste-tbl td:first-child { width: 1%; white-space: nowrap; }
.ste-tbl td.n { width: 1%; white-space: nowrap; text-align: right; font-weight: 700; color: var(--ord-text); font-variant-numeric: tabular-nums; }
.ste-tbl .ord-st-pill { font-size: 12px; font-weight: 700; }
.ste-tbl ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.ste-rv-list { margin: 0; padding: 10px 14px 12px 30px; font-size: 12.5px; line-height: 1.8; color: var(--ord-text-2); }
.ste-err { padding: 10px 14px; border: 1px solid var(--ord-tint-red-line); border-radius: 10px; background: var(--ord-tint-red-bg); color: var(--ord-tint-red-fg); font-size: 12.5px; }
.ste-warn { padding: 10px 14px; border: 1px solid var(--ord-tint-amber-line); border-radius: 10px; background: var(--ord-tint-amber-bg); color: var(--ord-tint-amber-fg); font-size: 12.5px; line-height: 1.6; }
.ste-err p, .ste-warn p { margin: 0; }
.ste-foot { margin: 0; font-size: 12px; line-height: 1.6; color: var(--ord-text-4); }

@media (prefers-reduced-motion: no-preference) {
  .ste-row, .ste-opt { transition: background-color .12s; }
}

/* ───── 휴대폰 — 목록 → 고른 진행상태 두 단계 ───── */
@media (max-width: 768px) {
  .ste-hero { padding: 12px 14px; }
  .ste-grid { grid-template-columns: 1fr; padding: 12px; }
  .ste[data-view="tree"] .ste-insp { display: none; }
  .ste[data-view="inspect"] .ste-treecard { display: none; }
  .ste-insp { position: static; }
  .ste-back { display: inline-flex; }
  .ste-grip, .ste-band .ste-hint { display: none; }
  .ste-row { min-height: 50px; padding-left: 8px; }
  .ste-chev { display: block; }
  .ste-name .ord-st-pill { max-width: 150px; }
  .ste-ft-st span.long { display: none; }
}

