/* 설정 › 상품진행상태관리 · DB진행상태관리 «분할 뷰» (2026-11-03, 샘플 sample/status-groups) — 마크업 = views/status_groups/*
 * 동작 = status_group_split_controller.js. 색은 전부 var(--ord-*) — 라이트/다크 공용(가드 TOKENIZED 등록). 인라인 style 없음.
 * 모바일(≤768px) = 그룹 목록 → 그룹 화면 두 단계 · 추가 버튼은 떠 있는 pill(.ol-reg-btn 과 같은 자리·모양). */
.sg-page { max-width: 1120px; }
.sg-page [hidden] { display: none !important; }
.sg { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 26px; align-items: start; }
.sg-main { min-width: 0; }  /* 오른쪽 «그룹 화면» 칸 (진행상태 줄의 눌러 열기 영역은 .sg-rmain) */
.sg-pane { display: block; }

/* ───── 왼쪽 그룹 목록 ───── */
.sg-nav { position: sticky; top: 10px; z-index: 3; background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; overflow: hidden; }
.sg-nav-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 12px; font-weight: 700; color: var(--ord-text-3); background: var(--ord-band); border-bottom: 1px solid var(--ord-line); }
.sg-nav-h span { font-weight: 600; color: var(--ord-text-4); }
.sg-nav-item { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--ord-line-soft); background: var(--ord-surface); cursor: pointer; color: var(--ord-text-2); }
.sg-nav-list > .sg-nav-item:first-child { border-top: 0; }
.sg-nav-item:hover { background: var(--ord-surface-2); }
.sg-nav-item.is-on { background: var(--ord-accent-soft); box-shadow: inset 3px 0 0 var(--ord-accent); }
.sg-nav-item:focus-visible { outline: 2px solid var(--ord-accent); outline-offset: -2px; }
.sg-nav-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-nav-nm b { font-size: 13px; font-weight: 600; color: var(--ord-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-nav-item.is-on .sg-nav-nm b { color: var(--ord-accent-strong); }
.sg-nav-nm small { font-size: 11.5px; color: var(--ord-text-4); }
.sg-nav-nm small.is-use { color: var(--ord-tint-green-fg); }
.sg-nav-item.is-off .sg-nav-nm b { color: var(--ord-text-4); }
.sg-nav-n { font-size: 11.5px; color: var(--ord-text-4); font-variant-numeric: tabular-nums; }
.sg-nav-chev { display: none; flex: none; color: var(--ord-line-2); }
.sg-nav-grip { flex: none; display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; padding: 4px 2px; margin-left: -6px; cursor: grab; opacity: 0; transition: opacity .12s; }
.sg-nav-grip i, .sg-grip i { width: 3px; height: 3px; border-radius: 50%; background: var(--ord-text-4); }
.sg-nav-item:hover .sg-nav-grip { opacity: 1; }
.sg-nav-new { display: flex; align-items: center; gap: 6px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--ord-line); background: var(--ord-surface); color: var(--ord-accent-strong); font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.sg-nav-new:hover { background: var(--ord-accent-soft); }
.campaign-sortable-ghost { opacity: .4; }
.campaign-sortable-chosen { box-shadow: var(--ord-shadow); }

/* ───── 버튼·태그 ───── */
.sg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 14px; border: 1px solid var(--ord-line-2); border-radius: 999px; background: var(--ord-surface); color: var(--ord-text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.sg-btn:hover { border-color: var(--ord-accent); color: var(--ord-accent-strong); }
.sg-btn.is-primary { background: var(--ord-head-bg); border-color: var(--ord-head-bg); color: var(--ord-on-solid); }
.sg-btn.is-primary:hover { filter: brightness(1.08); color: var(--ord-on-solid); }
.sg-btn.is-icon { width: 34px; padding: 0; }
.sg-btn.is-flat { border-color: transparent; background: none; }
.sg-link { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ord-text-3); cursor: pointer; }
.sg-link:hover, .sg-link[aria-pressed="true"] { color: var(--ord-accent-strong); }
.sg-tag { display: inline-flex; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--ord-band); color: var(--ord-text-3); border: 1px solid var(--ord-line); }

/* ───── 그룹 머리 ───── */
.sg-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.sg-hd-main { min-width: 0; }
.sg-hd-t { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.2px; color: var(--ord-text); }
.sg-desc { margin: 4px 0 0; font-size: 13px; color: var(--ord-text-3); }
.sg-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 10px 0 0; font-size: 12.5px; }
.sg-facts div { display: flex; gap: 7px; }
.sg-facts dt { color: var(--ord-text-4); }
.sg-facts dd { min-width: 0; margin: 0; color: var(--ord-text-2); font-weight: 500; }
.sg-facts .is-use { flex-basis: 100%; }
.sg-used { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.sg-used-i { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 10px; border-radius: 999px; background: var(--ord-surface); border: 1px solid var(--ord-line); font-size: 12px; font-weight: 600; color: var(--ord-text-2); }
.sg-used-i small { font-size: 11px; font-weight: 500; color: var(--ord-text-4); }
.sg-muted { color: var(--ord-text-4); }
.sg-facts .is-code dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ord-text-3); }
.sg-hd-act { display: flex; align-items: center; gap: 10px; flex: none; }
.sg-sw { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; font-size: 12.5px; color: var(--ord-text-3); }
.sg-more-wrap { position: relative; }
.sg-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 272px; padding: 6px; background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; box-shadow: var(--ord-shadow); }
.sg-menu button { display: flex; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; font-size: 13px; font-weight: 600; color: var(--ord-text); cursor: pointer; }
.sg-menu button:hover:not([disabled]) { background: var(--ord-surface-2); }
.sg-menu small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--ord-text-4); }
.sg-menu .is-danger { color: var(--ord-tint-red-fg); }
.sg-menu button[disabled] { cursor: default; }
.sg-menu button[disabled] > span { opacity: .65; }
.sg-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; background: var(--ord-tint-blue-bg); border: 1px solid var(--ord-tint-blue-line); color: var(--ord-tint-blue-fg); font-size: 12.5px; line-height: 1.6; }
.sg-notice .sg-link { flex: none; color: inherit; font-weight: 700; text-decoration: underline; }

/* ───── 진행상태 카드 ───── */
.sg-card { background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; overflow: hidden; }
.sg-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--ord-line); }
.sg-sp { flex: 1; }
.sg-ro { display: none; }
.sg-flagnote { display: none; padding: 10px 14px; background: var(--ord-band); border-bottom: 1px solid var(--ord-line); }
.sg-flagnote p { margin: 0 0 8px; font-size: 12px; line-height: 1.6; color: var(--ord-text-3); }
.sg[data-flagnote="1"] .sg-flagnote { display: block; }
/* 변경 히스토리 탭 — 공용 타임라인(shared/history_timeline)은 자체 여백이 없어 패널이 상하좌우 여백을 준다 */
.sg-panel-history { padding: 18px 20px 20px; }
.sg[data-tab="1"] .sg-bar[data-history-tab="1"] .sg-link { display: none; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-chip { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.sg-chip.is-off { background: var(--ord-surface); color: var(--ord-text-4); border: 1px dashed var(--ord-line-2); font-weight: 500; }
.sg-chip.is-lock { background: var(--ord-tint-blue-bg); color: var(--ord-tint-blue-fg); border: 1px solid var(--ord-tint-blue-line); }
.sg-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 8px 4px 14px; }
.sg-item + .sg-item > .sg-row, .sg-kids > .sg-item > .sg-row { border-top: 1px solid var(--ord-line-soft); }
.sg-row:hover { background: var(--ord-surface-2); }
.sg-row.is-child { padding-left: 46px; padding-right: 50px; }   /* 오른쪽 «+ 하위» 버튼 자리만큼 비워 화살표 열을 맞춘다 */
.sg-row.is-off .ord-st-pill { opacity: .5; }
.sg-rmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; align-self: stretch; cursor: pointer; }
.sg-rmain:focus-visible { outline: 2px solid var(--ord-accent); outline-offset: -2px; }
.sg-nm { flex: none; width: 176px; min-width: 0; }
.sg-row.is-child .sg-nm { width: 144px; }
.sg-nm .ord-st-pill { max-width: 100%; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-meta { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; }
.sg-flag { padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sg-share { font-size: 11.5px; color: var(--ord-text-3); }
.sg-chev { flex: none; margin-left: auto; color: var(--ord-line-2); }
.sg-row:hover .sg-chev { color: var(--ord-accent); }
.sg-grip { flex: none; display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; padding: 4px; cursor: grab; }
.sg-kid-add { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--ord-text-4); cursor: pointer; }
.sg-kid-add:hover { border-color: var(--ord-line-2); background: var(--ord-surface); color: var(--ord-accent-strong); }
.sg-empty, .sg-empty-pane { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 38px 20px 34px; text-align: center; }
.sg-empty b, .sg-empty-pane b { font-size: 14px; color: var(--ord-text); }
.sg-empty span, .sg-empty-pane span { font-size: 12.5px; color: var(--ord-text-3); }
.sg-empty .sg-btn, .sg-empty-pane .sg-btn { margin-top: 14px; }
.sg-top { display: none; }
.product-ghost, .sg .product-ghost { opacity: .4; }

/* ───── 새 그룹·복사·이름 수정 창 ───── */
.sg-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; }
.sg-form-seg { align-self: flex-start; }
.sg-form-lead { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ord-text-2); }
.sg-fld label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; color: var(--ord-text-2); }
.sg-fld label span { margin-left: 4px; font-weight: 500; color: var(--ord-text-4); }
.sg-fld input[type="text"], .sg-fld select { width: 100%; padding: 9px 11px; border: 1.5px solid var(--ord-line-2); border-radius: 9px; background: var(--ord-input-bg); color: var(--ord-text); font: inherit; font-size: 13.5px; }
.sg-fld input:focus, .sg-fld select:focus { outline: none; border-color: var(--ord-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ord-accent) 18%, transparent); }
.sg-cpbox { padding: 12px; border-radius: 10px; border: 1px solid var(--ord-line); background: var(--ord-surface-2); }
.sg-cpbox-cap { margin-bottom: 8px; font-size: 11.5px; font-weight: 700; color: var(--ord-text-4); }
.sg-cpbox p { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ord-text-2); }
.sg-strip { display: flex; flex-wrap: wrap; gap: 5px; }
.sg-more { padding: 2px 4px; font-size: 11.5px; color: var(--ord-text-4); }
.sg-hint { margin: 0; font-size: 12px; line-height: 1.65; color: var(--ord-text-3); }
.sg-cpbox + .sg-hint { margin-top: 10px; }
.sg-chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--ord-text-2); }

/* ───── 모바일 ───── */
@media (max-width: 960px) {
  .sg { grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
  .sg-nm { width: 140px; }
  .sg-hd { flex-direction: column; gap: 12px; }
}
@media (max-width: 768px) {
  .sg { display: block; }
  .sg-nav { position: static; border: 0; border-radius: 0; margin: 0 calc(-1 * var(--ord-page-gutter)); border-top: 1px solid var(--ord-line); }
  .sg-nav-h, .sg-nav-new, .sg-nav-grip { display: none; }
  .sg-nav-item { min-height: 64px; padding: 12px 16px; border-top: 0; border-bottom: 1px solid var(--ord-line); }
  .sg-nav-item.is-on { box-shadow: none; background: var(--ord-surface); }
  .sg-nav-item.is-on .sg-nav-nm b { color: var(--ord-text); }
  .sg-nav-nm b { font-size: 15px; }
  .sg-nav-nm small { font-size: 12px; }
  .sg-nav-n { display: none; }
  .sg-nav-chev { display: block; }
  .sg[data-view="pane"] .sg-nav, .sg[data-view="list"] .sg-main { display: none; }
  .sg-top { position: sticky; top: 0; z-index: 9; display: grid; grid-template-columns: 88px 1fr 88px; align-items: center; margin: 0 calc(-1 * var(--ord-page-gutter)) 12px; padding: 6px 10px; background: var(--ord-panel); border-bottom: 1px solid var(--ord-line); }
  .sg-top b { text-align: center; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sg-top .sg-btn.is-icon { justify-self: end; width: 40px; min-height: 40px; }
  .sg-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 4px; border: 0; background: none; color: var(--ord-accent-strong); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .sg-pane-in { position: relative; }
  .sg-hd { gap: 12px; margin-bottom: 12px; }
  .sg-hd-t { display: none; }
  .sg-desc { margin: 0; }
  .sg-facts { flex-direction: column; gap: 5px; margin-top: 8px; }
  .sg-facts dt { width: 52px; flex: none; }
  .sg-facts .is-code { display: none; }
  .sg-hd-act { justify-content: space-between; width: 100%; padding: 10px 12px; border: 1px solid var(--ord-line); border-radius: 12px; background: var(--ord-surface); }
  .sg-hd-act .sg-btn { min-height: 38px; }
  .sg-more-wrap { position: static; }
  .sg-more-wrap > .sg-btn { display: none; }
  .sg-menu { position: absolute; right: 0; top: 46px; }
  .sg-card { margin: 0 calc(-1 * var(--ord-page-gutter)); border-left: 0; border-right: 0; border-radius: 0; }
  .sg-bar { flex-wrap: wrap; row-gap: 8px; }
  .sg-bar .ord-seg { width: 100%; }
  .sg-bar .ord-seg > button { flex: 1; padding: 8px 12px; }
  .sg-sp { display: none; }
  .sg-ro { display: inline; margin-left: auto; }
  .sg-bar .sg-link { padding: 6px 2px; }
  .sg-add { position: fixed; right: 16px; bottom: calc(var(--shm-tab-h, 62px) + var(--shm-safe-b, 0px) + 16px); z-index: 54; padding: 13px 20px; min-height: 0; font-size: 15px; font-weight: 700; box-shadow: 0 8px 20px rgba(62, 97, 135, .35); }
  html.ordars-app:not(.web-tabbar) .sg-add { bottom: 16px; }
  body.m-kbd .sg-add { display: none !important; }
  .sg[data-reorder="1"] .sg-add { display: none !important; }
  .sg-row { flex-wrap: wrap; min-height: 56px; padding: 8px 8px 8px 14px; row-gap: 6px; }
  .sg-row.is-child { padding-left: 32px; padding-right: 50px; }
  .sg-rmain { flex-wrap: wrap; gap: 6px 10px; }
  .sg-nm, .sg-row.is-child .sg-nm { width: auto; max-width: 62%; }
  .sg-share { flex-basis: 100%; }
  .sg-grip { display: none; padding: 12px 10px; }
  .sg[data-reorder="1"] .sg-grip { display: grid; }
  .sg[data-reorder="1"] .sg-chev { display: none; }
  .sg-notice { margin-bottom: 12px; }
  .sg-flagnote { padding: 10px 14px; }
  .sg-form { padding: 14px 16px; }
  .sg-fld input[type="text"], .sg-fld select { min-height: 46px; font-size: 16px; }
  .sg-pane-in { padding-bottom: 72px; }
  .sg-panel-history { padding: 14px 14px 18px; }
}
