/* 본사 화면 새 디자인 2차 (2026-11-25 대표 "이대로 좋아. 다른 데도").
   shell.css(틀·토큰) 다음에 읽는다. 규칙: 맑은 흰 바탕 · 흰 카드(16px, 얇은 테두리+옅은 그림자) ·
   옅은 연두/회색 상자 쓰지 않기(흰 바탕 + 색 띠, 또는 진한 색) · 꼬리표는 테두리 또는 채운 색. */

/* ── 공통: 카드 ── */
.ws-card, .panel, .approval-card, .partner-org, .account-panel, .sb-list, .list-card, .detail {
  border: 0;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-1);
}
.partner-wizard { border: 0; border-radius: var(--r-lg); box-shadow: inset 0 3px 0 var(--jade-deep), var(--sh-1); }
.page-heading h1 { letter-spacing: -.02em; }
.section-heading h2, .panel > h2, .ws-card h2 { letter-spacing: -.01em; }

/* 접는 칸(▶ 더 보기)·안내 상자: 회색 바탕 → 흰 바탕 + 얇은 테두리 */
details.partner-more, details.customer-meta-details, details.workflow-checklist, details.classification-details {
  border: 1px solid var(--hair-strong);
  border-radius: 12px;
  background: #fff;
}
details > summary { cursor: pointer; }
details[open] > summary { color: var(--ink); }

/* ── 꼬리표 ── */
.badge { border: 1px solid var(--hair-strong); border-radius: 6px; background: #fff; color: #3b4a43; font-weight: 650; }
.badge.role[data-role=lead] { border-color: var(--jade-deep); background: var(--jade-deep); color: #fff; }
.badge.warn { border-color: #b7791f; background: #fff; color: #8a5a00; }
.ws-tag { border: 1px solid var(--crimson); border-radius: 999px; background: #fff; color: var(--crimson); font-weight: 650; }

/* ── 빈 화면 ── */
.ws-empty .empty-mark { background: var(--jade-deep); color: #fff; box-shadow: 0 8px 20px -10px var(--jade-deep); }

/* ── 업무 요약: 숫자 칸 ── */
.ws-stats { gap: 12px; }
.ws-stats button { border: 0; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-1); transition: transform .25s var(--ease-out), box-shadow .25s; }
.ws-stats button:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.ws-stats button:first-child { background: linear-gradient(150deg, #1d2622, #121513); color: #fff; box-shadow: 0 18px 36px -20px rgba(10, 30, 22, .7); }
.ws-stats button:first-child :is(span, small, strong) { color: inherit; }
.ws-stats .stat-foot { color: var(--jade-deep); font-weight: 650; }
.ws-stats button:first-child .stat-foot { color: #a6d6c3; }

/* ── 단계 보드: 회색 칸 → 맑은 칸, 카드는 흰 카드 ── */
.sb-notice { padding: 10px 14px; border-left: 0; border-radius: 12px; background: #fff; box-shadow: inset 4px 0 0 var(--track-color), var(--sh-1); color: var(--ink-2); }
.sb-board { gap: 12px; }
.sb-col { padding: 0 0 10px; border: 0; border-radius: 0; background: none; }
.sb-col-head { position: sticky; top: 0; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 3px 0 var(--track-color), 0 0 0 1px var(--hair); }
.sb-col h2 { font-size: 13.5px; font-weight: 700; }
.sb-col .count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--track-color); color: #fff; font-size: 11.5px; font-weight: 700; }
.sb-col-head .count[data-zero] { background: #e3e7e5; color: #7d8983; }
.sb-col ul { gap: 10px; }
.sb-card { gap: 4px; padding: 12px 13px 12px 16px; border: 0; border-left: 0; border-radius: 12px; background: #fff; box-shadow: inset 4px 0 0 var(--track-color), var(--sh-1); transition: transform .25s var(--ease-out), box-shadow .25s; }
.sb-card:hover { transform: translateY(-2px); box-shadow: inset 4px 0 0 var(--track-color), var(--sh-2); }
.sb-card:active { transform: translateY(0) scale(.99); }
.sb-card-next { color: var(--ink-2); font-weight: 600; }
.sb-col-focus .sb-col-head { box-shadow: inset 0 3px 0 var(--track-color), 0 0 0 2px var(--track-color); }

/* ── 현황판 숫자 → 목록 ── */
.sb-list { overflow: hidden; }
.sb-list-head { background: #fff; border-bottom: 1px solid var(--hair); }
.sb-row:hover { background: #f6f8f7; }

/* ── 승인함 ── */
.segmented { padding: 4px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); }
.segmented button { border-radius: 9px; }
.segmented button[aria-pressed=true] { background: #1f2a25; color: #fff; box-shadow: 0 6px 14px -8px rgba(15, 30, 24, .6); }
.approval-card { box-shadow: inset 4px 0 0 var(--approval-tone, var(--jade-deep)), var(--sh-1); }
.approval-card[data-kind=conflict] { --approval-tone: var(--crimson); }
.approval-card[data-kind=discount], .approval-card[data-kind=exception] { --approval-tone: #b7791f; }
.approval-card[data-kind=member] { --approval-tone: #1d5c8f; }
.member-ask, .facts { border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); }
.member-ask .facts { border-radius: 0; box-shadow: none; }
.approval-decide { border-top-color: var(--hair); }

/* ── 바깥 영업 팀: 세 단계 ── */
.wizard-steps { gap: 8px; }
.wizard-steps li { border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--muted-2); font-weight: 650; }
.wizard-steps li b { background: #c3ccc7; }
.wizard-steps li[data-state=now] { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--jade-deep); }
.wizard-steps li[data-state=now] b { background: var(--jade-deep); }
.wizard-steps li[data-state=done] { color: var(--jade-deep); }
.wizard-steps li[data-state=done] b { background: #13804f; }

/* ── 고객 상세 ── */
.customer-focus { border: 0; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair-strong); overflow: hidden; }
.customer-focus-stage { border-right: 1px solid var(--hair); background: #fff; box-shadow: inset 4px 0 0 var(--track-color); }
.customer-focus-stage .focus-value { color: var(--track-ink); }
.customer-message { border: 0; border-radius: 12px; background: #fff; box-shadow: inset 4px 0 0 #1d5c8f, inset 0 0 0 1px var(--hair-strong); }
.workflow-help { border: 0; border-radius: 12px; background: #fff; box-shadow: inset 4px 0 0 var(--jade-deep), inset 0 0 0 1px var(--hair-strong); color: var(--ink-2); }
.track-guidance { border: 0; border-radius: 12px; background: #fff; box-shadow: inset 4px 0 0 var(--track-color), inset 0 0 0 1px var(--hair-strong); }
.customer-tabs { border-bottom-color: var(--hair); }
.customer-tabs button { border-radius: 9px 9px 0 0; transition: color .2s, background-color .2s; }
.customer-tabs button:hover { background: #f4f6f5; }
.customer-tabs button[aria-pressed=true] { background: none; color: var(--ink); box-shadow: inset 0 -3px 0 var(--track-color, var(--jade-deep)); }
.inquiry-row[aria-pressed=true] { background: #fff; box-shadow: inset 4px 0 0 var(--track-color, var(--jade-deep)), inset 0 0 0 1.5px var(--track-color, var(--jade-deep)); }
.inquiry-row:hover { background: #f8faf9; }
.event { border-color: var(--hair); }

/* ── 고객 등록·로그인 칸 ── */
.ws-form-card, .auth { border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-1); }

@media (prefers-reduced-motion: reduce) {
  .ws-stats button, .sb-card { transition: none; }
  .ws-stats button:hover, .sb-card:hover { transform: none; }
}
@media (forced-colors: active) {
  .ws-card, .panel, .approval-card, .partner-org, .sb-card, .sb-col-head, .customer-focus, .wizard-steps li { border: 1px solid CanvasText; }
}

/* 데이터룸 탭 위 룸 줄(2026-11-26): 연한 초록 바탕 → 흰 바탕 + 진한 초록 띠(파스텔 금지). */
.room-banner { background: #fff; border-color: var(--hair-strong); box-shadow: inset 4px 0 0 var(--jade-deep), var(--sh-1); }
.room-banner h3 { color: var(--frame); }
.room-banner p { color: var(--ink-2); }

/* 고객 문의 목록 — 정렬 · 보는 방식(자세히 / 한 줄) · 태그 누르면 좁히기 (2026-11-27 대표 "그 태그를 누르면 그 태그로 빠지게", "솔트, 보는 법 만들어줘") */
#inquiry-list { container-type: inline-size; --line-cols: 84px minmax(0, 1fr) 88px 112px 50px; }
.company-list-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; font-size: 13px; }
.list-title { color: var(--ink); font-size: 13px; font-weight: 700; outline-offset: 3px; }
.list-title b { margin-left: 3px; color: #1d5c8f; font-weight: 800; font-variant-numeric: tabular-nums; }
.list-tools { display: inline-flex; align-items: center; gap: 8px; }
.list-tools select { min-height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--hair-strong); border-radius: 8px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231f2a25' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); font-size: 12.5px; font-weight: 650; appearance: none; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.list-tools select:hover { border-color: #1f2a25; }
.view-switch { display: inline-flex; padding: 2px; border: 1px solid var(--hair-strong); border-radius: 9px; background: #fff; }
.view-switch button { min-height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: #47564d; font-size: 12.5px; font-weight: 650; transition: background-color .18s ease, color .18s ease; }
.view-switch button:hover { color: var(--ink); }
.view-switch button[aria-pressed=true] { background: #1f2a25; color: #fff; }
/* 걸린 조건 칩: 진한 파랑으로 채워 '지금 좁혀 보는 중'을 분명히. ✕로 푼다. */
.list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 14px 10px; border-bottom: 1px solid var(--hair); }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 6px 3px 11px; border: 0; border-radius: 999px; background: #1d5c8f; color: #fff; font-size: 12px; animation: chip-in .22s cubic-bezier(.2, .7, .3, 1); transition: background-color .15s ease, transform .15s ease; }
.filter-chip span:first-child { opacity: .78; font-weight: 600; }
.filter-chip b { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.filter-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 10px; }
.filter-chip:hover { background: #123f63; }
.filter-chip:active { transform: translateY(1px); }
.filter-clear-all { min-height: 30px; padding: 0 6px; border: 0; background: none; color: #1d5c8f; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@keyframes chip-in { from { opacity: 0; transform: translateY(-3px) scale(.96); } }
/* 누를 수 있는 태그: 커서 · 살짝 떠오름 */
.inquiry-row [data-pick] { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.inquiry-row [data-pick]:hover { transform: translateY(-1px); box-shadow: 0 3px 8px -3px rgba(20, 40, 32, .45); }
.inquiry-row [data-pick]:active { transform: translateY(0); box-shadow: none; }
/* 한 줄 보기: 칸을 맞춰 위아래로 훑어보기 쉽게 */
.line-head, .company-line-row { display: grid; grid-template-columns: var(--line-cols); align-items: center; gap: 8px; }
.line-head { padding: 7px 14px; border-bottom: 1px solid var(--hair); color: #5d6b62; font-size: 11px; font-weight: 650; }
.line-head span:last-child { text-align: right; }
.company-line-row { width: 100%; min-height: 46px; padding: 8px 14px; border: 0; border-bottom: 1px solid #e2e8e3; text-align: left; color: var(--ink); }
.company-line-row > span { min-width: 0; }
.line-track .track-tag, .line-stage .sales-stage-badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; padding: 1px 7px; font-size: 11px; line-height: 1.6; }
.company-line-row .line-track .track-tag:is([data-track="equipment"], [data-track="franchise"], [data-track="master-franchise"], [data-track="popgolf"], [data-track="general"])::before { display: inline-block; margin-right: 4px; vertical-align: 1px; }
.line-title { display: flex; align-items: center; gap: 6px; }
.line-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.line-title :is(.message-tag, .same-store-tag) { flex-shrink: 0; }
.line-owner { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #47564d; font-size: 12px; }
.line-owner .org-tag { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.line-date { color: #5d6b62; font-size: 11.5px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line-date.attention-label { color: var(--crimson); font-weight: 750; }
.company-line-row[aria-pressed=true] .line-title strong { text-decoration: underline; text-decoration-color: var(--track-color, var(--jade-deep)); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.company-line-row[data-fresh] { animation: row-fresh 2.6s cubic-bezier(.2, .7, .3, 1); }
.company-line-row[data-fresh=new] { animation-name: row-new; }
/* 한 줄 보기는 여러 고객을 훑어보는 용도라 넓은 화면에서 목록 칸을 넓힌다(고객 이름이 덜 잘리게). */
@media (min-width: 1101px) {
  .workflow-grid:has(> #inquiry-list[data-view=line]) { grid-template-columns: minmax(430px, 1fr) minmax(0, 1.35fr); }
}
/* 목록 칸이 좁으면(데스크톱 왼쪽 칸 · 휴대폰) 담당 칸을 빼고 나머지를 지킨다. */
@container (max-width: 580px) {
  #inquiry-list > * { --line-cols: 76px minmax(0, 1fr) 84px 46px; }
  .line-owner, .line-head span:nth-child(4) { display: none; }
  .line-title .ss-long { display: none; }
}
@media (max-width: 650px) {
  .list-tools select, .view-switch button { min-height: 36px; }
  .filter-chip, .filter-clear-all { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .filter-chip, .company-line-row[data-fresh] { animation: none; }
  .inquiry-row [data-pick]:hover { transform: none; }
}
@media (forced-colors: active) {
  .filter-chip, .view-switch button[aria-pressed=true] { border: 2px solid Highlight; }
}
/* 상세 '같은 매장의 다른 건' 아래: 목록에 이 매장 건만 모으기(키보드로도 쓰는 길) */
.same-store .same-store-gather { display: inline-flex; width: auto; margin-top: 8px; padding: 6px 12px; border: 1.5px solid #1d5c8f; border-radius: 999px; background: #fff; color: #1d5c8f; font-size: 12px; font-weight: 700; transition: background-color .15s ease, color .15s ease; }
.same-store .same-store-gather:hover { background: #1d5c8f; color: #fff; }
/* 본사 계정 관리: 할인·예외 승인 권한이 켜진 직원 (2026-11-27) */
.staff-row .approver-badge { background: #1d5c8f; color: #fff; border-color: #1d5c8f; }
.staff-actions [data-approver][aria-pressed="true"] { border-color: #1d5c8f; color: #1d5c8f; }
