/* 본사 현황판·단계 보드·목록(admin/sales-board.js)과 고객 상세의 단계 막대·같은 매장, 빠른 고객 등록.
   company-sales.css 다음에 읽는다. 색은 company-sales.css 토큰만 쓴다. */
.page-heading .heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-count { margin-left: 6px; font-size: 18px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }


/* 판 */
.sb-empty { margin: 6px 0; color: var(--muted); font-size: 13px; }
.sb-link { padding: 0; border: 0; background: none; color: var(--jade-deep); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.sb-badge { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; background: var(--jade-deep); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.sb-badge[data-tone=amber] { background: #9a6700; color: #fff; }
.sb-badge[data-tone=red] { background: var(--crimson); color: #fff; }
.sb-badge[data-tone=muted] { background: #fff; box-shadow: inset 0 0 0 1px #b9c2bd; color: #4d5852; }
/* 고객 메시지(데이터룸 대화) — 고객이 기다리는 것. 경고색(빨강·주황)과 섞이지 않게 파랑 하나만 쓴다. */
.sb-badge[data-tone=blue], .message-tag { background: #1d5c8f; color: #fff; }




/* 숫자 → 목록 */
.sb-scope { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.sb-list-head, .sb-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.3fr) 112px; gap: 12px; align-items: center; }
.sb-list-head { padding: 0 14px 6px; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.sb-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.sb-list li + li { border-top: 1px solid #e3e9e4; }
.sb-row { width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.sb-row:hover { background: var(--jade-soft); }
.sb-row > span { min-width: 0; }
.sb-row-main { display: flex; flex-direction: column; }
.sb-row-main b, .sb-row-main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-row-main small, .sb-row-owner, .sb-row-last { font-size: 12.5px; color: var(--muted); }
.sb-row-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.sb-row-next { font-size: 13px; }
.sb-row-next.is-late { color: var(--crimson); font-weight: 650; }
.sb-row-last { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }

/* 단계 보드 */
.sb-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0 0 12px; }
.sb-filters .field { min-width: 200px; margin: 0; }
.sb-filters .check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.sb-notice { flex: 1 1 320px; margin: 0; padding: 9px 12px; border-left: 3px solid var(--track-color); background: var(--track-soft); font-size: 12px; color: var(--ink); }
.sb-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.sb-col { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.sb-col-focus { border-color: var(--track-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--track-color) 35%, transparent); }
.sb-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.sb-col h2 { margin: 0; font-size: 13px; }
.sb-col .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-col-note { margin: 4px 0; font-size: 12px; color: var(--muted); }
.sb-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sb-card { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 10px 11px; border: 1px solid #d5ddd7; border-left: 3px solid var(--track-color); border-radius: 6px; background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.sb-card:hover { border-color: var(--track-color); }
.sb-card b { font-size: 14px; }
.sb-card-sub { font-size: 12px; color: var(--muted); }
.sb-card-next { font-size: 12px; }
.sb-card-next.is-late { color: var(--crimson); font-weight: 600; }
.sb-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.sb-locked { background-image: repeating-linear-gradient(135deg, transparent 0 6px, #e8ece8 6px 7px); color: var(--muted); }

/* 고객 목록·상세: 같은 매장 표시와 단계 막대 */
.message-tag { display: inline-flex; flex-shrink: 0; align-items: center; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.same-store-tag { flex-shrink: 0; padding: 1px 6px; border: 1px solid var(--jade-line); border-radius: 4px; background: #fff; color: var(--jade-deep); font-size: 11px; font-weight: 650; white-space: nowrap; }
.stage-bar { margin: 12px 0 4px; }
.stage-bar ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 3px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.stage-bar li { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stage-dot { display: block; height: 6px; border-radius: 3px; background: #e1e7e2; }
.stage-bar li[data-state=done] .stage-dot { background: color-mix(in srgb, var(--track-color) 55%, white); }
.stage-bar li[data-state=current] .stage-dot { background: var(--track-color); box-shadow: 0 0 0 2px color-mix(in srgb, var(--track-color) 30%, transparent); }
.stage-bar li[data-locked] .stage-dot { background-image: repeating-linear-gradient(135deg, transparent 0 3px, #c9d1cb 3px 4px); }
.stage-name { overflow: hidden; font-size: 11px; line-height: 1.3; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.stage-bar li[data-state=current] .stage-name { color: var(--ink); font-weight: 700; }
.stage-bar li[data-owner=hq]:not([data-owner=hq] ~ li) { padding-left: 6px; border-left: 2px solid #d6ddd8; }
.stage-caption { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.same-store { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--jade-line); border-radius: 8px; background: #fbfdfb; }
.same-store h3 { margin: 0 0 6px; font-size: 13px; }
.same-store h3 span { color: var(--muted); font-weight: 600; }
.same-store ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.same-store button { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; padding: 6px 6px; border: 0; border-radius: 6px; background: none; color: var(--ink); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.same-store button:hover { background: var(--jade-soft); }
.same-store button span:last-child { color: var(--muted); font-size: 12px; }
.same-store .help { margin: 6px 0 0; font-size: 11.5px; }

/* 빠른 고객 등록 */
.quick-customer { max-width: 760px; }
.quick-customer .store-keys { margin: 4px 0 12px; padding: 10px 12px 4px; border: 1px solid var(--jade-line); border-radius: 8px; background: #fbfdfb; }
.quick-customer .store-keys legend { padding: 0 4px; font-size: 13px; font-weight: 650; }
.quick-customer .store-keys legend small { margin-left: 4px; color: var(--muted); font-weight: 500; }
.quick-customer .more-fields { margin: 4px 0 12px; }
.quick-customer .more-fields summary { padding: 6px 0; font-weight: 650; color: var(--jade-deep); cursor: pointer; }
.quick-customer .more-fields summary small { margin-left: 4px; color: var(--muted); font-weight: 500; }

.sb-card:focus-visible, .sb-row:focus-visible, .sb-link:focus-visible, .same-store button:focus-visible { outline: 2px solid var(--jade-deep); outline-offset: 2px; }

@media (max-width: 1100px) {
  .sb-list-head { display: none; }
  .sb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; }
}
@media (max-width: 650px) {
  .sb-row { grid-template-columns: minmax(0, 1fr); }
  .sb-filters .field { min-width: 0; flex: 1 1 100%; }
  .sb-board { grid-auto-columns: minmax(78%, 1fr); }
}
@media (forced-colors: active) {
  .sb-locked, .stage-bar li[data-locked] .stage-dot { background-image: none; }
  .message-tag, .sb-badge[data-tone=blue] { border: 1px solid CanvasText; }
}

/* ── 현황판 (2026-11-25 다시 그림) ──
   숫자 카드 6칸(첫 칸은 진한 큰 카드 + 분야 구성 막대) · 지금 손볼 것 · 분야별 단계 막대 · 최근 움직임 · 팀별 막대.
   움직임은 뜻이 있을 때만: 들어올 때 차례로 떠오름 · 숫자 올라감 · 막대가 늘어남 · 손볼 숫자에만 맥박. */
.db { max-width: 1560px; margin: 0 auto; }
.db-head { align-items: flex-end; margin-bottom: 22px; }
.db-head h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.045em; }
.db-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; }
.db-sync { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink-2); font-size: 12px; font-weight: 650; }
.db-sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }
.db-sync.is-busy::before { animation: fx-blink 1s ease-in-out infinite; }
.db-icon-btn { width: 40px; padding: 0; }
.db-icon-btn.is-spinning .xi { animation: fx-spin .8s linear infinite; }
.db-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.db-kpis, .db-skel-kpis { display: grid; grid-template-columns: minmax(0, 1.8fr) repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.db-kpi { --tone-soft: var(--jade-deep); --tone-ink: #fff; position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 142px; padding: 16px 16px 14px; border: 0; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--sh-1); color: var(--ink); text-align: left; cursor: pointer; overflow: hidden; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); animation: fx-rise .6s var(--ease-out) backwards; animation-delay: calc(80ms + var(--i, 0) * 55ms); }
.db-kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.db-kpi:active { transform: translateY(-1px) scale(.985); }
.db-kpi-top { display: flex; align-items: center; gap: 9px; width: 100%; }
.db-kpi-ic { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; background: var(--tone-soft); color: var(--tone-ink); }
.db-kpi-ic .xi { width: 17px; height: 17px; }
.db-kpi-label { min-width: 0; color: var(--ink-2); font-size: 13px; font-weight: 650; line-height: 1.25; word-break: keep-all; }
.db-kpi-go { position: absolute; top: 14px; right: 14px; display: grid; color: var(--muted-2); opacity: 0; transform: translate(-4px, 4px); transition: opacity .25s, transform .35s var(--ease-out); }
.db-kpi-go .xi { width: 15px; height: 15px; }
.db-kpi:hover .db-kpi-go, .db-kpi:focus-visible .db-kpi-go { opacity: 1; transform: none; }
.db-num { margin-top: 12px; color: var(--tone-num, var(--ink)); font-size: 40px; font-weight: 760; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.db-kpi-help { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: auto; padding-top: 10px; overflow: hidden; color: var(--muted-2); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.db-kpi-help .xi { width: 14px; height: 14px; flex: 0 0 14px; color: #7fae9c; }
.db-live { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); animation: fx-ping 1.8s var(--ease-out) infinite; }
.db-kpi[data-tone=jade] { --tone-soft: #13804f; --tone-ink: #fff; }
.db-kpi[data-tone=amber] { --tone-soft: #b7791f; --tone-ink: #fff; --tone-num: #8a5a00; }
.db-kpi[data-tone=red] { --tone-soft: var(--crimson); --tone-ink: #fff; --tone-num: var(--crimson); box-shadow: inset 0 3px 0 var(--crimson), var(--sh-1); }
.db-kpi[data-tone=red]:hover { box-shadow: inset 0 3px 0 var(--crimson), var(--sh-2); }
.db-kpi[data-tone=muted] { --tone-soft: #5f6b65; --tone-ink: #fff; }
.db-kpi[data-zero] { --tone-soft: #dfe4e1; --tone-ink: #7d8983; --tone-num: #b0b9b4; }
/* 첫 칸: 진한 큰 카드. 진행 중 숫자 + 분야별 구성 막대. */
.db-kpi[data-kpi=active] { --tone-soft: rgba(255, 255, 255, .09); --tone-ink: #a6d6c3; background: radial-gradient(120% 150% at 100% 0%, rgba(97, 148, 130, .42), transparent 55%), linear-gradient(160deg, #1f2724, #121614 70%); box-shadow: 0 22px 44px -26px rgba(8, 28, 20, .9), inset 0 1px 0 rgba(255, 255, 255, .07); color: #f2f5f3; }
.db-kpi[data-kpi=active]:hover { box-shadow: 0 28px 52px -26px rgba(8, 28, 20, .95), inset 0 1px 0 rgba(255, 255, 255, .09); }
.db-kpi[data-kpi=active] .db-kpi-label { color: #d6dfdb; }
.db-kpi[data-kpi=active] .db-num { color: #fff; font-size: 48px; }
.db-kpi[data-kpi=active] .db-kpi-help { margin-top: 8px; padding-top: 0; color: #a4b1ab; }
.db-kpi[data-kpi=active] .db-kpi-go { color: #cbd5d0; }
.db-kpi[data-kpi=active].fx-spot::before { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(166, 214, 195, .16), transparent 65%); }
.db-kpi[data-kpi=active].fx-spot::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(166, 214, 195, .55), transparent 70%); }
.db-kpi[data-kpi=active] { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "top top" "num mix" "help mix"; grid-template-rows: auto auto 1fr; column-gap: 22px; align-items: start; }
.db-kpi[data-kpi=active] .db-kpi-top { grid-area: top; }
.db-kpi[data-kpi=active] .db-num { grid-area: num; }
.db-kpi[data-kpi=active] .db-kpi-help { grid-area: help; align-self: start; }
.db-mix { grid-area: mix; display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 14px; }
.db-mix-row { display: grid; grid-template-columns: minmax(0, 66px) minmax(0, 1fr) 22px; gap: 8px; align-items: center; color: #c3cec9; font-size: 11.5px; animation: fx-rise .5s var(--ease-out) backwards; animation-delay: calc(260ms + var(--i, 0) * 70ms); }
.db-mix-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-mix-bar { display: flex; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.db-mix-bar i { flex: 0 0 0; border-radius: 999px; background: var(--track-color); transform-origin: left; animation: fx-grow 1s var(--ease-out) backwards; animation-delay: calc(360ms + var(--i, 0) * 80ms); }
.db-mix-bar b { flex: 0 0 0; }
.db-mix-n { color: #fff; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.db-mix-more { color: #93a19a; font-size: 11px; }

.db-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.db-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.db-panel { position: relative; min-width: 0; padding: 20px 20px 16px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--sh-1); }
.db-panel-head { margin: 0 0 14px; }
.db-panel-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16.5px; letter-spacing: -.025em; }
.db-panel-head .subline { margin: 3px 0 0; font-size: 12.5px; }
.db-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; animation: fx-pop .55s var(--ease-spring) backwards .35s; }
.db-empty { margin: 6px 0; color: var(--muted-2); font-size: 13px; }

/* 지금 손볼 것 */
.db-groups { display: flex; flex-direction: column; gap: 16px; }
.db-group { --tone: var(--jade-deep); --tone-ink: var(--jade-deep); animation: fx-rise .55s var(--ease-out) backwards; animation-delay: calc(160ms + var(--i, 0) * 70ms); }
.db-group[data-tone=blue] { --tone: #1d5c8f; --tone-ink: #1d5c8f; }
.db-group[data-tone=amber] { --tone: #b7791f; --tone-ink: #8a5a00; }
.db-group[data-tone=red] { --tone: var(--crimson); --tone-ink: var(--crimson); }
.db-group[data-tone=muted] { --tone: #5f6b65; --tone-ink: #56625c; }
.db-group-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.db-group-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--tone); color: #fff; }
.db-group-ic .xi { width: 14px; height: 14px; }
.db-group-name { color: var(--tone-ink); font-size: 13px; font-weight: 750; }
.db-group-count { color: var(--muted-2); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.db-more { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--jade-deep); font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background-color .2s; }
.db-more:hover { background: var(--jade-soft); }
.db-more .xi { width: 13px; height: 13px; transition: transform .25s var(--ease-out); }
.db-more:hover .xi { transform: translateX(3px); }
/* 11-25 대표 "회색 말고 흰색, 띠선이나 색을": 흰 줄 + 왼쪽에 묶음 색 띠 */
.db-rows { margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); }
.db-rows li + li { box-shadow: 0 -1px 0 var(--hair); }
.db-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px 12px 20px; border: 0; border-radius: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s, box-shadow .25s; }
.db-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); transition: width .3s var(--ease-out); }
.db-row:hover { background: color-mix(in oklab, var(--tone) 6%, #fff); }
.db-row:hover::before { width: 6px; }
.db-row-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.db-row-text b, .db-row-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-row-text b { font-size: 14px; font-weight: 650; }
.db-row-text small { color: var(--muted-2); font-size: 12.5px; }
.db-row-go { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; color: #9aa6a0; transition: background-color .2s, color .2s, transform .3s var(--ease-out); }
.db-row-go .xi { width: 14px; height: 14px; }
.db-row:hover .db-row-go { background: var(--tone); color: #fff; transform: translateX(2px); }
.db-clear { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 16px; border-radius: 12px; background: radial-gradient(circle at 50% 0%, rgba(97, 148, 130, .15), transparent 70%); text-align: center; }
.db-clear-ic { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 6px; border-radius: 50%; background: var(--jade-deep); color: #fff; animation: fx-pop .7s var(--ease-spring) backwards .2s; }
.db-clear-ic .xi { width: 27px; height: 27px; }
.db-clear small { color: var(--muted-2); }

/* 분야별 진행: 분야 한 줄 = 이름·진행 수 + 단계 막대(뒤 단계일수록 진하게) + 단계 이름표 */
.db-pipe-block + .db-pipe-block { margin-top: 16px; }
.db-block-label { margin: 0 0 4px; color: var(--muted-2); font-size: 12px; font-weight: 700; }
.db-pipes { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.db-pipe { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 10px; border-radius: 12px; transition: background-color .2s; animation: fx-rise .5s var(--ease-out) backwards; animation-delay: calc(180ms + var(--i, 0) * 60ms); }
.db-pipe:hover { background: var(--panel-2); }
.db-pipe-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; padding: 2px 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.db-pipe-name strong { font-size: 18px; font-weight: 760; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.db-pipe-name small { color: var(--muted-2); font-size: 11px; }
.db-pipe-name:hover .track-tag { border-color: var(--track-color); }
.db-pipe-body { min-width: 0; }
.db-bar { display: flex; gap: 3px; height: 26px; }
.db-seg { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-width: 28px; border-radius: 7px; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; transform-origin: left; transition: filter .2s, box-shadow .2s; animation: fx-grow .8s var(--ease-out) backwards; animation-delay: calc(300ms + var(--i, 0) * 60ms); }
.db-seg:hover { filter: saturate(1.15) brightness(1.04); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--track-color); }
.db-pipe [data-lv="1"] { background: color-mix(in oklab, var(--track-color) 64%, white); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.db-pipe [data-lv="2"] { background: color-mix(in oklab, var(--track-color) 84%, white); color: #fff; }
.db-pipe [data-lv="3"] { background: var(--track-color); color: #fff; }
.db-pipe [data-lv="4"] { background: color-mix(in oklab, var(--track-color) 55%, var(--track-ink)); color: #fff; }
.db-pipe [data-lv="5"] { background: var(--track-ink); color: #fff; }
.db-pipe [data-lv="paused"] { background: repeating-linear-gradient(135deg, #8b958f 0 5px, #a3aca7 5px 10px); color: #fff; }
.db-legend { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 4px 0 0 -6px; }
.db-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 12px; cursor: pointer; transition: background-color .2s; }
.db-legend button:hover { background: #eef1ef; }
.db-legend i { width: 8px; height: 8px; border-radius: 3px; }
.db-legend b { font-variant-numeric: tabular-nums; }
.db-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 0; color: var(--muted-2); font-size: 12px; }
.db-quiet button { padding: 2px 10px; border: 1px dashed var(--hair-strong); border-radius: 999px; background: none; color: var(--muted-2); font: inherit; cursor: pointer; transition: color .2s, border-color .2s; }
.db-quiet button:hover { border-style: solid; border-color: var(--jade); color: var(--ink); }

/* 최근 움직임: 세로 선 위의 점(새 문의·고객 메시지만 비취색) */
.db-feed { position: relative; margin: 0; padding: 0; list-style: none; }
.db-feed::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 18px; width: 1px; background: linear-gradient(var(--hair-strong), transparent); }
.db-feed li { animation: fx-rise .5s var(--ease-out) backwards; animation-delay: calc(240ms + var(--i, 0) * 40ms); }
.db-feed-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 9px 12px 9px 13px; border: 0; border-radius: 11px; background: none; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s; }
.db-feed-row:hover { background: var(--panel-2); }
.db-feed-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin: 6px 0 0 1px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #c5cfca; }
.db-feed-dot[data-fresh] { background: var(--jade); box-shadow: 0 0 0 3px rgba(97, 148, 130, .25); }
.db-feed-main { display: flex; flex-direction: column; min-width: 0; }
.db-feed-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.db-feed-line b { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.db-kind { flex: 0 0 auto; padding: 1px 7px; border-radius: 999px; background: #eef1ef; color: #55625c; font-size: 11px; font-weight: 650; }
.db-kind.is-new { background: var(--jade-deep); color: #fff; }
.db-feed-main small { overflow: hidden; color: var(--muted-2); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.db-feed-meta { display: flex; flex-direction: column; align-items: flex-end; max-width: 150px; color: var(--muted-2); font-size: 11.5px; white-space: nowrap; }
.db-feed-meta span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.db-feed-meta time { font-variant-numeric: tabular-nums; }

/* 팀별: 이름 · 막대(가장 큰 팀 기준) · 숫자 */
.db-team-key { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; color: var(--muted-2); font-size: 11.5px; }
.db-team-key span { display: inline-flex; align-items: center; gap: 5px; }
.db-team-key i { width: 8px; height: 8px; border-radius: 3px; }
[data-part=early] i, .db-team-bar [data-part=early] { background: #7fb09d; }
[data-part=late] i, .db-team-bar [data-part=late] { background: var(--jade); }
[data-part=done] i, .db-team-bar [data-part=done] { background: var(--jade-deep); }
.db-team-bar [data-part=rest] { background: transparent; }
.db-teams { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.db-teams li { animation: fx-rise .5s var(--ease-out) backwards; animation-delay: calc(260ms + var(--i, 0) * 50ms); }
.db-team { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, .9fr) auto; gap: 14px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; background: none; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s; }
.db-team:hover { background: var(--panel-2); }
.db-team-name { display: flex; flex-direction: column; min-width: 0; }
.db-team-name b { overflow: hidden; font-size: 13.5px; text-overflow: ellipsis; white-space: nowrap; }
.db-team-name small { color: var(--muted-2); font-size: 11.5px; }
.db-team-bar { display: flex; gap: 2px; height: 8px; overflow: hidden; border-radius: 999px; background: #edf0ee; }
.db-team-bar i { flex: 0 0 0; min-width: 0; transform-origin: left; animation: fx-grow .8s var(--ease-out) backwards; animation-delay: calc(340ms + var(--i, 0) * 50ms); }
.db-team-nums { display: grid; grid-template-columns: repeat(4, 50px); text-align: right; }
.db-team-nums span { display: flex; flex-direction: column; line-height: 1.25; }
.db-team-nums strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.db-team-nums small { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }

/* 불러오는 중 · 못 불러옴 */
.db-skel-kpis i, .db-skel-grid i { display: block; border-radius: var(--r-lg); background: linear-gradient(100deg, #e6ebe8 30%, #f4f6f5 50%, #e6ebe8 70%) 0 0 / 300% 100%; animation: fx-shimmer 1.3s linear infinite; }
.db-skel-kpis i { height: 142px; }
.db-skel-kpis i:first-child { background-color: #1d2421; background-image: linear-gradient(100deg, #1d2421 30%, #2a332f 50%, #1d2421 70%); }
.db-skel-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.db-skel-grid i { height: 380px; }
.db-error { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 52px 16px; border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--sh-1); text-align: center; }
.db-error-ic { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 4px; border-radius: 50%; background: var(--crimson); color: #fff; }
.db-error-ic .xi { width: 26px; height: 26px; }
.db-error small { max-width: 520px; color: var(--muted-2); }
.db-error .secondary { margin-top: 10px; }

.db-kpi:focus-visible, .db-row:focus-visible, .db-pipe-name:focus-visible, .db-legend button:focus-visible, .db-feed-row:focus-visible, .db-team:focus-visible, .db-more:focus-visible, .db-quiet button:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 2px; }

@media (max-width: 1280px) {
  .db-kpis, .db-skel-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-kpi[data-kpi=active], .db-skel-kpis i:first-child { grid-column: 1 / -1; }
  .db-kpi[data-kpi=active] { min-height: 0; }
  .db-kpi:last-child, .db-skel-kpis i:last-child { grid-column: span 2; }
}
@media (max-width: 1100px) {
  .db-grid, .db-skel-grid { grid-template-columns: minmax(0, 1fr); }
  .db-col { display: contents; }
  .db-attn { order: 1; } .db-pipe-panel { order: 2; } .db-feed-panel { order: 3; } .db-team-panel { order: 4; }
}
@media (max-width: 650px) {
  .db-head { align-items: flex-start; }
  .db-head h1 { font-size: 26px; }
  .db-kpis, .db-skel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .db-kpi { min-height: 124px; padding: 14px 13px 12px; }
  .db-num { font-size: 32px; }
  .db-kpi[data-kpi=active] .db-num { font-size: 40px; }
  .db-kpi-label { font-size: 12.5px; white-space: normal; }
  .db-kpi-help { white-space: normal; }
  .db-panel { padding: 16px 14px 12px; }
  .db-pipe { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 6px; }
  .db-feed-meta { max-width: 90px; }
  .db-team { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .db-team-bar { grid-column: 1 / -1; grid-row: 2; }
  .db-team-nums { grid-template-columns: repeat(4, 40px); }
}
@media (forced-colors: active) {
  .db-seg, .db-legend i, .db-mix-bar i, .db-team-bar i { border: 1px solid CanvasText; }
}
