/* 디자인 테마: Refero "Steep"(무채색·종이 바탕·알약 버튼·큰 둥근 카드) + 딥그린 강조.
   style.css 다음에 불러와 공통 변수·공통 구성요소만 덮어쓴다(웹업로드·송신 전용 규칙은 건드리지 않음).
   글꼴: 본문 Pretendard, 큰 제목 Noto Serif KR. */
:root {
  --ink: #17191c;          /* Steep Ink Black */
  --ink-2: #2a2d33;
  --canvas: #fafafb;       /* Fog White: 페이지 바탕 */
  --surface: #ffffff;      /* Paper White: 카드·표 */
  --mist: #f2f2f3;         /* Mist Gray: 통계 카드·호버 */
  --rule: #e6e6e8;         /* 헤어라인 */
  --muted: #6b6f79;        /* Slate Gray(글자 대비 위해 한 단계 진하게) */
  --faint: #8b8e97;
  --peach: #fbe1d1;        /* 강조 카드(한 곳) */
  --sienna: #5d2a1a;
  /* 강조·상태색은 기존 유지: --accent 딥그린, --sold 빨강, --amber 주황 */
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 20px;
  /* 글꼴은 기존 IBM Plex Sans KR 그대로(사용자 2026-10-28) */
}
.page-head h1 { font-size: 24px; }

/* 브랜드 로고(LOUNGE.L Luxury) */
.brand { display: flex; align-items: center; }
.brand-logo { display: block; height: 30px; width: auto; }

/* ----- 상단 크롬: 어두운 바 → 밝은 종이 바 ----- */
.topbar { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--rule); }
.brand, .topbar h1 { color: var(--ink); }
.brand span { color: var(--faint); }
/* 상단 대분류: 개발된 메뉴는 진하게, 개발 안 된 메뉴는 흐리게 + 빈 원 */
.tab { color: var(--ink); font-weight: 600; }
.tab:hover { color: var(--ink); background: var(--mist); }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tab[aria-current="page"]::after { background: var(--accent); }
.tab.is-planned { color: #b3b6bd; font-weight: 400; }
.tab.is-planned:hover { color: var(--muted); }
.who, .admin-link, .admin-badge { color: var(--muted); }
.who b, .admin-link:hover { color: var(--ink); }
.logout-btn { border-color: var(--rule); color: var(--ink); }
.logout-btn:hover { border-color: var(--ink); }
.ribbon { background: var(--surface); }
.ribbon-item:hover { background: var(--mist); }
body > .topbar { background: var(--surface); }

/* ----- 버튼: 알약 모양 ----- */
.btn, .primary-btn, .scan-btn, .scan-retry-btn { border-radius: 999px; }
.btn { border-color: var(--rule); transition: border-color 0.15s, background-color 0.15s; }
.btn:hover { border-color: var(--ink); }
.btn-primary, .primary-btn { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .primary-btn:hover { background: #24564a; border-color: #24564a; }
.ghost-btn, .load-more-btn { border-color: var(--rule); }
.ghost-btn:hover, .load-more-btn:hover { border-color: var(--ink); }
.scan-btn { background: var(--ink); border-color: var(--ink); }

/* ----- 입력칸 ----- */
.field input, .field select { border-color: var(--rule); border-radius: 12px; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field input::placeholder { color: var(--muted); }

/* ----- 카드 ----- */
.kpis { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; }
.kpi { background: var(--mist); border-radius: var(--radius-l); padding: 16px 18px 18px; transition: background-color 0.15s; }
.kpi:hover { background: #e9e9eb; }
.kpi-value { font-weight: 500; letter-spacing: -0.02em; }
.panel, .admin-card, .login-card { border-color: var(--rule); border-radius: var(--radius-l); }
.panel { padding: 18px 20px; }
.recent-row { border-top-color: #f0f0f1; }

/* ----- 대시보드 차트(bklit 느낌): 둥근 막대·호버 강조·얇은 고리·떠 있는 설명 카드(charts.js) ----- */
.trend-chart rect { fill: var(--accent); rx: 4px; transition: opacity 0.15s; }
.trend-chart svg:hover rect { opacity: 0.35; }
.trend-chart svg rect:hover { fill: var(--accent); opacity: 1; }
.trend-chart .grid { stroke: #ececec; stroke-dasharray: 2 6; }
.trend-chart .axis { stroke: #e2e2e4; }
.bar-day { color: var(--faint); }
.bar-val { color: var(--muted); font-weight: 500; }
.photo-rate { --blank: #ececec; --unshot: #a3a6af; }
.donut-hole b { font-weight: 600; letter-spacing: -0.02em; }
/* 원그래프 3개(촬영·업로드·장기재고) 크기·가운데 글자·좌우 여백 통일: 지름 160px 가운데 정렬, 아래 범례 */
.photo-rate, .aging-pie { justify-content: center; gap: 18px 24px; padding: 4px 8px 0; }
.donut, .aging-pie svg { width: 160px; height: 160px; }
.donut-hole { inset: 16px; }
.donut-hole b { font-size: 28px; }
.donut-hole span { font-size: 12px; }
.pie-num { font-size: 7.35px; font-weight: 600; }  /* SVG viewBox 42 → 160px 이라 7.35 ≈ 28px */
.pie-sub { font-size: 3.15px; }                    /* ≈ 12px */
.photo-side, .aging-legend { flex: 1 1 100%; }
#agingPanel { display: flex; flex-direction: column; }
#agingPanel .aging-total { order: 1; margin: 12px 0 0; text-align: left; }  /* 원그래프 위 문구는 아래로 → 세 패널 제목 아래 바로 원그래프 */
#agingPanel .turnover { order: 2; }
.aging-pie circle { stroke-width: 5; transition: stroke-width 0.15s; }
.aging-pie circle:hover { stroke-width: 6.5; }
.pie-ok { stroke: #e6e6e8; background: #e6e6e8; }
.bar-track { background: var(--mist); }
.chart-tip {
  position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none;
  max-width: 280px; padding: 8px 12px; border-radius: 12px;
  background: var(--surface); color: var(--ink); font-size: 12.5px; line-height: 1.45;
  box-shadow: 0 0 0 1px rgb(4 23 43 / 0.06), 0 4px 24px rgb(0 0 0 / 0.08);
}

/* 판매 분석 선 그래프(app.js renderAnaChart) */
.ana-chart { margin: 4px 0 14px; }
.ana-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.ana-key { display: inline-flex; align-items: center; gap: 6px; }
.ana-key i { width: 16px; border-top: 2px solid var(--accent); }
.ana-key i.is-cmp { border-top: 2px dashed #a3a6af; }
.ana-key-note { margin-left: auto; color: var(--faint); }
.ana-plot { position: relative; height: 200px; }
.ana-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ana-plot .grid { stroke: #ececec; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.ana-plot .axis { stroke: #e2e2e4; vector-effect: non-scaling-stroke; }
.ana-area { fill: url(#anaFill); }
.ana-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ana-line.is-cmp { stroke: #a3a6af; stroke-dasharray: 4 4; }
.ana-hit { fill: transparent; }
.ana-hit:hover { fill: rgb(23 25 28 / 0.05); }

/* ----- 표 ----- */
.data-table th { background: var(--canvas); color: var(--muted); font-weight: 500; }
.data-table th, .data-table td { border-bottom-color: #f0f0f1; }
.data-table tbody tr:hover { background: var(--canvas); }

/* 촬영·업로드 수량(app.js renderWork, 사용자 2026-10-30): 촬영 → 업로드 → 쇼핑몰 등록 흐름 + 일별 두 막대 + 쇼핑몰별 송신 */
.work-flow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; padding: 0; list-style: none; }
.work-step { position: relative; display: flex; flex: 1 1 160px; flex-direction: column; gap: 2px; padding: 12px 16px 12px 18px; border-radius: var(--radius-m); background: var(--mist); }
.work-step::before { content: ''; position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--wk, var(--faint)); }
.work-step.is-shot { --wk: #5b616e; }
.work-step.is-uploaded { --wk: var(--accent); }
.work-step.is-listed { --wk: #8fb8a8; }
/* 단계 사이 화살표(넓은 화면만) */
.work-step + .work-step::after { content: '→'; position: absolute; top: 50%; left: -12px; transform: translateY(-50%); color: var(--faint); font-size: 13px; }
.work-label { color: var(--muted); font-size: 13px; }
.work-step b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.work-step b small { margin-left: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }
.work-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.work-key { display: inline-flex; align-items: center; gap: 6px; }
.work-key::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.work-key.is-shot::before { background: #5b616e; }
.work-key.is-up::before { background: var(--accent); }
.work-plot { position: relative; height: 170px; }
.work-plot svg { display: block; width: 100%; height: 100%; }
.work-plot .axis { stroke: #e2e2e4; vector-effect: non-scaling-stroke; }
.work-plot rect.is-shot { fill: #5b616e; }
.work-plot rect.is-up { fill: var(--accent); }
.work-plot svg:hover rect { opacity: 0.4; }
.work-plot svg rect:hover { opacity: 1; }
.work-panel.dash-reveal:not(.is-in) .work-plot rect { transform: scaleY(0); }
.work-panel.is-in .work-plot rect { transform-box: fill-box; transform-origin: bottom; animation: dash-bar-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--t, 0s); }
.work-malls h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; }
.work-malls ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 24px; margin: 0; padding: 0; list-style: none; }
.work-malls li { display: grid; grid-template-columns: 11em 1fr 3.5em; align-items: center; gap: 10px; font-size: 13px; }
.work-mall { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-mall small { color: var(--muted); }
.work-malls .bar-track { height: 8px; background: var(--mist); }
.work-malls .bar-track i { display: block; height: 100%; border-radius: inherit; background: #8fb8a8; }
.work-malls b { text-align: right; font-weight: 500; }
.work-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) {
  .work-step + .work-step::after { display: none; }
  .work-step { flex-basis: 28%; padding: 10px 10px 10px 13px; }
  .work-step b { font-size: 21px; }
  .work-step .delta-base { display: none; }
  .work-malls li { grid-template-columns: 8.5em 1fr 3em; }
}
@media (prefers-reduced-motion: reduce) {
  #view-home .work-plot rect { animation: none !important; transform: none !important; }
}

/* 사이트 공통 모션(사용자 2026-11-03: 부드러운 호버·창 모션, CSS만). 컨셉 "금고 문" = 빠르고 조용하게.
   호버는 색·테두리만 0.12초, 누르면 3% 눌림, 창은 8px 아래에서 올라오며 나타남. 튕김·카드 떠오르기 없음 */
:root { --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); --t-fast: 120ms; --t-mid: 200ms; }
.btn, .primary-btn, .scan-btn, .seg button, .tab, .ribbon-item, .cs-folder, .cs-row, .cs-quick-item, .hub-chip, .hub-flow-step,
.kpis-mini button, .pack-pick, button.op, .attention button, .modal-close, .data-table tbody tr, .field input, .field select {
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
/* 호버가 없던 것들 */
.hub-chip:not([aria-pressed="true"]):hover { border-color: var(--ink); }
.modal-close { border-radius: 50%; }
.modal-close:hover { background: var(--mist); }
.toast:hover { box-shadow: 0 8px 28px rgb(0 0 0 / 0.22); }
/* 누름 */
.btn:active:not(:disabled), .primary-btn:active:not(:disabled), .seg button:active, .ribbon-item:active, .hub-chip:active,
.kpis-mini button:active, .cs-folder:active { transform: scale(0.97); }
/* 창·알림 나타남(닫힐 때는 바로 사라짐) */
@keyframes ll-rise { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
@keyframes ll-fade { from { opacity: 0; } }
@keyframes ll-slide { from { opacity: 0; transform: translateX(16px); } }
dialog[open], .modal:not([hidden]) .modal-inner { animation: ll-rise var(--t-mid) var(--ease-out); }
dialog[open]::backdrop, .modal:not([hidden]) { animation: ll-fade var(--t-mid) ease-out; }
.toast { animation: ll-slide 240ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  dialog[open], dialog[open]::backdrop, .modal:not([hidden]), .modal:not([hidden]) .modal-inner, .toast { animation: none; }
  .btn:active, .primary-btn:active, .seg button:active, .ribbon-item:active, .hub-chip:active, .kpis-mini button:active, .cs-folder:active { transform: none; }
}

/* 앱으로 열 때 첫 화면(splash.js): 웃는 가방이 왼쪽에서 달려와(다리 번갈아·몸 들썩·먼지) 가운데서 깡충 → 오른쪽으로 나가며 화면이 걷힘, 1.6초 */
.splash { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; background: var(--surface); overflow: hidden; animation: splash-out 0.35s ease 1.5s forwards; }
.splash-run { grid-area: 1 / 1; animation: splash-run 1.6s cubic-bezier(0.45, 0, 0.55, 1) forwards; }
/* 화면이 실제로 보이기 전(.is-go 전)엔 흰 화면에서 대기 — 폰 기본 시작 화면 뒤에서 끝나 버리지 않게 */
.splash:not(.is-go), .splash:not(.is-go) .splash-run { animation-play-state: paused; }
.splash-run svg { display: block; overflow: visible; }
.splash-ground { grid-area: 1 / 1; width: min(60vw, 420px); height: 1px; margin-top: 112px; background: var(--rule); }
.splash-leg { transform-box: fill-box; transform-origin: 30% 0; animation: splash-step 0.26s ease-in-out infinite alternate; }
.splash-leg.b { animation-delay: -0.26s; }
.splash-body { animation: splash-bob 0.13s ease-in-out infinite alternate; }
.splash-dust circle { fill: #d9ddd9; opacity: 0; transform-box: fill-box; transform-origin: center; animation: splash-dust 0.52s ease-out infinite; }
.splash-dust circle:nth-child(2) { animation-delay: 0.17s; }
.splash-dust circle:nth-child(3) { animation-delay: 0.34s; }
@keyframes splash-run {
  0% { transform: translateX(-70vw) rotate(8deg); }
  48% { transform: translateX(0) rotate(8deg); }
  56% { transform: translateX(0) translateY(-26px) rotate(-4deg); }
  64% { transform: translateX(0) translateY(0) rotate(0); }
  100% { transform: translateX(75vw) rotate(10deg); }
}
@keyframes splash-step { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
@keyframes splash-bob { to { transform: translateY(-3px); } }
@keyframes splash-dust { 0% { opacity: 0.9; transform: translate(0, 0) scale(0.5); } 100% { opacity: 0; transform: translate(-14px, -6px) scale(1.5); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* ── 다크 모드(사용자 2026-11-03). theme.js가 html[data-theme]를 자동(기기 설정)·라이트·다크로 정함 ──
   1) 색 변수만 바꾸면 대부분 따라감 2) style.css·이 파일에 색을 직접 쓴 곳(밝은 배경·테두리·차트 선)만 아래에서 덮음
   상품 사진·QR·연속 촬영 화면은 흰 바탕·검정 그대로 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #131517; --surface: #1b1e21; --mist: #24282c; --rule: #30353a;
  --ink: #e7e9eb; --ink-2: #c9cdd2; --muted: #9aa1a9; --faint: #727982;
  --accent: #3f9474; --accent-soft: #183128;
  --sold: #e0675c; --sold-soft: #3a1f1d; --amber: #d9a441; --amber-soft: #352a16;
  --peach: #3b2a22; --sienna: #f0b89c;
}
:root[data-theme="dark"] .brand-logo { filter: invert(0.9); }
:root[data-theme="dark"] .tab.is-planned { color: #5d646c; }
:root[data-theme="dark"] .btn-primary:hover, :root[data-theme="dark"] .primary-btn:hover { background: #4aa383; border-color: #4aa383; }
:root[data-theme="dark"] :is(.kpi:hover, .seg button:hover, button.act:hover, .payload, .set-day.is-blank, .pill-planned,
  .sheet th, .sheet .rownum, .sheet td input:disabled) { background: var(--mist); }
:root[data-theme="dark"] .kpi:hover { background: #2c3136; }
:root[data-theme="dark"] :is(.recent-row, .activity li + li, .planned-groups li, .sheet td, .data-table th, .data-table td, .user-row,
  .acct-table tr, .acct-ledger tbody + tbody tr:first-child > *, .cs-msg.is-bot p) { border-color: var(--rule); }
:root[data-theme="dark"] :is(.data-table tbody tr.is-warn, .attention button.is-err, .user-actions .delete-user-btn:hover) { background: var(--sold-soft); }
:root[data-theme="dark"] :is(.attention button, .acct-table tr.acct-manual) { background: var(--amber-soft); }
:root[data-theme="dark"] .field-note.is-warn { background: var(--amber-soft); color: var(--amber); border-color: #6b5020; }
:root[data-theme="dark"] .field-note.is-err { background: var(--sold-soft); color: var(--sold); border-color: #6b2a26; }
:root[data-theme="dark"] :is(.edit-bar, .cs-memo textarea) { border-color: #5a4a26; }
:root[data-theme="dark"] .cs { --cs-side: #181b1e; --cs-chat: #151719; --cs-info: #1b1e21; --cs-me: #1f3a31; }
:root[data-theme="dark"] .cs-row.is-unread { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
:root[data-theme="dark"] .age-m2 { background: #1b2a39; color: #7fb3e0; }
:root[data-theme="dark"] .age-m5 { background: var(--amber-soft); color: var(--amber); }
:root[data-theme="dark"] .age-m9 { background: #3a2618; color: #f09a5f; }
:root[data-theme="dark"] :is(.trend-chart .grid, .ana-plot .grid) { stroke: var(--rule); }
:root[data-theme="dark"] :is(.trend-chart .axis, .ana-plot .axis, .work-plot .axis) { stroke: #3d4349; }
:root[data-theme="dark"] .trend-chart rect:hover { fill: #6cc3a2; }
:root[data-theme="dark"] .photo-rate { --blank: #30353a; --unshot: #6b737b; }
:root[data-theme="dark"] .pie-ok { stroke: #30353a; background: #30353a; }
:root[data-theme="dark"] .toast { box-shadow: 0 6px 24px rgb(0 0 0 / 0.5); }
/* 라이트에서 "검정 바탕(--ink) + 흰 글자"였던 곳: 다크에선 바탕이 밝아지므로 글자를 어둡게 */
:root[data-theme="dark"] :is(.seg button.active, .scan-btn, .scan-mode-btn.active, .admin-tab.active, .cs-sort button[aria-pressed="true"], .hub-st-완료) { color: var(--canvas); }

/* 키보드 메뉴 이동(keynav.js): Alt만 누르면 상단 탭·리본 메뉴에 뜨는 글자·숫자(엑셀 KeyTips) */
#tabs a.tab, #ribbon .ribbon-item { position: relative; }
.keytip {
  position: absolute; left: 50%; bottom: 0; z-index: 5; transform: translateX(-50%);
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; background: var(--ink); color: var(--surface);
  font: 700 11px/18px var(--font); text-align: center; pointer-events: none; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); animation: ll-fade 120ms ease-out;
}

/* 서비스허브 PC 화면 꽉 차게(사용자 2026-11-04) — CS 화면과 같은 방식, 폰은 그대로 */
.container:has(> #view-hub:not([hidden])) { max-width: none; }

/* 오늘의 미션(missions.js): 상단 메뉴 아래 오른쪽 떠 있는 창, 접으면 알약. 폰은 오른쪽 아래
   접기·펴기 = 폭(interpolate-size로 auto까지)·높이(grid 0fr↔1fr)·꺾쇠 회전·항목 차례로 내려옴, 남은 수 바뀌면 배지 튕김 */
.missions {
  position: fixed; top: calc(var(--stick-top, 0px) + 12px); right: 16px; z-index: 60; width: 252px; interpolate-size: allow-keywords;
  border: 1px solid var(--rule); border-radius: 22px; background: var(--surface); box-shadow: 0 8px 28px rgb(0 0 0 / 0.12); overflow: hidden;
  animation: ll-rise var(--t-mid) var(--ease-out);
  transition: width 0.28s var(--ease-out), border-radius 0.28s var(--ease-out), box-shadow 0.2s ease;
}
.missions.is-open { border-radius: var(--radius-m); }
.missions:not(.is-open) { width: auto; }
.missions:not(.is-open):hover { box-shadow: 0 10px 30px rgb(0 0 0 / 0.16); }
.missions-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px 10px 14px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; text-align: left; white-space: nowrap; cursor: pointer; }
.missions-head:hover { background: var(--mist); }
.missions-title { flex: 1; }
.missions-n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--sold); color: #fff; font-size: 12.5px; line-height: 24px; text-align: center; font-variant-numeric: tabular-nums; transition: background-color 0.28s ease; }
.missions.is-done .missions-n { background: var(--accent); }
.missions-n.is-bump { animation: missions-bump 0.42s var(--ease-out); }
.missions-chev { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.28s var(--ease-out); }
.missions.is-open .missions-chev { transform: rotate(180deg); }
.missions-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s var(--ease-out); }
.missions.is-open .missions-body { grid-template-rows: 1fr; }
.missions-inner { min-height: 0; overflow: hidden; }
.missions-list { margin: 0; padding: 4px 6px 8px; border-top: 1px solid var(--rule); list-style: none; }
/* 펼칠 때 항목이 위에서부터 하나씩(stagger, 사용자 2026-11-04) — 접을 땐 한꺼번에 빨리 */
.missions-list li { opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.12s ease, transform 0.12s ease; }
.missions.is-open .missions-list li { opacity: 1; transform: none; transition: opacity 0.3s ease, transform 0.38s var(--ease-out); transition-delay: calc(90ms + var(--i, 0) * 55ms); }
.missions-note { transition: opacity 0.3s ease; opacity: 0; }
.missions.is-open .missions-note { opacity: 1; transition-delay: 0.35s; }
.missions-list a { display: flex; justify-content: space-between; gap: 12px; padding: 8px; border-radius: var(--radius-s); color: var(--ink); font-size: 13.5px; text-decoration: none; transition: background-color var(--t-fast) var(--ease-out); }
.missions-list a:hover { background: var(--mist); }
.missions-list a.is-zero { color: var(--faint); }
.missions-list b { font-variant-numeric: tabular-nums; }
.missions-note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 12.5px; }
@keyframes missions-bump { 40% { transform: scale(1.25); } }
/* 끌어서 옮기기(missions.js): 머리가 손잡이, 끄는 중엔 그림자 크게 */
.missions-head { cursor: grab; touch-action: none; user-select: none; }
.missions-head:active { cursor: grabbing; }
.missions.is-dragging { box-shadow: 0 16px 40px rgb(0 0 0 / 0.22); transition: none; }
@media (max-width: 720px) { .missions { top: auto; bottom: 16px; right: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .missions, .missions-body, .missions-chev, .missions-list li { animation: none; transition: none; }
  .missions-n.is-bump { animation: none; }
}
/* 계정 화면 부서·업무(admin.js) */
#userList .duty-chips { display: flex; flex: 1 1 100%; flex-wrap: wrap; gap: 6px 16px; }
#userList .duty-chip { display: inline-flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; color: var(--ink); font-size: 13px; cursor: pointer; }
#userList .duty-check { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }

/* 서비스허브 덧붙임(hubextra.js): 상담 창 맨 위 같은 고객 이력 카드, 목록·카드의 지금 단계 대기(기준 넘으면 노랑·빨강) */
.hx-card { display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-m); background: var(--mist); font-size: 13px; line-height: 1.55; }
.hx-line { margin: 0; color: var(--ink); }
.hx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.hx-head b { font-size: 14px; }
.hx-head span { color: var(--muted); }
.hx-k { display: inline-block; min-width: 64px; margin-right: 6px; color: var(--muted); }
.hx-wait { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.hx-wait.is-warn { background: var(--amber-soft); color: var(--amber); }
.hx-wait.is-late { background: var(--sold-soft); color: var(--sold); }
td .hx-wait { display: table; margin: 4px auto 0; background: var(--mist); } /* PC 표 = 상태 칸 가운데 정렬에 맞춤 */
/* 모바일 카드 = 상태·대기 둘 다 오른쪽 끝 고정(사용자 2026-11-04: 대기 표시 길이에 따라 상태 위치가 바뀌고 왼쪽으로 쏠림 — 공통 표 규칙이 text-align을 left로 덮음) */
@media (max-width: 900px) {
  .hub-table td.hub-c-st { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
  .hub-table td.hub-c-st .hx-wait { margin: 0; }
}
td .hx-wait.is-warn { background: var(--amber-soft); }
td .hx-wait.is-late { background: var(--sold-soft); }

/* 상품 송신 "사방넷 부가정보 칸" 창 제목 h3 → h2(화면 h1 다음 단계 건너뜀, 디자인 검사) — 모양은 .hub-dlg-head h3과 같게 */
.hub-dlg-head h2 { margin: 0; font-size: 18px; }
/* 구매 상담 가격(hubextra.js): 카드가·현금가·할인 하한, 제시가가 하한보다 낮으면 입력칸 테두리(현금 하한 아래 빨강, 카드 하한만 아래 노랑) */
.hx-buy { display: grid; gap: 2px; margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 13px; }
.hx-buy p { margin: 0; }
.hx-buy b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hx-buy small { margin-left: 8px; color: var(--muted); }
input.hx-low { border-color: var(--sold) !important; box-shadow: 0 0 0 2px var(--sold-soft); }
input.hx-low-card { border-color: var(--amber) !important; box-shadow: 0 0 0 2px var(--amber-soft); }

/* 서비스허브 목록(사용자 2026-11-04): 제목부터 고정 헤더 · 필터 줄 · 상태 탭을 옮기면 목록이 그쪽에서 밀려 들어옴 · 등록일 칸
   제목(.page-head)은 맨 위(--stick-top), 상태 탭·툴바·필터(.hub-sticky)는 제목 높이(--hub-head, hub.js가 잼) 아래에 붙음 */
#view-hub > .page-head { position: sticky; top: var(--stick-top, 0px); z-index: 6; margin-bottom: 0; padding-top: 12px; padding-bottom: 14px; background: var(--canvas); }
#view-hub .hub-sticky { position: sticky; top: calc(var(--stick-top, 0px) + var(--hub-head, 0px)); z-index: 5; margin-bottom: 10px; padding-bottom: 2px; background: var(--canvas); box-shadow: 0 1px 0 var(--rule); }
#view-hub .hub-sticky .toolbar { margin-bottom: 8px; }
.hub-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-bottom: 8px; }
.hub-filters label, .hub-f-range { display: inline-flex; align-items: center; gap: 6px; }
.hub-f-k { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.hub-filters :is(input, select) { min-height: 34px; padding: 4px 8px; font-size: 13.5px; }
.hub-filters input[name="cust"] { width: 120px; }
.hub-f-reset { margin-left: auto; }
.hub-ftoggle { display: none; }
.hub-table th:nth-child(9) { width: 112px; }
.hub-c-when { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hub-c-when .cell-sub { display: block; }
.hub-list.is-slide-next { animation: hub-slide-in 0.3s var(--ease-out); --from: 28px; }
.hub-list.is-slide-prev { animation: hub-slide-in 0.3s var(--ease-out); --from: -28px; }
@keyframes hub-slide-in { from { opacity: 0; transform: translateX(var(--from)); } }
/* 사진: PC에서 끌어다 놓기·붙여넣기 안내는 마우스 쓰는 기기에서만, 끌고 오는 동안 창 테두리 */
.hub-drop-hint { display: none; flex-basis: 100%; }
@media (hover: hover) and (pointer: fine) { .hub-drop-hint { display: block; } }
#hubForm.is-drop { outline: 2px dashed var(--accent); outline-offset: -8px; border-radius: var(--radius-m); background: var(--accent-soft); }
@media (max-width: 900px) {
  #view-hub > .page-head { padding-top: 8px; padding-bottom: 10px; }
  #view-hub > .page-head .page-sub { display: none; } /* 폰: 고정 헤더를 낮게 */
  .hub-ftoggle { display: inline-flex; }
  .hub-filters { display: none; padding-top: 4px; }
  .hub-filters.is-open { display: flex; }
  .hub-filters label { flex: 1 1 140px; }
  .hub-filters label :is(input, select) { flex: 1; width: auto; min-width: 0; }
  .hub-f-reset { margin-left: 0; }
  .hub-table tbody tr { grid-template-areas: "code kind st" "prod prod prod" "cust cust cust" "money money money" "cs cs owner" "when when when"; }
  .hub-table td.hub-c-when { grid-area: when; display: flex; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
  .hub-c-when::before { content: '등록 '; }
  .hub-c-when .cell-sub { display: inline; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .hub-list { animation: none !important; } }

/* ===== 폰 드로어(drawer.js, 사용자 2026-11-04): 720px 이하 = ☰ · 로고 · [상담등록]만 머리에, 대메뉴·소메뉴·나머지 버튼은 왼쪽 드로어 ===== */
.drawer-btn { display: none; }
/* 뒤로 버튼(폰·PC 공통, 사용자 2026-11-05) */
.back-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; margin-right: 4px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
.back-btn[hidden] { display: none; }
.back-btn:hover, .back-btn:active { background: var(--mist); }
.back-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) {
  /* 로고 위 여백(사용자: 너무 붙음) — 앱 창은 상태표시줄 높이만큼 더 */
  .topbar { flex-wrap: nowrap; gap: 6px; padding: max(12px, env(safe-area-inset-top)) 12px 10px 8px; }
  .brand { line-height: 1; }
  .brand-logo { height: 28px; }
  .drawer-btn { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; }
  .drawer-btn:active { background: var(--mist); }
  .drawer-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .chrome .tabs, .chrome .ribbon { display: none; }
  .topbar-right { margin-left: auto; flex-wrap: nowrap; }
  /* 담당자 알림 숫자: 탭이 드로어로 들어가서 ☰ 위에 */
  html[data-hub-n] .drawer-btn { position: relative; }
  html[data-hub-n] .drawer-btn::after { content: counter(hubn); position: absolute; top: 2px; right: 0; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sold); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
}
dialog.drawer { interpolate-size: allow-keywords; position: fixed; inset: 0 auto 0 0; display: none; flex-direction: column; width: min(86vw, 340px); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0 var(--radius-l) var(--radius-l) 0; background: var(--surface); color: var(--ink); box-shadow: 8px 0 32px rgb(0 0 0 / 0.18); overflow: hidden; }
dialog.drawer[open] { display: flex; animation: drawer-in 0.34s var(--ease-out); }
dialog.drawer::backdrop { background: rgb(12 14 18 / 0.45); }
dialog.drawer.is-closing { animation: drawer-out 0.22s cubic-bezier(0.4, 0, 1, 1) forwards; }
dialog.drawer.is-closing::backdrop { animation: drawer-fade 0.22s ease forwards; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@keyframes drawer-out { to { transform: translateX(-100%); } }
@keyframes drawer-fade { to { opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 8px 10px 18px; border-bottom: 1px solid var(--rule); }
.drawer-head .brand-logo { height: 26px; }
.drawer-head b { font-size: 17px; }
.drawer-x { width: 42px; height: 42px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.drawer-x:active { background: var(--mist); }
.drawer-nav, .drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 12px; outline: none; }
/* 대메뉴 = 접고 펴는 칸(한 번에 하나) */
.drawer-sec + .drawer-sec { border-top: 1px solid var(--rule); }
.drawer-sec summary { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 10px; list-style: none; font-size: 16px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.drawer-sec summary::-webkit-details-marker { display: none; }
.drawer-sec summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: translateY(-2px) rotate(45deg); transition: transform 0.24s var(--ease-out); }
.drawer-sec[open] summary { color: var(--accent); }
.drawer-sec[open] summary::after { border-color: var(--accent); transform: translateY(2px) rotate(-135deg); }
.drawer-sec summary small { padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--faint); font-size: 11px; font-weight: 500; }
.drawer-sec.is-planned summary { color: var(--faint); font-weight: 500; }
.drawer-sec::details-content { block-size: 0; overflow: hidden; transition: block-size 0.28s var(--ease-out), content-visibility 0.28s allow-discrete; }
.drawer-sec[open]::details-content { block-size: auto; }
.drawer-groups { padding: 0 0 10px; }
.drawer-cap { margin: 8px 10px 2px; color: var(--faint); font-size: 12px; }
.drawer-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 10px 0 12px; border: 0; border-radius: var(--radius-s); background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.drawer-item svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.drawer-item:active { background: var(--mist); }
.drawer-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.drawer-item.is-active svg { color: var(--accent); }
.drawer-item.is-planned { color: var(--faint); cursor: default; }
.drawer-item .pill { margin-left: auto; }
html[data-hub-n] .drawer-item[href="#hub"]::after { content: counter(hubn); margin-left: auto; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--sold); color: #fff; font-size: 11.5px; font-weight: 700; }
/* 드로어 아래 = 상단에서 옮겨 온 버튼들(접속자·앱 설치·테마·알림·내 계정·로그아웃) */
.drawer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--canvas); }
.drawer-tools:empty { display: none; }
/* 사용자 2026-11-05: 맨 위 "접속 · 이름" 양쪽 맞춤 → (업데이트·앱 설치는 한 줄씩) → 맨 아래 한 줄 = 테마·알림 설정·내 계정·로그아웃 */
#drawerTools .who { order: -2; display: flex; justify-content: space-between; align-items: baseline; flex-basis: 100%; color: var(--muted); font-size: 13px; }
#drawerTools .who b { color: var(--ink); font-size: 14px; }
#drawerTools :is(#appUpdate, .logout-btn:not(#logoutBtn)) { order: -1; flex-basis: 100%; justify-content: center; }
#drawerTools :is(.notify-bell, .admin-link, #logoutBtn) { display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 0; height: 40px; padding: 0 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; white-space: nowrap; text-decoration: none; }
#drawerTools .notify-bell svg { display: none; }
#drawerTools #notifyBtn::after { content: "알림 설정"; }
#drawerTools .theme-btn::after { content: "테마"; }
/* CS 상담 보관함 드로어(900px 이하): 폴더를 다시 세로 목록으로(style.css 폰 알약 줄 덮음) */
.cs-drawer-btn { display: none; }
@media (max-width: 900px) {
  .cs-drawer-btn { display: inline-flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; height: 40px; justify-content: flex-start; }
  .cs-drawer-btn svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .cs-drawer-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
#csDrawerBody .cs-folders { display: flex; flex-direction: column; gap: 14px; }
#csDrawerBody .cs-group { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
#csDrawerBody .cs-group-title { display: flex; }
#csDrawerBody .cs-folder { width: 100%; height: 44px; padding: 0 10px; border: 0; border-radius: var(--radius-s); background: none; font-size: 15px; }
#csDrawerBody .cs-folder-label { overflow: hidden; }
#csDrawerBody .cs-side-foot { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 16px; padding: 14px 4px 0; border-top: 1px solid var(--rule); }
#csDrawerBody .cs-side-foot small { display: block; }
@media (prefers-reduced-motion: reduce) {
  dialog.drawer[open], dialog.drawer.is-closing, dialog.drawer.is-closing::backdrop { animation: none; }
  .drawer-sec::details-content, .drawer-sec summary::after { transition: none; }
}

/* ===== CS 보관함 분류 구분(사용자 2026-11-04): 묶음마다 선으로 나누고, 유입·팀·담당은 제목·고른 폴더를 묶음 색으로 ===== */
:root { --g-in: #2b6a90; --g-team: #8a5f08; --g-ppl: #6a4fa3; }
:root[data-theme="dark"] { --g-in: #86bde0; --g-team: #e2b866; --g-ppl: #bba6e6; }
.cs-group { --g: var(--accent); }
.cs-group[aria-labelledby="csGInbound"] { --g: var(--g-in); }
.cs-group[aria-labelledby="csGTeam"] { --g: var(--g-team); }
.cs-group[aria-labelledby="csGPeople"] { --g: var(--g-ppl); }
.cs-folders > .cs-group + .cs-group { padding-top: 14px; border-top: 1px solid var(--rule); }
.cs-group-title { display: flex; align-items: center; gap: 7px; color: var(--g); font-weight: 700; }
.cs-group-title::before { content: ""; flex: none; width: 4px; height: 13px; border-radius: 2px; background: var(--g); }
.cs-group[aria-labelledby] .cs-folder .cs-ico { color: color-mix(in srgb, var(--g) 65%, var(--faint)); }
.cs-group .cs-folder[aria-pressed="true"] { background: color-mix(in srgb, var(--g) 13%, var(--surface)); color: var(--g); box-shadow: inset 3px 0 0 var(--g); }
.cs-group .cs-folder[aria-pressed="true"] :is(.cs-ico, .cs-count) { color: var(--g); }

/* ===== 당겨서 새로고침 — 슬롯머신 레버(ptr.js, 사용자 2026-11-04) ===== */
@media (pointer: coarse) { html, body { overscroll-behavior-y: contain; } }
.ptr { --ptr-d: 0px; --ptr-p: 0; position: fixed; top: 0; left: 50%; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: max(10px, env(safe-area-inset-top)); transform: translate(-50%, calc(var(--ptr-d) - 100%)); pointer-events: none; }
.ptr:not(.is-pull):not(.is-spin) { transition: transform 0.3s var(--ease-out); }
.ptr-machine { position: relative; padding: 6px 7px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 20px rgb(0 0 0 / 0.14); }
.ptr-reels { display: flex; gap: 4px; }
.ptr-reel { display: block; width: 24px; height: 30px; overflow: hidden; border-radius: 6px; background: var(--mist); box-shadow: inset 0 3px 4px rgb(0 0 0 / 0.08), inset 0 -3px 4px rgb(0 0 0 / 0.08); }
.ptr-strip { display: flex; flex-direction: column; }
.ptr-strip i { display: grid; place-items: center; height: 30px; color: var(--ink); font-size: 17px; font-style: normal; font-weight: 800; }
.ptr-strip i:first-child, .ptr-strip i:last-child { color: var(--accent); }
/* 당기는 만큼 릴이 살짝 굴러감, 놓으면 빠르게 돌다(is-spin) 차례로 L에 멈춤(is-win) */
.ptr.is-pull .ptr-strip { transform: translateY(calc(var(--ptr-p) * -30px)); }
.ptr.is-spin .ptr-strip { animation: ptr-spin 0.16s linear infinite; }
.ptr.is-spin .ptr-reel:nth-child(2) .ptr-strip { animation-duration: 0.13s; }
.ptr.is-spin .ptr-reel:nth-child(3) .ptr-strip { animation-duration: 0.19s; }
.ptr.is-win .ptr-strip { animation: ptr-stop 0.34s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.ptr.is-win .ptr-reel:nth-child(2) .ptr-strip { animation-delay: 0.08s; }
.ptr.is-win .ptr-reel:nth-child(3) .ptr-strip { animation-delay: 0.16s; }
@keyframes ptr-spin { from { transform: translateY(0); } to { transform: translateY(-120px); } }
@keyframes ptr-stop { from { transform: translateY(-36px); } to { transform: translateY(0); } }
/* 레버: 기계 오른쪽 축에서 손잡이 공이 당기는 만큼 앞으로·아래로 넘어옴, 놓으면 튕겨 돌아감 */
.ptr-lever { position: absolute; top: 50%; left: 100%; width: 8px; height: 12px; margin-top: -6px; border-radius: 0 4px 4px 0; background: var(--ink-2); }
.ptr-stick { position: absolute; bottom: 6px; left: 3px; width: 3px; height: 28px; border-radius: 2px; background: var(--muted); transform-origin: 50% 100%; transform: perspective(120px) rotateX(calc(var(--ptr-p) * 160deg)); }
.ptr-stick::before { content: ""; position: absolute; top: -9px; left: -5px; width: 13px; height: 13px; border-radius: 50%; background: var(--sold); box-shadow: inset -2px -2px 0 rgb(0 0 0 / 0.18); }
.ptr.is-spin .ptr-stick { transform: none; transition: transform 0.45s cubic-bezier(0.3, 1.7, 0.5, 1); }
.ptr-msg { margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.08); }
@media (prefers-reduced-motion: reduce) {
  .ptr, .ptr-stick, .ptr.is-spin .ptr-stick { transition: none !important; }
  .ptr.is-spin .ptr-strip, .ptr.is-win .ptr-strip { animation: none; }
}
/* 서비스허브 탭을 처음 누를 때 새 목록이 오기 전까지 흐리게(hub.js load) */
.hub-list { transition: opacity 0.15s ease; }
.hub-list.is-wait { opacity: 0.45; pointer-events: none; }

/* ===== 드로어 끌기(drawer.js, 사용자 2026-11-04): 손가락을 따라 --dx만큼 옮김, 놓으면 제자리·끝까지 미끄러짐 ===== */
dialog.drawer { touch-action: pan-y; transform: translateX(var(--dx, 0px)); transition: transform 0.24s var(--ease-out); }
dialog.drawer.is-drag { transition: none; user-select: none; }
/* 손잡이로 끄는 중(창 밖을 막지 않는 show) — 바탕 어둡게는 끈 만큼 */
dialog.drawer.is-peek { z-index: 70; box-shadow: 0 0 0 100vmax rgb(12 14 18 / calc(var(--k, 0) * 0.45)), 8px 0 32px rgb(0 0 0 / 0.18); }
dialog.drawer.is-peek[open]:not(.is-closing) { animation: none; } /* 끌어서 연 창은 다시 미끄러져 들어오지 않음(닫을 때 움직임은 그대로) */
/* CS 보관함 드로어 = 메뉴 드로어의 반 폭 */
#csDrawer { width: min(52vw, 210px); }
#csDrawer .drawer-head { padding-left: 14px; }
#csDrawerBody .cs-folder { gap: 8px; padding: 0 8px; font-size: 14px; }
/* 숫자가 있는 폴더: 숫자에 바탕색(묶음 색), 고른 폴더는 진하게 */
.cs-count:not(:empty) { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--g, var(--accent)) 14%, var(--surface)); color: var(--g, var(--accent)); font-weight: 700; text-align: center; line-height: 1.3; }
.cs-group .cs-folder[aria-pressed="true"] .cs-count:not(:empty) { background: var(--g); color: var(--surface); }
/* 커튼 손잡이: "상담" 왼쪽 화면 끝에 붙은 탭(900px 이하) — 누르거나 오른쪽으로 끌면 보관함 */
.cs-pull { display: none; }
@media (max-width: 900px) {
  .cs-pull { position: relative; display: block; flex: none; align-self: stretch; width: 22px; min-height: 46px; margin: -10px 0 -10px -12px; padding: 0; border: 0; border-radius: 0 12px 12px 0; background: var(--accent); color: #fff; cursor: grab; touch-action: none; animation: cs-pull-nudge 0.9s var(--ease-out) 0.5s 2; }
  .cs-pull::before { content: ""; position: absolute; top: 50%; left: 8px; width: 2px; height: 16px; margin-top: -8px; border-radius: 1px; background: currentColor; box-shadow: 4px 0 0 currentColor; opacity: 0.85; }
  .cs-pull::after { content: ""; position: absolute; top: 50%; right: -7px; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; border-left-color: var(--accent); }
  .cs-pull:active { cursor: grabbing; filter: brightness(1.1); }
}
@keyframes cs-pull-nudge { 30% { transform: translateX(6px); } 60% { transform: translateX(-1px); } }
@media (prefers-reduced-motion: reduce) {
  dialog.drawer { transition: none; }
  .cs-pull { animation: none; }
}

/* ===== 오늘의 미션 숨기기(missions.js, 사용자 2026-11-04): [숨기기] → 오른쪽 아래 숫자 배지만, 누르면 다시 펼침 ===== */
.missions-hide { display: flex; align-items: baseline; gap: 6px; width: 100%; margin: 0; padding: 9px 14px 11px; border: 0; border-top: 1px solid var(--rule); background: none; color: var(--muted); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.missions-hide small { color: var(--faint); font-size: 11.5px; }
.missions-hide:hover { background: var(--mist); color: var(--ink); }
.missions.is-hidden { top: auto !important; left: auto !important; right: 16px !important; bottom: calc(16px + env(safe-area-inset-bottom)) !important; width: auto; border-radius: 999px; animation: missions-pop 0.32s var(--ease-out); }
.missions.is-hidden .missions-head { padding: 6px; cursor: pointer; }
.missions.is-hidden :is(.missions-title, .missions-chev, .missions-body) { display: none; }
.missions.is-hidden .missions-n { min-width: 34px; height: 34px; border-radius: 17px; font-size: 14px; line-height: 34px; }
@keyframes missions-pop { from { opacity: 0; transform: scale(0.6); } }
@media (prefers-reduced-motion: reduce) { .missions.is-hidden { animation: none; } }

/* ===== 재고조회 필터(app.js, 사용자 2026-11-04): 전부 [필터] 버튼 안에, 바코드 옆 — 누르면 아래로 펼침 ===== */
#stockFilterBtn { position: relative; border-color: var(--rule); background: var(--surface); color: var(--ink); } /* 바코드(검은 버튼) 옆 흰 버튼 — 다크 모드 공통 규칙보다 우선 */
#stockFilterBtn[aria-expanded="true"], .orders-filter-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.orders-filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.stock-filters > .toolbar { min-height: 0; margin-bottom: 0; overflow: hidden; } /* 주문수집 필터 펼침(재고조회와 같은 방식) */
.stock-filter-n:not(:empty) { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--surface); font-size: 11.5px; line-height: 20px; text-align: center; }
.stock-filters { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s var(--ease-out); }
.stock-filters.is-open { grid-template-rows: 1fr; }
.stock-filters > .controls { min-height: 0; margin-bottom: 0; overflow: hidden; }
.stock-filters.is-open > .controls { margin-bottom: 12px; }
.stock-filters.is-shown > .controls { overflow: visible; } /* 다 펼친 뒤엔 여러 개 고르기 목록이 밖으로 나옴 */
@media (prefers-reduced-motion: reduce) { .stock-filters { transition: none; } }
