/* LOUNGE-L 운영 — 명품 리세일 매장 백오피스.
   조용한 장부 톤 + 딥그린 하나, 눈에 띄는 건 재고 행택(.stock-tag) 하나뿐. */
:root {
  color-scheme: light;
  --ink: #1d2733;          /* 상단바, 본문 글자 */
  --ink-2: #2a3644;        /* 상단바 hover */
  --canvas: #edf0ee;       /* 페이지 바탕 */
  --surface: #ffffff;
  --rule: #d6dcd9;
  --muted: #5e6a72;
  --faint: #8a949a;
  --accent: #2f6b57;       /* 금고색 딥그린 */
  --accent-soft: #e3eee9;
  --sold: #b23a30;
  --sold-soft: #f8e7e5;
  --amber: #8a5f08;
  --amber-soft: #fbf1dc;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --stick-top: 0px;        /* app.js가 상단 크롬 높이로 채움 */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--canvas);
  color: var(--ink);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, select, input { touch-action: manipulation; -webkit-tap-highlight-color: rgba(47, 107, 87, 0.15); }
h1, h2, h3 { text-wrap: balance; }
.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }
main:focus { outline: none; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===== 상단 크롬: 상단바(탭) + 리본 ===== */
.chrome { position: sticky; top: 0; z-index: 20; }
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  padding: 0 20px;
  background: var(--ink);
  color: #e8edf0;
}
.brand {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { font-weight: 400; color: #a9b6bf; margin-left: 4px; }
.topbar h1 { font-size: 16px; margin: 0; font-weight: 700; color: #fff; white-space: nowrap; }

.tabs {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: #c3ccd2;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.tab:hover { color: #fff; background: var(--ink-2); }
.tab[aria-current="page"] { color: #fff; font-weight: 600; }
.tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #7fc4a8;
}
/* 미개발 탭: 흐리게 + 빈 원 표시 */
.tab.is-planned { color: #8796a1; }
.tab.is-planned::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
}
.who { color: #c3ccd2; white-space: nowrap; }
.who b { color: #fff; font-weight: 600; }
.admin-link { color: #c3ccd2; text-decoration: none; white-space: nowrap; }
.admin-link:hover { color: #fff; }
.admin-badge { color: #c3ccd2; white-space: nowrap; }
.logout-btn {
  padding: 5px 12px;
  border: 1px solid #45525f;
  border-radius: 999px;
  background: none;
  color: #e8edf0;
  font-size: 12px;
  white-space: nowrap;
}
.logout-btn:hover { border-color: #8796a1; }
/* 상단 [수기작성] 바로가기: 손님이 오면 어느 화면에서든 한 번에(머리에서 유일한 색 버튼) */
/* [상담등록] = [업데이트]와 같은 클레이 짝(사용자 2026-11-05): 초록 그라데이션 + 안쪽 빛·그늘 + 아래 그림자, 움직임은 올림·누름 때만 */
.quick-new { --clay-hi: rgb(255 255 255 / 0.4); --clay-lo: rgb(0 30 20 / 0.4); --clay-drop: rgb(20 60 45 / 0.45); display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 13px 0 10px; border-radius: 14px; background: linear-gradient(135deg, #3d8669 0%, #2f6b57 55%, #22513f 100%); color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: inset 2px 3px 4px var(--clay-hi), inset -3px -4px 7px var(--clay-lo), 0 7px 14px -6px var(--clay-drop); transition: transform 0.15s ease, translate 0.2s ease, box-shadow 0.2s ease; }
.quick-new svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.quick-new:hover { translate: 0 -1px; box-shadow: inset 2px 3px 4px var(--clay-hi), inset -3px -4px 7px var(--clay-lo), 0 10px 18px -6px var(--clay-drop); }
.quick-new:active { translate: 0 1px; transform: scale(0.96, 0.92); box-shadow: inset 3px 4px 8px var(--clay-lo), inset -2px -2px 4px var(--clay-hi), 0 3px 6px -3px var(--clay-drop); }
.quick-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) {
  .quick-new { height: 34px; padding: 0 12px 0 10px; }
  /* 폰: 머리 오른쪽 버튼(앱 설치·상담등록·테마·알림·내 계정·로그아웃)이 한 줄을 넘으면 아래 줄로(가로 스크롤 생기던 것) */
  .topbar-right { flex-shrink: 1; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-new { transition: none; }
}
/* 알림 설정(notify.js): 상단 종 → 창. 이 기기 알림 / 기능별 종류 스위치 / 소리·진동. 폰은 아래에서 올라오는 시트 */
.notify-bell { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; }
.notify-bell svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notify-bell:hover { border-color: var(--ink-2); color: var(--ink); }
.notify-bell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify-dlg { width: min(96vw, 440px); max-height: 88vh; padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); }
.notify-dlg::backdrop { background: rgba(23, 25, 28, 0.4); }
.notify-dlg h3 { margin: 0 0 12px; font-size: 18px; }
.notify-device { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--mist); font-size: 13.5px; line-height: 1.5; }
.notify-device.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.notify-device small { font-weight: 400; color: var(--muted); }
.notify-device .btn { margin-left: auto; }
.notify-group { margin: 0 0 12px; padding: 8px 0 0; border: 0; border-top: 1px solid var(--rule); }
.notify-group legend { padding: 0 8px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.notify-group.is-focus legend { color: var(--accent); }
.notify-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 46px; font-size: 14px; cursor: pointer; }
.notify-row b { font-weight: 500; }
.notify-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.notify-row input { flex: none; position: relative; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--rule); appearance: none; cursor: pointer; transition: background 0.15s ease; }
.notify-row input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.notify-row input:checked { background: var(--accent); }
.notify-row input:checked::after { transform: translateX(18px); }
.notify-row input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify-help { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.notify-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 720px) {
  .notify-bell { width: 34px; height: 34px; }
  .notify-dlg { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--radius-l) var(--radius-l) 0 0; }
  .notify-actions .btn { flex: 1; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .notify-row input, .notify-row input::after { transition: none; }
}

/* 리본: 탭별 기능 묶음 */
.ribbon {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 66px;
  padding: 6px 12px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.ribbon-group {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  border-right: 1px solid var(--rule);
}
.ribbon-group:last-child { border-right: 0; }
.ribbon-items { display: flex; gap: 2px; flex: 1; }
.ribbon-caption {
  padding: 2px 0 5px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}
.ribbon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-s);
  background: none;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.ribbon-item:hover { background: var(--canvas); }
.ribbon-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ribbon-item.is-planned { color: var(--faint); }
.ribbon-item svg { width: 20px; height: 20px; }

.pill {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}
.pill-planned { background: #eceff0; color: var(--muted); }
.pill-first { background: var(--amber-soft); color: var(--amber); }
.pill-done { background: var(--accent-soft); color: var(--accent); }
.pill-sold { background: var(--sold-soft); color: var(--sold); }

/* ===== 본문 ===== */
.container { max-width: 1240px; margin: 0 auto; padding: 20px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.last-sync-label { color: var(--muted); font-size: 12px; }

/* ----- 대시보드 ----- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  overflow: hidden;
  margin-bottom: 20px;
}
.kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px 16px;
  border: 0;
  background: var(--surface);
  text-align: left;
}
.kpi:hover { background: #f6f8f7; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 30px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 12px; color: var(--faint); }
.kpi.is-warn .kpi-value { color: var(--sold); }
.kpi.is-good .kpi-value { color: var(--accent); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: 16px 18px;
  min-width: 0;
}
.panel h2 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.panel .page-sub { margin-bottom: 12px; }

.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #edf0ee;
}
.recent-row:first-child { border-top: 0; }
.recent-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-s);
  background: var(--canvas);
  object-fit: cover;
}
.recent-name { font-weight: 500; overflow-wrap: anywhere; }
.recent-meta { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.recent-side { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }

.dash-grid-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 20px; }
.dash-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }

/* ----- 운영 대시보드 ----- */
.dash-head { flex-wrap: wrap; gap: 12px; }
.dash-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-custom { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.dash-custom input { height: 34px; padding: 0 6px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; }
.dash-sync { margin: -6px 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); overflow: hidden; }
.seg button { height: 32px; padding: 0 11px; border: 0; border-left: 1px solid var(--rule); background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--ink); background: #f6f8f7; }
.seg button.active { background: var(--ink); color: #fff; }
.kpi.is-static { cursor: default; }
.kpi.is-static:hover { background: var(--surface); }
.kpi-value small { margin-left: 3px; font-size: 14px; font-weight: 500; color: var(--muted); }
.delta { font-weight: 600; color: var(--muted); }
.delta.up { color: var(--accent); }
.delta.down { color: var(--sold); }
.delta-base { color: var(--faint); }
.kpis-mini { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.kpis-mini button { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.kpis-mini button:hover { border-color: var(--accent); color: var(--ink); }
.kpis-mini b { color: var(--ink); font-size: 15px; }
.kpis-mini small { font-size: 12px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trend-panel { margin-bottom: 20px; }
.trend-chart { position: relative; height: 230px; margin-top: 6px; }
.trend-chart svg { width: 100%; height: 100%; display: block; }
.trend-chart rect { fill: var(--accent); }
.trend-chart rect:hover { fill: #1f4d3e; }
.bar-day { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; pointer-events: none; }
.trend-chart .grid { stroke: var(--rule); stroke-dasharray: 3 4; }
.trend-chart .axis { stroke: var(--rule); }
.trend-max { position: absolute; top: 0; right: 4px; font-size: 12px; color: var(--muted); }
/* 매출 추이 막대 위 그날 합계 (촘촘하면 숨김) */
.bar-val { position: absolute; transform: translate(-50%, -3px); font-size: 10.5px; font-weight: 600; line-height: 1; color: var(--ink); white-space: nowrap; pointer-events: none; }
.bar-val.is-minus { color: var(--sold); }
.trend-chart.is-dense .bar-val { display: none; }
/* 매출 추이 맨 위: 기간 합계 금액·수량·건수 */
.trend-top { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.trend-stat { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--muted); }
.trend-stat b { font-size: 20px; font-weight: 600; color: var(--ink); }
.trend-stat small { margin-left: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* ----- 대시보드 모션 (app.js revealDash: 화면에 들어오면 .is-in) ----- */
.dash-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.dash-reveal.is-in { opacity: 1; transform: none; }
/* KPI·작은 숫자: 칸은 그대로 두고 카드가 차례로(--i) 올라옴 */
#kpis.dash-reveal, #kpisMini.dash-reveal { opacity: 1; transform: none; }
#kpis.dash-reveal .kpi, #kpisMini.dash-reveal button { opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.15s; transition-delay: calc(var(--i, 0) * 70ms); }
#kpis.is-in .kpi, #kpisMini.is-in button { opacity: 1; transform: none; }
/* 매출 막대: 아래에서 위로 왼쪽부터 차례로(--t) */
.trend-panel.dash-reveal:not(.is-in) .trend-chart rect { transform: scaleY(0); }
.trend-panel.is-in .trend-chart 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); }
@keyframes dash-bar-grow { from { transform: scaleY(0); } }
/* 막대 위 숫자: 막대가 다 자란 뒤 나타남 */
.trend-panel.dash-reveal:not(.is-in) .bar-val { opacity: 0; }
.trend-panel.is-in .bar-val { animation: dash-val 0.35s ease both; animation-delay: calc(var(--t, 0s) + 0.45s); }
@keyframes dash-val { from { opacity: 0; transform: translate(-50%, 4px); } }
/* 비율·장기재고 막대는 늘어나고, 촬영 도넛은 채워지고, 등급 표시는 미끄러져 옴 */
#view-home .panel.is-in .share span, #view-home .panel.is-in .bar-fill { animation: dash-fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
@keyframes dash-fill { from { width: 0; } }
@property --a { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --b { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --d { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
#view-home .panel.is-in .donut { animation: dash-donut 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
@keyframes dash-donut { from { --a: 0%; --b: 0%; --d: 0%; } }
#view-home .panel.is-in .grade-mark { animation: dash-mark 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
@keyframes dash-mark { from { left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dash-reveal, #kpis.dash-reveal .kpi, #kpisMini.dash-reveal button { opacity: 1 !important; transform: none !important; }
  #view-home .bar-val { opacity: 1 !important; animation: none !important; }
  #view-home .trend-chart rect, #view-home .share span, #view-home .bar-fill, #view-home .donut, #view-home .grade-mark { animation: none !important; transform: none !important; }
}
.ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.op { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); text-align: left; font: inherit; color: inherit; }
button.op { cursor: pointer; }
button.op:hover { border-color: var(--accent); }
.op span { font-size: 12px; color: var(--muted); }
.op b { font-size: 20px; font-weight: 600; }
.op small { font-size: 12px; color: var(--faint); }
.op.is-warn b { color: var(--amber); }
.attention { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.attention button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--amber-soft); border-radius: var(--radius-s); background: #fffbf3; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.attention button:hover { border-color: var(--amber); }
.attention button.is-err { border-color: var(--sold-soft); background: #fff7f6; }
.att-mark { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: #fff; font-size: 12px; font-weight: 700; }
.is-err .att-mark { background: var(--sold); }
.att-go { margin-left: auto; flex: none; font-size: 12px; color: var(--muted); }
.group-table tbody tr[data-row] { cursor: pointer; }
.group-table tbody tr[data-row]:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.share { display: block; width: 100%; min-width: 80px; height: 8px; border-radius: 999px; background: var(--canvas); overflow: hidden; }
.share span { display: block; height: 100%; background: var(--accent); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li + li { border-top: 1px solid #edf0ee; }
.act { display: grid; grid-template-columns: 92px 76px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 2px; border: 0; background: none; font: inherit; font-size: 13.5px; color: inherit; text-align: left; }
button.act { cursor: pointer; }
button.act:hover { background: #f8faf9; }
.act-time { color: var(--muted); font-size: 12.5px; }
.act-type { justify-self: start; }
.act-body { display: flex; flex-direction: column; min-width: 0; }
.act-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--faint); }
.act-amt { font-weight: 600; }
@media (max-width: 720px) {
  .act { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .act-type { display: none; }
  .seg button { padding: 0 8px; }
}

/* 촬영완료율: 구간 색 g-bad <30 · g-low <50 · g-mid <80 · g-good <100 · g-full 100 */
.photo-rate {
  --g-bad: #b23a30; --g-low: #c46a0a; --g-mid: #2d6a9f; --g-good: #2f6b57; --g-full: #178a52;
  --unshot: #7d8a92; --check: #8b6bc2; --blank: #dde2df; --c: var(--g-good);
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px;
}
.photo-rate.g-bad { --c: var(--g-bad); } .photo-rate.g-low { --c: var(--g-low); } .photo-rate.g-mid { --c: var(--g-mid); }
.photo-rate.g-good { --c: var(--g-good); } .photo-rate.g-full { --c: var(--g-full); }
.donut {
  position: relative; flex: none; width: 168px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--c) 0 var(--a), var(--unshot) 0 var(--b), var(--check) 0 var(--d), var(--blank) 0);
}
.donut-hole {
  position: absolute; inset: 22px; border-radius: 50%; background: var(--surface);
  display: grid; place-content: center; justify-items: center; text-align: center; line-height: 1.2;
}
.donut-hole b { font-size: 30px; font-weight: 700; color: var(--c); }
.donut-hole small { font-size: 16px; }
.donut-hole span { font-size: 12px; color: var(--muted); }
.donut-hole .grade { margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-style: normal; font-weight: 600; color: #fff; background: var(--c); }
.photo-side { flex: 1; min-width: 200px; }
.legend { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.legend li.has-link { display: block; }
.legend li, .legend-link { display: grid; grid-template-columns: 14px 1fr auto 52px; align-items: center; gap: 8px; }
.legend-link { width: 100%; padding: 2px 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.legend-link:hover { color: var(--accent); text-decoration: underline; }
.legend b { font-weight: 600; } .legend span { color: var(--muted); text-align: right; }
.sw { width: 12px; height: 12px; border-radius: 3px; }
.sw-shot { background: var(--c); } .sw-unshot { background: var(--unshot); } .sw-check { background: var(--check); } .sw-blank { background: var(--blank); }
.grade-track {
  position: relative; height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--g-bad) 0 30%, var(--g-low) 30% 50%, var(--g-mid) 50% 80%, var(--g-good) 80% 100%);
}
.grade-mark { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.grade-ticks { position: relative; height: 16px; margin-top: 4px; font-size: 11px; color: var(--faint); }
.grade-ticks span { position: absolute; transform: translateX(-50%); }
.grade-ticks span:first-child { transform: none; }
.grade-ticks span:last-child { transform: translateX(-100%); }

/* 장기재고 구간 색 (재고 카드 뱃지도 같은 클래스) */
.age-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.age-m2 { color: #2d6a9f; background: #e4eef7; }
.age-m5 { color: #8a5f08; background: #fbf1dc; }
.age-m9 { color: #b4470c; background: #fde9dc; }
.age-m12 { color: #fff; background: #b23a30; }
.bar-fill.age-fill-m2 { background: #2d6a9f; } .bar-fill.age-fill-m5 { background: #c9921a; }
.bar-fill.age-fill-m9 { background: #d0621c; } .bar-fill.age-fill-m12 { background: #b23a30; }
.aging-total, .aging-row { width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.aging-total:hover, .aging-row:hover .aging-range { color: var(--accent); text-decoration: underline; }
.card-age { margin-top: 6px; }
.aging-total { display: block; margin: 0 0 14px; font-size: 14px; }
.aging-total b { font-size: 20px; font-weight: 700; }
.aging-total span { color: var(--muted); }
.aging-bars { gap: 12px; }
.bar-row.aging-row { grid-template-columns: 48px 76px minmax(0, 1fr) 64px; }
.aging-range { font-size: 12px; color: var(--muted); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 56px; align-items: center; gap: 10px; font-size: 13px; }
.bar-track { height: 10px; background: var(--canvas); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bar-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bar-num b { color: var(--ink); font-weight: 600; }

/* ----- 미개발 메뉴 페이지 ----- */
.planned-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.planned-groups ul { list-style: none; margin: 8px 0 0; padding: 0; }
.planned-groups li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #edf0ee;
}
.planned-groups li:first-child { border-top: 0; }

/* ----- 재고조회 ----- */
.search-bar {
  position: sticky;
  top: var(--stick-top);
  z-index: 10;
  display: flex;
  gap: 8px;
  margin: 0 -20px 12px;
  padding: 10px 20px;
  background: var(--canvas);
}
.search-input-wrap { position: relative; flex: 1; min-width: 0; }
#searchInput {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--surface);
  font-size: 16px;
}
#searchInput:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.clear-btn {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 20px;
}
.scan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-m);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.scan-btn:hover { background: var(--ink-2); }

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  margin-bottom: 8px;
}
.control-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.control-group label { font-size: 12px; color: var(--muted); }
.control-group select, .control-group input[type="date"] {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
}
.control-group .control-label { font-size: 12px; color: var(--muted); }
.sub-head { font-size: 16px; margin: 20px 0 8px; }
/* 웹업로드: 왼쪽 사진(상품별 묶음), 오른쪽 편집 */
/* 웹업로드: 판매조회처럼 PC 화면 폭 가득 */
.container:has(> #view-webup:not([hidden])) { max-width: none; }
.webup-selbar { position: sticky; top: var(--stick-top, 0); z-index: 5; }
/* 상품 업로드: 위 버튼 줄(폴더·등록 / 고른 사진)과 아래 작업 칸(사진 목록 | 초안)을 테두리·바탕으로 나눔(사용자 2026-10-22) */
#view-webup > .toolbar { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 8px 10px; }
.webup-photos { position: relative; user-select: none; }
.webup-thumb { position: relative; }
.webup-thumb.is-sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.webup-pick { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; margin: 0; z-index: 1; cursor: pointer; }
.webup-band { position: fixed; z-index: 50; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); pointer-events: none; }
.webup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
/* 사진 목록 칸 = 초안 칸과 같은 폭·높이, 각자 스크롤 */
.webup-photos, .webup-editor { height: calc(100vh - 130px); min-height: 640px; overflow-y: auto; border: 2px solid var(--rule); border-radius: var(--radius-m); background: var(--canvas); padding: 10px; }
.webup:has(.webup-editor[hidden])::after { content: '왼쪽에서 상품을 고르면 여기서 초안을 작성합니다'; display: grid; place-items: center; height: calc(100vh - 130px); min-height: 640px; border: 2px dashed var(--rule); border-radius: var(--radius-m); color: var(--muted); font-size: 14px; }
.webup-group.is-over { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.webup-group { margin-bottom: 14px; content-visibility: auto; contain-intrinsic-size: auto 260px; } /* 사진 수백 장 폴더: 화면 밖 묶음은 그리지 않음 */
.webup-ghead { display: block; width: 100%; text-align: left; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.webup-ghead.is-on { border-color: var(--accent); color: var(--accent); }
.webup-ghead.is-none { color: var(--muted); font-weight: 400; cursor: default; }
.webup-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 6px; }
.webup-thumb { margin: 0; padding: 4px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); cursor: grab; }
.webup-thumb.is-code { border-color: var(--accent); }
.webup-thumb img, .webup-slots img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.webup-thumb figcaption { font-size: 11px; color: var(--muted); margin: 2px 0; word-break: break-all; }
.webup-thumb .row-act { font-size: 11px; padding: 1px 6px; }
.webup-slots { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 8px; margin: 0; min-height: 110px; border: 2px dashed var(--rule); border-radius: var(--radius-s); }
.webup-slots li { position: relative; padding: 4px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); cursor: grab; }
.webup-slots li:first-child:not(.empty-state) { border-color: var(--accent); }
.webup-slots small { display: block; font-size: 11px; color: var(--muted); word-break: break-all; }
.webup-no { font-size: 12px; font-weight: 700; }
.webup-slots .row-del { position: absolute; top: 2px; right: 2px; }
.webup-main { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.webup-main figure { margin: 0; }
.webup-main img { display: block; max-width: 240px; height: auto; border: 1px solid var(--rule); border-radius: var(--radius-s); background: #fff; }
.webup-main figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.webup-main-act { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
/* 메인컷 보정값: 이름 · 왼쪽 끝 말 · 막대 · 오른쪽 끝 말 · 숫자 */
.webup-adj { flex: 1 1 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); }
.webup-adj legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.webup-adj-row { display: grid; grid-template-columns: 84px 60px minmax(80px, 1fr) 60px 64px 52px; align-items: center; gap: 6px; font-size: 13px; }
.webup-adj-row.is-off, .webup-adj-flag.is-off { opacity: 0.45; }
.webup-adj-group { padding: 6px 0; border-top: 1px solid var(--rule); }
.webup-adj-group:first-of-type { border-top: 0; }
.webup-adj-group > b { display: block; font-size: 13px; margin-bottom: 4px; }
.webup-adj-flags { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin: 2px 0 6px; }
.webup-adj-use { font-size: 12px; white-space: nowrap; }
.webup-draw { max-width: min(96vw, 900px); }
.webup-draw-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.webup-draw-stage { position: relative; display: inline-block; max-width: 100%; }
.webup-draw-stage img { display: block; max-width: 100%; max-height: 70vh; user-select: none; -webkit-user-drag: none; }
.webup-draw-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.webup-adj-row small { color: var(--muted); font-size: 11px; }
.webup-adj-row small:last-of-type { text-align: right; }
.webup-adj-row input[type="number"] { width: 64px; }
.webup-adj-act { display: flex; gap: 6px; margin-top: 6px; }
.webup-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.webup-fields input, .webup-fields select { width: 100%; }
@media (max-width: 900px) {
  .webup { grid-template-columns: 1fr; }
  .webup-photos, .webup-editor { height: auto; max-height: 70vh; min-height: 0; }
  .webup:has(.webup-editor[hidden])::after { display: none; }
}
.date-pair { display: flex; gap: 6px; }
.date-pair input { flex: 1; min-width: 0; }
#groupTable tfoot th, #groupTable tfoot td { border-top: 2px solid var(--rule); font-weight: 700; }
/* 재고조회 여러 개 고르는 필터(체크 목록 드롭다운) — 닫혀 있을 땐 select와 같은 모양 */
.multi { position: relative; }
.multi > summary {
  list-style: none;
  height: 38px;
  padding: 0 26px 0 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.multi > summary::-webkit-details-marker { display: none; }
.multi > summary::after { content: '▾'; position: absolute; right: 9px; top: 0; line-height: 38px; color: var(--muted); }
.multi.is-on > summary { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.multi-pop {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.12);
}
.multi-find { width: 100%; height: 34px; margin-bottom: 6px; padding: 0 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font-size: 14px; }
.multi-list { max-height: 260px; overflow-y: auto; }
.multi-list label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 14px; cursor: pointer; }
.multi-list label[hidden] { display: none; }
.multi-clear { width: 100%; margin-top: 6px; }
/* 폰: 칸 아래로 펼치면 오른쪽 칸은 화면 밖으로 나감(2026-10-15 운영 확인) → 화면 아래에 붙는 목록 */
@media (max-width: 720px) {
  .multi-pop { position: fixed; top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; min-width: 0; max-width: none; box-shadow: 0 -4px 24px rgb(0 0 0 / 0.2); }
  .multi-list { max-height: 50vh; }
}
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.result-head .result-count { margin: 0; }
.btn.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.result-count { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.result-count b { color: var(--ink); font-weight: 600; }

.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}
.product-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  min-width: 0;
}
.product-image {
  display: block;
  width: 96px; height: 96px;
  border-radius: var(--radius-s);
  background: var(--canvas);
  object-fit: cover;
}
button.image-btn { padding: 0; border: 0; background: none; border-radius: var(--radius-s); cursor: zoom-in; }
.product-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}
.product-info { min-width: 0; }
/* 상세정보는 이미지 아래까지 카드 전체 너비로 — 좁은 칸에서 품목코드가 중간에 끊기지 않게 */
.card-body { grid-column: 1 / -1; min-width: 0; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.price-row { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.product-name {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* 재고 행택: 가격표 모양(왼쪽 뾰족 + 구멍) — 이 화면에서 유일하게 튀는 요소 */
.stock-tag {
  position: relative;
  flex-shrink: 0;
  padding: 3px 10px 3px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
  border-radius: 0 4px 4px 0;
}
.stock-tag::before {
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 5px; height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--surface);
}
.stock-tag.is-out { background: var(--sold); }

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  margin: 0;
  font-size: 13px;
}
.meta-grid > div { display: flex; gap: 6px; min-width: 0; }
.meta-grid dt { flex-shrink: 0; color: var(--faint); }
.meta-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meta-grid .meta-full { grid-column: 1 / -1; }
.photo-line { margin-top: 8px; }
.internal {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--amber-soft);
  border-radius: var(--radius-s);
}
.internal dt { color: var(--amber); }

.load-more-wrap { display: flex; justify-content: center; margin: 20px 0; }
.load-more-btn, .ghost-btn {
  padding: 9px 22px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
}
.load-more-btn:hover, .ghost-btn:hover { border-color: var(--faint); }
.empty-state { padding: 48px 0; text-align: center; color: var(--muted); }
.status-bar { margin: 20px 0 8px; font-size: 12px; text-align: center; color: var(--faint); }

/* ----- 바코드 스캔 모달 ----- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 28, 36, 0.62);
  overscroll-behavior: contain;
}
/* 창이 폰 화면(주소창·하단 내비 제외 = dvh)보다 길면 위아래가 잘림 → 화면 높이까지만, 넘치면 창 안에서 스크롤(사용자 2026-11-03) */
.modal-inner { width: 100%; max-width: 420px; max-height: calc(100dvh - 32px); overflow: hidden auto; background: var(--surface); border-radius: 14px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
}
.modal-close { width: 36px; height: 36px; border: 0; background: none; font-size: 22px; }
#scannerView { width: 100%; min-height: 260px; background: #000; }
.modal-hint { margin: 0; padding: 10px 16px; font-size: 13px; text-align: center; color: var(--muted); }
.scan-mode-toggle { display: flex; gap: 6px; padding: 10px 16px; }
.scan-mode-btn {
  flex: 1;
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.scan-mode-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.scan-preview { padding: 0 16px 14px; font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.scan-preview-actions { display: flex; gap: 8px; margin-top: 8px; }
.scan-preview-actions .primary-btn { margin-top: 0; }
.scan-retry-btn {
  flex-shrink: 0;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--surface);
}

/* ----- 이미지 확대 ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 0;
  background: rgba(20, 28, 36, 0.88);
  cursor: zoom-out;
  overscroll-behavior: contain;
}
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  transform: scale(0.94);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.lightbox.show img { transform: scale(1); opacity: 1; }

.to-top-btn {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 50;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(29, 39, 51, 0.16);
  font-size: 18px;
}

/* ===== 판매입력 · 판매조회 · 품목등록 ===== */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.toolbar-input {
  flex: 1 1 220px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--surface);
  font-size: 16px;
}
.btn {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--surface);
  font-size: 14px;
  white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #285c4b; border-color: #285c4b; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.field input,
.field select {
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}
.field.grow { flex: 1 1 220px; }
.sheet-legend { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.req { margin-left: 2px; color: var(--sold); }
.form-msg { min-height: 20px; margin: 0 0 8px; font-size: 13px; white-space: pre-line; color: var(--muted); }
/* 판매조회: 전송 실패 사유를 표시 칸 아래에 바로 보여줌 */
.send-error { display: block; max-width: 32ch; margin-top: 4px; font-size: 12px; color: var(--sold); word-break: keep-all; overflow-wrap: anywhere; }
.form-msg.is-ok { color: var(--accent); }
.form-msg.is-err { color: var(--sold); }
.form-msg.is-warn { color: var(--amber); }

/* 작업 중 알림(busy.js): 진행 문구를 화면 상단 가운데에 돌아가는 모양으로, 원래 칸은 자리만 남김 */
.form-msg.is-busy, .admin-msg.is-busy, #webupHostState.is-busy { visibility: hidden; }
.busy-pill {
  position: fixed; top: 12px; left: 50%; z-index: 1000;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  max-width: min(640px, calc(100vw - 32px));
  padding: 10px 18px; border-radius: 20px;
  background: var(--accent); color: #fff; font-size: 14px; line-height: 1.4;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.18);
  animation: busy-in 0.25s ease-out;
}
.busy-spin {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 0.35); border-top-color: #fff;
  animation: busy-spin 0.8s linear infinite;
}
.busy-dots { flex: none; display: inline-flex; gap: 3px; }
.busy-dots i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: busy-dot 1.2s ease-in-out infinite; }
.busy-dots i:nth-child(2) { animation-delay: 0.15s; }
.busy-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes busy-in { from { opacity: 0; transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) {
  .busy-pill { animation: none; }
  .busy-spin, .busy-dots i { animation-duration: 2.4s; }
}

/* 엑셀처럼 입력하는 표: 머리글 고정 + 가로 스크롤 */
.sheet-wrap, .table-wrap {
  position: relative; /* 안쪽 스크린리더용 숨김 글자(절대위치)가 페이지를 가로로 넓히지 않게 */
  overflow: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: var(--surface);
  margin-bottom: 12px;
}
.sheet-wrap { max-height: 62vh; }
.sheet { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sheet th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  background: #f3f5f4;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.sheet th.is-unsent { color: var(--faint); font-weight: 500; }
.sheet td { padding: 0; border-bottom: 1px solid #edf0ee; border-right: 1px solid #f1f3f2; }
.sheet td input, .sheet td select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.sheet td input:focus, .sheet td select:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.sheet td input[readonly] { color: var(--muted); }
/* 판매입력: PC 화면 폭에 맞춰 칸 폭을 비율로 고정 (가로 스크롤 없이) */
.container:has(> #view-sale:not([hidden])),
.container:has(> #view-sales:not([hidden])),
.container:has(> #view-send:not([hidden])) { max-width: none; }
/* 판매조회: 조회·처리 버튼 묶음은 화면 위에 붙고, 표는 안에서 스크롤하며 머리글 고정. 칸은 줄바꿈 없이(오류 사유만 줄바꿈) */
.sales-top { position: sticky; top: var(--stick-top); z-index: 10; margin: 0 -12px; padding: 8px 12px 0; background: var(--canvas); }
#view-sales > .table-wrap { max-height: calc(100vh - var(--stick-top) - 200px); min-height: 240px; }
#salesTable th { position: sticky; top: 0; z-index: 2; }
#salesTable td { white-space: nowrap; }
#salesTable td small { white-space: normal; }
#salesTable .send-error { min-width: 40ch; max-width: 56ch; }
#salesSend kbd { margin-left: 4px; padding: 0 5px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px; font: inherit; font-size: 11px; opacity: 0.85; }
.sales-picked { align-self: center; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 폰: 표 → 전표 카드(가로 스크롤 없이 화면 폭에 맞춤, 사용자 2026-11-04) */
@media (max-width: 720px) {
  #view-sales > .table-wrap { max-height: none; min-height: 0; overflow: visible; border: 0; background: none; }
  #salesTable, #salesTable tbody { display: block; }
  #salesTable thead tr { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; }
  #salesTable thead th { position: static; display: none; padding: 0; border: 0; background: none; }
  #salesTable thead th:first-child { display: flex; align-items: center; }
  #salesTable thead th:first-child::after { content: '전체 선택'; margin-left: 6px; font-size: 13px; color: var(--muted); font-weight: 400; }
  #salesTable tbody tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-areas: "pick cust amt" "pick items items" "pick meta meta" "pick st st" "act act act"; gap: 3px 8px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
  #salesTable td { display: block; min-width: 0; padding: 0; border: 0; white-space: normal; }
  #salesTable .sp-pick { grid-area: pick; padding-top: 2px; }
  #salesTable .sp-pick input { width: 20px; height: 20px; }
  #salesTable .sp-cust { grid-area: cust; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
  #salesTable .sp-amt { grid-area: amt; font-weight: 600; text-align: right; }
  #salesTable .sp-items { grid-area: items; color: var(--ink-2); overflow-wrap: anywhere; }
  /* 날짜·주문번호·구매자·배송·송장은 한 줄 작은 글씨로 이어 붙임 */
  #salesTable :is(.sp-made, .sp-io, .sp-order, .sp-buyer, .sp-ship, .sp-inv) { display: none; }
  #salesTable .sp-st { grid-area: st; }
  #salesTable .send-error { min-width: 0; max-width: none; }
  #salesTable .sp-act { grid-area: act; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 4px; }
  #salesTable .sp-act:empty { display: none; }
  #salesTable .sp-meta { grid-area: meta; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
}
#salesTable .sp-meta { display: none; }
@media (max-width: 720px) { #salesTable td.sp-meta { display: block; } }
.sheet-fit { table-layout: fixed; width: 100%; font-size: 12px; }
.sheet-fit th { padding: 6px 4px; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.25; font-size: 12px; vertical-align: bottom; }
.sheet-fit .rownum { min-width: 0; padding: 0 2px; }
.sheet-fit td input, .sheet-fit td select { height: 32px; padding: 0 4px; font-size: 12px; text-overflow: ellipsis; }
.sheet-fit td select { padding: 0 1px; }
.sheet-fit td input[type="date"]::-webkit-calendar-picker-indicator { margin: 0; padding: 0; width: 12px; }
.sheet-fit .row-del { width: 100%; }
/* 폰·좁은 화면: 칸이 글자보다 좁아지지 않게 최소 폭 → 표 안에서 가로 스크롤 (판매입력은 칸이 많아 더 넓게) */
@media (max-width: 900px) {
  .sheet-fit { min-width: 860px; }
  #saleSheet .sheet-fit { min-width: 1500px; }
}
/* 노트북 폭: 드롭다운 화살표·여백을 빼서 글자 공간 확보 (클릭하면 목록은 그대로 열림) */
@media (max-width: 1600px) {
  .container:has(> #view-sale:not([hidden])),
  .container:has(> #view-sales:not([hidden])) { padding-left: 12px; padding-right: 12px; }
  .sheet-fit td select { appearance: none; -webkit-appearance: none; padding: 0 3px; }
  .sheet-fit td input, .sheet-fit td select { padding-left: 3px; padding-right: 2px; font-size: 11.5px; }
  .sheet-fit th { padding: 5px 3px; font-size: 11.5px; }
}
.sheet td .is-err { background: var(--sold-soft); outline: 2px solid var(--sold); outline-offset: -2px; }
.kbd-hint { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.kbd-hint kbd { padding: 1px 5px; border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: inherit; font-size: 11px; }
.sheet td input:disabled { background: #f6f7f7; cursor: not-allowed; }
.sheet .rownum {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 36px;
  padding: 0 8px;
  background: #f3f5f4;
  color: var(--faint);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sheet th.rownum { z-index: 3; }
.row-del { width: 34px; height: 34px; border: 0; background: none; color: var(--faint); font-size: 18px; }
.row-del:hover { color: var(--sold); }
/* 판매조회 줄 동작: 수정 / 이카운트에 이미 있음 / 삭제 */
.row-actions { white-space: nowrap; text-align: right; }
.row-act { margin-right: 4px; padding: 4px 9px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.row-act:hover { border-color: var(--accent); color: var(--accent); }
/* 판매입력: 전표 수정 중 안내 */
.edit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #ecd9a8; border-radius: var(--radius-m); background: var(--amber-soft); color: var(--amber); font-size: 13.5px; }
.edit-bar span { flex: 1 1 280px; }
/* 주문수집: 칸 안 보조 글자(연락처·품목코드·배송메세지)는 줄을 바꿔 작게, 파일 올리기 버튼(label) */
.cell-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.toolbar label.btn { display: inline-flex; align-items: center; cursor: pointer; }
.order-input { display: block; width: 100%; min-width: 110px; margin-top: 4px; padding: 4px 6px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: 12.5px; }
.order-input.is-err { border-color: var(--sold); background: var(--sold-soft); }
/* 입력표 일자: 글자 칸 + 오른쪽 달력 아이콘(숨은 달력 칸, 아이콘 어디를 눌러도 달력 팝업) */
.sheet .date-cell { position: relative; display: block; }
.sheet .date-cell input[data-key] { padding-right: 20px; }
.sheet .date-cell .date-pick {
  position: absolute; top: 0; right: 0; bottom: 0; width: 20px; height: 100%; min-width: 0; padding: 0; border: 0;
  color: transparent; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23687370' stroke-width='1.4'%3E%3Crect x='2' y='3' width='12' height='11' rx='1.5'/%3E%3Cpath d='M2 6.5h12M5.5 1.5v3M10.5 1.5v3'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.sheet .date-cell .date-pick::-webkit-datetime-edit { display: none; }
.sheet .date-cell .date-pick::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
/* 판매입력: 행 선택(체크박스)·선택 삭제 */
.toolbar-sub { margin-top: -4px; }
.btn.btn-danger { color: var(--sold); }
.btn.btn-danger:hover { border-color: var(--sold); }
.sheet .rownum { white-space: nowrap; }
.sheet .rownum .row-pick { width: 14px; height: 14px; margin: 0 3px 0 0; vertical-align: middle; }
.sheet .rownum span { vertical-align: middle; }
/* 판매조회: 정렬 머리글 */
.th-sort { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; white-space: nowrap; }
.th-sort::after { content: " ↕"; color: var(--faint); }
[aria-sort="ascending"] .th-sort::after { content: " ↑"; color: var(--accent); }
[aria-sort="descending"] .th-sort::after { content: " ↓"; color: var(--accent); }
/* 판매조회 전송 미리보기: 전표 한 장씩 카드 */
.slip-card { margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
.slip-card h3 { margin: 0 0 8px; font-size: 15px; }
.slip-card h3 small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.slip-head { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; margin: 0 0 10px; font-size: 13px; }
.slip-head div { display: flex; gap: 6px; min-width: 0; }
.slip-head dt { flex: none; color: var(--muted); }
.slip-head dd { margin: 0; overflow-wrap: anywhere; }
.slip-head .is-unsent dt::after { content: "(사이트만)"; margin-left: 2px; font-size: 11px; }
.slip-card .table-wrap { margin: 0; }
.slip-card .muted { color: var(--muted); font-size: 11.5px; }
.payload-raw summary { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
/* 창고이동 전송 미리보기 */
.move-preview { margin-top: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.move-preview h2 { margin: 0 0 6px; font-size: 15px; }
.move-preview ol { margin: 0; padding-left: 22px; font-size: 13.5px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td { padding: 9px 10px; border-bottom: 1px solid #edf0ee; text-align: left; vertical-align: middle; }
.data-table th { background: #f3f5f4; font-weight: 600; white-space: nowrap; }
.data-table tbody tr:hover { background: #f8faf9; }
.data-table tbody tr.is-marked { background: var(--accent-soft); }
.data-table tbody tr.is-warn { background: #fdf1ee; }
/* 원격 로그인: 승인 창(오른쪽 아래) · 원격 화면(화면 가득, 다른 화면은 못 만짐) */
.send-thumb { display: block; width: 80px; height: 104px; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); background: #fff; }
.send-qty { width: 80px; }
/* 송신 코드 칸 폭 고정 — 새로고침·추천 채움 때 고른 글자 길이로 칸이 줄었다 늘었다 하며 표 전체가 흔들림(사용자 2026-10-28) */
.send-code { width: 340px; }
.send-code select { width: 320px; max-width: 100%; }
/* 상품 송신 화면 = 위 고정 영역 2 : 목록 8, 목록만 스크롤(사용자 2026-10-28) */
#view-send:not([hidden]) { display: flex; flex-direction: column; height: calc(100vh - var(--stick-top) - 40px); min-height: 520px; }
.send-top { flex: 2 1 0; min-height: 0; position: relative; z-index: 5; /* 드롭다운·설명이 목록 위로 펼쳐지게(잘리지 않게) */ display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-bottom: 6px; }
.send-list { flex: 8 1 0; min-height: 0; overflow: auto; }
.send-list thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.send-row .btn-sm, .send-row .seg button { height: 30px; }
.send-title { margin: 0; font-size: 20px; }
.send-malls-multi { width: 240px; }
.send-modify-multi { width: 200px; }
.send-modify-multi > summary { height: 30px; line-height: 28px; }
.send-malls-multi .send-malls { display: flex; flex-direction: column; gap: 4px; border: 0; padding: 0; background: none; }
.send-search { width: 260px; height: 30px; margin-left: auto; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); }
.send-msg { margin: 0; flex: 1 1 300px; }
/* 설명 뱃지: 올리면 보이고, 누르면 고정(is-pinned) */
.info-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--rule); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; vertical-align: middle; }
.info-badge.is-pinned { background: var(--accent); color: #fff; }
.info-tip { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(420px, 80vw); padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); box-shadow: 0 6px 20px rgb(0 0 0 / 0.15); color: var(--ink); font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left; white-space: normal; pointer-events: none; /* 고정해도 아래 버튼을 누를 수 있게 */ }
.info-tip ul { margin: 0; padding-left: 18px; }
.rate-basis { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.info-tip li + li { margin-top: 5px; }
.info-tip li::marker { color: var(--accent); }
.info-badge:hover .info-tip, .info-badge:focus-visible .info-tip, .info-badge.is-pinned .info-tip { display: block; }
/* 우상단 알림(app.js LL.toast) */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 1100; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 10px; background: var(--surface); box-shadow: 0 6px 24px rgb(0 0 0 / 0.18); font-size: 14px; line-height: 1.45; cursor: pointer; overflow-wrap: anywhere; }
.toast.is-warn { border-left-color: #c58a00; }
.toast.is-err { border-left-color: var(--sold, #b23a30); }
/* 송신 이력: 쇼핑몰 7칸을 같은 순서·같은 폭으로(행마다 세로 줄 맞음), 보낸 몰만 옅은 색 — 과하지 않게(사용자 2026-10-28) */
.send-hist { display: grid; grid-template-columns: repeat(7, 4.6em); gap: 2px; }
.send-mall { padding: 1px 0; border: 1px solid var(--rule); border-radius: var(--radius-s); font-size: 11px; text-align: center; color: var(--muted); white-space: nowrap; }
.send-mall.is-sent { border-color: transparent; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.send-code input { width: 100px; margin-top: 4px; }
.webup-thumb.is-unused { opacity: 0.45; }
.webup-thumb.is-unused figcaption::after { content: ' · 사용안함'; color: var(--sold, #b23a30); font-weight: 600; }
.orders-remote-sites { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.orders-remote-sites label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.remote-ask { position: fixed; right: 20px; bottom: 20px; z-index: 1000; width: min(420px, calc(100vw - 32px)); padding: 16px; border: 2px solid var(--accent); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.remote-ask h2 { margin: 0 0 8px; font-size: 16px; }
.remote-view { position: fixed; inset: 0; z-index: 999; display: flex; flex-direction: column; background: #111; }
.remote-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 16px; background: var(--surface); }
.remote-view img { flex: 1; min-height: 0; width: 100%; object-fit: contain; cursor: pointer; }
body.remote-open { overflow: hidden; }
.show-sm { display: none; }
.check { display: inline-flex; align-items: center; gap: 6px; height: 42px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.num-col { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.payload {
  max-height: 320px;
  overflow: auto;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  background: #f6f8f7;
  font-size: 12px;
  line-height: 1.45;
}

/* ===== 관리 화면 (admin.html) ===== */
body > .topbar { position: sticky; top: 0; z-index: 20; }
.admin-container { max-width: 560px; }
.admin-card, .login-card {
  margin-bottom: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
}
.login-card { margin-top: 24px; }
.admin-card h2, .login-card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.login-card h2 { text-align: center; }
.admin-hint { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.admin-card label, .login-card label { display: block; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.admin-card label:first-of-type { margin-top: 0; }
.admin-card input[type="text"],
.admin-card input[type="password"],
.admin-card input[type="file"],
.login-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-size: 16px;
}
.primary-btn {
  width: 100%;
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.primary-btn:hover { background: #285c4b; }
.primary-btn:disabled { opacity: 0.6; cursor: progress; }
.admin-msg { margin-top: 10px; font-size: 13px; white-space: pre-line; }
.admin-msg.ok { color: var(--accent); }
.admin-msg.err { color: var(--sold); }
.status-line { margin-bottom: 4px; font-size: 13px; color: var(--muted); white-space: pre-line; }

.admin-tabs {
  position: sticky;
  top: 52px;
  z-index: 9;
  display: flex;
  gap: 4px;
  margin: 0 -20px 8px;
  padding: 10px 20px;
  background: var(--canvas);
}
.admin-tab {
  flex: 1;
  padding: 9px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.admin-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 관리 화면(로그인 뒤) 2026-10-30: 넓은 화면은 여러 칸, 밑줄 탭, 버튼은 글자만큼. 로그인·OTP 카드는 그대로 좁게 */
#appView.admin-container { max-width: 1040px; }
.admin-head { margin: 22px 0 2px; }
.admin-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
#appView .admin-tabs { gap: 24px; margin: 0 0 20px; padding: 0; border-bottom: 1px solid var(--rule); }
#appView .admin-tab { flex: 0 0 auto; margin-bottom: -1px; padding: 12px 0 11px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 500; }
#appView .admin-tab:hover { color: var(--ink); }
#appView .admin-tab.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
#appView .admin-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
.admin-grid > * { flex: 1 1 300px; min-width: 0; }
.admin-col { display: flex; flex-direction: column; gap: 16px; }
#appView .admin-card { margin-bottom: 0; padding: 20px 22px; }
#appView .admin-card h2 { font-size: 16px; }
#appView .primary-btn { width: auto; padding: 10px 20px; font-size: 14px; }
.users-main { flex: 2 1 600px; }
.users-side { flex: 1 1 280px; }

/* 계정 목록 = 장부(열 맞춤). 열: 계정 | 직급 | OTP | 메뉴 권한 | 관리 */
/* 목록 전체가 열 하나를 같이 씀(subgrid) → 머리줄·모든 행 열이 맞음 */
#userList { display: grid; grid-template-columns: minmax(96px, 1fr) auto auto auto auto; column-gap: 14px; }
/* 계정마다 둘째 줄(직급 칸 아래부터): CS 팀 + 채널톡 매니저 이름(CS 담당 자동 배정). 바꾸면 바로 저장, 저장된 칸은 잠깐 초록 테두리 */
.user-row .user-cs { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.user-cs-label { font-size: 12px; color: var(--faint); }
.user-cs select, .user-cs input { height: 30px; padding: 0 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; }
.user-cs input { flex: 1 1 150px; min-width: 0; max-width: 220px; }
.user-cs input::placeholder { color: var(--faint); }
.user-cs .is-saved { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.user-grid { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.user-grid .user-actions { flex-wrap: nowrap; }
.user-actions button { white-space: nowrap; }
.user-loading { grid-column: 1 / -1; padding: 10px; color: var(--muted); font-size: 13px; }
.user-head { padding: 0 10px 8px; border-bottom: 1px solid var(--rule); color: var(--faint); font-size: 12px; }
.user-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.user-name b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.otp-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.otp-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.otp-state.is-off { color: var(--amber, #b26b00); }
.otp-state.is-off::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.perm-btn { justify-self: start; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.perm-btn b { color: var(--ink); font-weight: 600; }
.perm-btn:hover { border-color: var(--ink); color: var(--ink); }
.perm-all-note { padding-left: 12px; color: var(--muted); font-size: 12.5px; }
.user-actions .user-action-btn, .user-actions .delete-user-btn { border-color: transparent; background: none; color: var(--muted); }
.user-actions .user-action-btn:hover { background: var(--mist); color: var(--ink); }
.user-actions .delete-user-btn { color: var(--sold); }
.user-actions .delete-user-btn:hover { background: #fdecec; }
@media (max-width: 720px) {
  .user-head { display: none; }
  #userList { display: block; }
  .user-grid { grid-template-columns: 1fr auto auto; gap: 8px 12px; }
  .user-name, .user-row .user-actions, .user-row .user-cs { grid-column: 1 / -1; }
  .user-grid .user-actions { flex-wrap: wrap; }
  .user-row .role-select { justify-self: start; }
}
.photo-tabs { display: flex; gap: 4px; max-width: 420px; margin-bottom: 12px; }
.photo-filters { max-width: 640px; }
#photoApplied > .page-sub { margin: 4px 0 10px; }

/* 판매 회계반영: 요약은 장부처럼 — 부가세유형 줄 아래에 입금계좌별 줄을 들여 쓴다 */
.acct-summary { margin: 4px 0 18px; padding: 14px 16px 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.acct-summary h2 { margin: 0 0 8px; font-size: 15px; }
.acct-ledger { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.acct-ledger thead th { padding: 6px 8px; color: var(--muted); font-weight: 500; font-size: 12px; text-align: left; border-bottom: 1px solid var(--rule); }
.acct-ledger tbody th, .acct-ledger tbody td { padding: 7px 8px; font-weight: 400; text-align: left; }
.acct-ledger tbody + tbody tr:first-child > * { border-top: 1px solid #edf0ee; }
.acct-ledger .is-group > * { font-weight: 600; }
.acct-ledger .is-group th { border-left: 3px solid var(--accent); }
.acct-ledger .is-sub > * { color: var(--muted); padding-top: 3px; padding-bottom: 3px; }
.acct-ledger .is-sub th { padding-left: 24px; }
.acct-ledger .is-waiting > * { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.acct-ledger .is-skipped > * { color: var(--faint); }
.acct-ledger .is-done > * { color: var(--accent); }
.acct-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.acct-novat { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.is-minus { color: var(--sold); }
.acct-table small { display: block; color: var(--faint); font-size: 12px; }
.acct-table .acct-items { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-table .acct-reason { margin-top: 3px; max-width: 26ch; }
.acct-slip { font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct-table .muted { color: var(--muted); font-size: 12.5px; }
.acct-table select { max-width: 220px; }
.acct-table .acct-dept { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.acct-table .acct-dept select { font-size: 12.5px; }
.acct-table .acct-field { display: grid; gap: 2px; color: var(--muted); font-size: 12px; }
.acct-table .acct-field + .acct-field { margin-top: 6px; }
.acct-table tr.acct-manual { background: #fffbf2; }
.acct-table tr.acct-skip > td { color: var(--faint); }
#view-acct { word-break: keep-all; overflow-wrap: anywhere; }
.acct-code { white-space: nowrap; }
/* 폰: 전표 한 줄을 카드처럼 — 위: 전표·처리 / 가운데: 거래처·합계 / 아래: 부가세유형·입금계좌 */
@media (max-width: 720px) {
  .acct-table thead { display: none; }
  .acct-table, .acct-table tbody { display: block; }
  .acct-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "slip st" "cust total" "vat vat" "acc acc";
    gap: 4px 12px;
    padding: 12px;
    border-bottom: 1px solid #edf0ee;
  }
  .acct-table td { padding: 0; border: 0; }
  .acct-table .c-slip { grid-area: slip; color: var(--muted); font-size: 12.5px; }
  .acct-table .c-st { grid-area: st; text-align: right; }
  .acct-table .c-st .acct-reason { margin-left: auto; }
  .acct-table .c-cust { grid-area: cust; }
  .acct-table .c-total { grid-area: total; font-weight: 600; }
  .acct-table .c-vat { grid-area: vat; }
  .acct-table .c-acc { grid-area: acc; }
  /* 폰: 부가세유형·부서는 한 줄, 입금계좌는 그 아래 전체 폭 */
  .acct-table .c-vat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .acct-table .c-vat .acct-dept { margin-top: 0; }
  .acct-table .c-acc select { width: 100%; }
  .acct-table .c-vat:empty, .acct-table .c-acc:empty { display: none; }
  .acct-table .acct-items { max-width: none; }
  .acct-table select { max-width: 100%; }
}

.user-list { list-style: none; margin: 0; padding: 0; }
.user-row { padding: 10px; border-bottom: 1px solid #f0f0f1; border-radius: var(--radius-s); font-size: 14px; }
.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: var(--canvas); }
.user-sub { font-size: 12px; color: var(--muted); }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px; }
.user-action-btn, .delete-user-btn {
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
}
.delete-user-btn { color: var(--sold); }
.role-select {
  padding: 4px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-size: 13px;
}
.admin-card > .role-select { width: 100%; padding: 11px 12px; font-size: 16px; }
.otp-qr { display: block; width: 200px; height: 200px; margin: 8px auto; padding: 8px; background: #fff; border-radius: 8px; }

/* ===== 반응형 ===== */
@media (max-width: 960px) {
  .dash-grid, .dash-grid-even, .dash-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  /* 폰에선 크롬 전체를 고정하면 화면 절반을 먹으므로 크롬은 스크롤되고 검색창만 붙는다 */
  .chrome { position: static; }
  .sales-top { position: static; }
  .topbar { flex-wrap: wrap; gap: 0 12px; padding: 0 14px; }
  .brand { line-height: 48px; }
  /* 폰: 탭·리본을 가로 스크롤 대신 줄바꿈해서 잘리는 메뉴가 없게 */
  .tabs { order: 3; flex-wrap: wrap; overflow: visible; width: calc(100% + 28px); margin: 0 -14px; padding: 2px 6px; border-top: 1px solid #2f3b48; }
  .tab { padding: 9px 10px; }
  .who { display: none; }
  .ribbon { flex-wrap: wrap; row-gap: 6px; min-height: 0; padding: 6px 8px; overflow: visible; }
  .ribbon-group { padding: 0 6px; min-width: 0; }
  .ribbon-items { flex-wrap: wrap; }
  .ribbon-caption { display: none; }
  .container { padding: 14px; }
  .search-bar { margin: 0 -14px 10px; padding: 8px 14px; }
  .scan-btn span { display: none; }
  .page-head h1 { font-size: 19px; }
  .kpi-value { font-size: 24px; }
  .result-list { grid-template-columns: minmax(0, 1fr); }
  .product-card { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .product-image { width: 76px; height: 76px; }
  .meta-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-tabs { margin: 0 -14px 8px; padding: 8px 14px; }
  /* 폰: 표에서 부가 칸은 숨기고 핵심(상품명·재고·상태)만 한 화면에 */
  .hide-sm { display: none; }
  .show-sm { display: block; }
  .data-table .name-col { min-width: 150px; }
}
/* 검색어 강조: 형광펜이 왼쪽→오른쪽으로 칠해진 뒤 한 번 튀었다 가라앉음 */
mark.hit {
  color: inherit;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 1px;
  background: linear-gradient(transparent 55%, #ffd84d 55%) no-repeat 0 0 / 100% 100%;
  animation: hit-sweep 0.45s ease-out both, hit-pop 0.6s ease-out 0.35s;
}
@keyframes hit-sweep { from { background-size: 0 100%; } }
@keyframes hit-pop {
  40% { background-color: #fff3b0; box-shadow: 0 0 0 3px #fff3b0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  mark.hit { animation: none; }
}

.webup-detail { max-height: 640px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 8px; width: min(100%, 360px); }
.webup-detail img { display: block; width: 100%; height: auto; }
.webup-host { margin: 0; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.field-note { display: block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 3px 8px; }
.field-note.is-warn { background: #fff1e0; color: #a14a00; border: 1px solid #f2b36b; }
.field-note.is-err { background: #fdeaea; color: #a11; border: 1px solid #eba3a3; }
/* 사방넷 등록 전 원가 대사 팝업 */
.webup-cost { max-width: min(640px, calc(100vw - 32px)); border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); padding: 16px; }
.webup-cost h3 { margin: 0 0 8px; font-size: 1rem; }
.webup-cost summary { cursor: pointer; padding: 4px 0; }
.webup-cost .is-err { color: var(--sold); font-weight: 600; }
.webup-cost .data-table td:not(:first-child) { text-align: right; }
.webup-cost-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* 회계 > 비용(expense.js) */
.exp-usage { display: inline-flex; flex-wrap: wrap; gap: 6px; align-self: center; }
.exp-h { margin: 24px 0 8px; font-size: 15px; }
.exp-h small, .exp-note { font-size: 12px; font-weight: 400; color: var(--muted); }
.exp-note { align-self: center; }
.exp-minus { color: var(--sold); }
.exp-balances { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.exp-bal { display: flex; flex-direction: column; gap: 2px; min-width: 180px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
.exp-bal span { font-size: 13px; color: var(--muted); }
.exp-bal b { font-size: 22px; }
/* 정산 > 입금예정(settle.js): 달력 + 목록. 완료 = 취소선, 정산지연 = 빨강 */
.set-nav { align-items: center; }
.set-cal-wrap { overflow-x: auto; margin-bottom: 8px; }
.set-cal { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); min-width: 660px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); background: var(--surface); }
.set-wd { padding: 6px 8px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--muted); text-align: center; }
.set-wd:first-child { color: var(--sold); }
.set-day { min-height: 84px; padding: 4px 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 3px; }
.set-day.is-blank { background: #f6f8f7; }
.set-day.is-off .set-date { color: var(--sold); }
.set-day.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.set-date { font-size: 12px; font-variant-numeric: tabular-nums; }
.set-date small { font-size: 11px; }
.set-item { display: block; width: 100%; padding: 2px 5px; border: 0; border-radius: var(--radius-s); background: var(--amber-soft); color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item b { font-weight: 600; font-variant-numeric: tabular-nums; }
.set-item.is-done { background: var(--accent-soft); color: var(--muted); text-decoration: line-through; }
.set-item.is-late { background: var(--sold-soft); color: var(--sold); }
.set-table tr.is-done .set-strike { text-decoration: line-through; color: var(--muted); }
.set-table tr.is-late td:first-child { color: var(--sold); font-weight: 600; }
.set-act { display: flex; gap: 4px; }
/* 재고조회 복사: 카드 체크·바코드 버튼·복사 시트 */
.result-head-act { display: flex; gap: 8px; }
.card-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.card-pick input { width: 18px; height: 18px; margin: 0; }
.copy-open { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.copy-sheet { width: 640px; }
.copy-fields { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; padding: 0; border: 0; }
.copy-fields legend { margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.copy-fields:not(.is-custom) [data-extra] { display: none; }
.copy-field { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.copy-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.copy-preview { box-sizing: border-box; width: 100%; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre; overflow: auto; }
/* 웹업로드 작업완료(백업) 폴더 끌어 놓기 칸 */
.webup-backup-drop { padding: 6px 12px; border: 2px dashed var(--rule); border-radius: var(--radius-s); color: var(--muted); font-size: 13px; }
.webup-backup-drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.webup-cost .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
/* 웹업로드 사진 칸: 끌기 대신 쓰는 순서 버튼(폰·키보드) */
.webup-slot-act { display: flex; gap: 2px; margin-top: 4px; }
.webup-slot-act .btn { flex: 1; min-width: 0; padding: 2px 0; font-size: 11px; white-space: nowrap; }

/* 사진 가리기(blur.js) */
.blur-inner { max-width: min(1100px, 96vw); max-height: 96vh; overflow: auto; }
.blur-stage { position: relative; margin: 0 16px; touch-action: none; cursor: crosshair; user-select: none; }
.blur-stage img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #eee; }
.blur-box { position: absolute; border: 2px dashed #e5484d; background: rgba(229, 72, 77, 0.08); }
.blur-box.is-sel { border-style: solid; }
.blur-del { position: absolute; top: -12px; right: -12px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #e5484d; color: #fff; line-height: 1; }
.blur-bar { padding: 10px 16px; gap: 10px; align-items: end; }
.blur-range { flex: 1; min-width: 180px; }
.blur-range input { width: 100%; }
.blur-inner .form-msg { margin: 0; padding: 0 16px 12px; }

/* 상품 업로드 칸반(사용자 2026-10-23): 단계 띠 — 지금 단계는 테두리, 완료한 단계는 진하게 */
.kb-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0 0 10px; padding: 0; position: sticky; top: -10px; z-index: 2; background: var(--canvas); padding-top: 4px; }
.kb-step { width: 100%; padding: 6px 4px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; }
.kb-step b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 2px; border-radius: 50%; background: var(--rule); color: var(--ink); font-size: 11px; }
.kb-step.is-active { border: 2px solid var(--accent); color: var(--ink); }
.kb-step.is-done { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.kb-step.is-done b { background: #fff; color: var(--accent); }
.kb-stage { border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); padding: 8px 12px 12px; }
.kb-done-bar { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.kb-check { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.kb-check li { display: flex; gap: 8px; align-items: baseline; }
.kb-check .is-ok { color: var(--accent); }
.kb-check .is-no { color: var(--faint); }
/* 끌어 놓을 자리: 놓일 쪽 세로 막대 */
.drop-before { box-shadow: inset 5px 0 0 var(--accent); }
.drop-after { box-shadow: inset -5px 0 0 var(--accent); }
/* 상품 송신: 쇼핑몰 여러 개 고르기(사용자 2026-10-23) */
.send-malls-field { flex: 1 1 100%; }
.send-malls { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); }
.send-malls label { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.send-malls-act { display: inline-flex; gap: 6px; margin-top: 4px; }
/* 품목코드·바코드 자동완성(사용자 2026-10-23) */
.code-suggest { position: absolute; z-index: 1000; margin: 0; padding: 4px 0; list-style: none; max-width: 560px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s); box-shadow: 0 6px 18px rgb(0 0 0 / 0.15); font-size: 14px; }
.code-suggest li { padding: 6px 10px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-suggest li:hover, .code-suggest li.is-on { background: var(--accent-soft, #eef3ff); }
.code-suggest small { color: var(--muted, #777); }
.code-suggest [data-more] { border-top: 1px solid var(--rule); color: var(--accent, #2a5bd7); }
/* 계정 권한 팝업: 칸반(대분류 = 열, 하위분류 = 카드, 열마다 접기) (사용자 2026-10-30) */
.perm-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius-m, 12px); background: var(--surface); color: var(--ink); }
.perm-dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.perm-dialog-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.perm-dialog-head h2 { margin: 0; margin-right: auto; font-size: 17px; }
.perm-board { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.perm-col { flex: 0 0 168px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--mist, #f2f2f3); }
.perm-col-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.perm-col-head label { display: inline-flex; align-items: center; gap: 5px; margin: 0; margin-right: auto; cursor: pointer; }
.perm-fold { border: 0; background: none; padding: 0 4px; font-size: 14px; color: var(--muted); cursor: pointer; }
.perm-cards { display: flex; flex-direction: column; gap: 6px; }
.perm-card { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); font-size: 13px; cursor: pointer; }
.perm-card:has(input:checked) { border-color: var(--accent); }
.perm-col input, .perm-card input { width: 16px; height: 16px; accent-color: var(--accent); }
/* 접은 열 = 좁은 세로 띠(대분류 이름·개수만) */
.perm-col.is-folded { flex: 0 0 auto; }
.perm-col.is-folded .perm-cards, .perm-col.is-folded .perm-col-head input { display: none; }
.perm-col.is-folded .perm-col-head { flex-direction: column; }
.perm-col.is-folded .perm-fold { order: -1; }
.perm-col.is-folded .perm-col-head label { margin: 0; writing-mode: vertical-rl; letter-spacing: 2px; }
/* 장기재고 원형 그래프 + 재고회전율(사용자 2026-10-23). 구간 색 = 기존 색을 dataviz 검사 통과하게 조정, 정상 = 회색(나머지) */
.aging-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.aging-pie svg { flex: none; }
.aging-pie circle { fill: none; stroke-width: 7; }
.pie-ok { stroke: #c9ced2; background: #c9ced2; } .pie-m2 { stroke: #2d6a9f; background: #2d6a9f; } .pie-m5 { stroke: #d9a81c; background: #d9a81c; }
.pie-m9 { stroke: #cf5f1d; background: #cf5f1d; } .pie-m12 { stroke: #a12c2c; background: #a12c2c; }
.pie-num { font-size: 7px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.pie-sub { font-size: 3.6px; text-anchor: middle; fill: var(--muted); }
.aging-legend { flex: 1 1 200px; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.aging-legend .aging-row { display: grid; grid-template-columns: 10px 48px minmax(0, 1fr) auto 48px; align-items: center; gap: 8px; }
.aging-legend .aging-row[disabled] { cursor: default; }
.aging-legend .num { text-align: right; }
.pie-dot { width: 10px; height: 10px; border-radius: 50%; }
.turnover { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.turnover h3 { margin: 0 0 4px; font-size: 14px; } .turnover h3 small { font-weight: 400; color: var(--muted); }
.turnover p { margin: 2px 0; } .turnover b { font-size: 20px; }
/* 판매 회계반영: 체크·정렬·찾기(사용자 2026-10-23) */
.acct-tools { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.seg { display: inline-flex; gap: 4px; }
.seg [aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.acct-table .c-pick { width: 28px; }
/* 상품 송신: 부가정보 찾기 칸·비슷한 낱말 칩(2026-10-27) */
.send-find { width: 100%; margin-bottom: 4px; }
.send-kw { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 4px; }
.send-kw:empty { display: none; }
.send-chip { padding: 1px 8px; font-size: 12px; }

/* ----- 판매 인보이스(invoice.js) ----- */
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-acts { white-space: nowrap; }
.inv-acts .btn + .btn { margin-left: 4px; }
/* 판매 인보이스 필터(햄버거)·쪽 나누기(사용자 2026-11-04) */
#invFilter { flex-wrap: wrap; align-items: flex-end; }
.inv-filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.inv-filter-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.inv-filter-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.inv-filter-box { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); }
.inv-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin: 12px 0; }
.inv-pager:empty { display: none; }
.inv-pager .btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.inv-gap { padding: 0 4px; color: var(--faint); }
#invTable td:nth-child(2), #invTable td:nth-child(3) { white-space: nowrap; } /* 발행일·주문일이 두 줄로 꺾이지 않게 */
.inv-dlg { width: min(96vw, 860px); max-height: 92vh; padding: 20px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); }
.inv-dlg::backdrop { background: rgba(23, 25, 28, 0.4); }
.inv-dlg h3 { margin: 0 0 14px; font-size: 18px; }
.inv-dlg h3 small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.inv-form .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.inv-form .field input, .inv-form .field select, .inv-form .field textarea { width: 100%; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; margin-bottom: 12px; }
.inv-wide { grid-column: 1 / -1; margin-bottom: 12px; }
.inv-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.inv-inst { margin-bottom: 12px; padding: 10px 12px; background: var(--mist); border-radius: var(--radius-s); }
.inv-inst-row { display: flex; gap: 6px; margin-bottom: 6px; }
.inv-inst-row input { flex: 1; min-width: 0; }
.inv-items { margin-bottom: 8px; }
.inv-items input { width: 100%; }
.inv-items th:first-child, .inv-items td:first-child { width: 36px; }
.inv-items th:nth-child(2), .inv-items td:nth-child(2) { width: 130px; }
.inv-items th:nth-child(4), .inv-items td:nth-child(4) { width: 80px; }
.inv-items th:nth-child(5), .inv-items td:nth-child(5) { width: 150px; }
.inv-total { margin: 0 0 12px; text-align: right; font-size: 15px; }
.inv-btns { display: flex; justify-content: flex-end; gap: 8px; }
.cell-sub.is-error { color: var(--sold); }

/* ---------- CS관리 콘솔(채널톡 데스크 구조): 보관함 | 목록 | 대화 + 고객 정보 ----------
   한 곳만 눈에 띄게: 답장을 기다리는 문의의 '기다린 시간'(굵은 숫자, 하루 넘으면 호박색). 나머지는 가는 선과 회색 글자로 조용히.
   상태는 색 알약 대신 줄 처리(종료는 흐리게, 보류·부재만 글자). 내부 메모는 연한 호박색 칸(고객에게 안 보인다는 표시) */
.container:has(> #view-cs:not([hidden])) { max-width: none; }
.cs-ico { flex: none; width: 16px; height: 16px; }
.cs { display: grid; grid-template-columns: 184px 312px minmax(0, 1fr); height: calc(100vh - var(--stick-top) - 40px); min-height: 560px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); overflow: hidden; }

.cs-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 16px 10px; background: var(--canvas); border-right: 1px solid var(--rule); overflow-y: auto; }
.cs-title { margin: 0 8px; font-size: 18px; }
/* 보관함 고정 머리: 상담·가이드·수기 접수(보관함 칸이 스크롤돼도 위에 남음). .cs-side 위쪽 여백만큼 끌어올려 빈틈 없이 붙임 */
.cs-side-head { position: sticky; top: -16px; z-index: 2; display: flex; flex-direction: column; gap: 16px; margin: -16px -10px 0; padding: 16px 10px 12px; background: var(--cs-side, var(--canvas)); }
.cs-new-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0 4px; }
.cs-folders { display: flex; flex-direction: column; gap: 16px; }
.cs-group { display: flex; flex-direction: column; gap: 1px; }
.cs-group-title { margin: 0 8px 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.cs-folder { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px; border: 0; border-radius: var(--radius-s); background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.cs-folder .cs-ico { color: var(--faint); }
.cs-folder:hover { background: var(--mist); }
.cs-folder[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cs-folder[aria-pressed="true"] .cs-ico { color: var(--accent); }
.cs-folder-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-count { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-folder[aria-pressed="true"] .cs-count { color: var(--accent); }
.cs-side-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding: 0 4px; }
.cs-side-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cs-side-foot small { font-size: 11.5px; line-height: 1.45; color: var(--faint); white-space: pre-line; }

.cs-list-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--rule); }
.cs-search { display: flex; align-items: center; gap: 8px; margin: 12px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--canvas); color: var(--faint); }
.cs-search:focus-within { border-color: var(--accent); }
.cs-search input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; outline: none; }
.cs-list-col > .form-msg { min-height: 0; margin: 0 14px; }
.cs-list-col > .form-msg:not(:empty) { margin-bottom: 8px; }
.cs-list { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--rule); }
.cs-row { position: relative; /* 안의 화면낭독기용 숨김 글자(absolute)가 목록 칸 밖으로 새 페이지가 길어지지 않게 */ display: flex; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--rule); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.cs-row:hover { background: var(--canvas); }
.cs-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cs-row[aria-current="true"] { background: var(--accent-soft); }
.cs-row[data-ended] { color: var(--faint); }
.cs-row[data-ended] .cs-preview { color: var(--faint); }
.cs-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-s); background: var(--mist); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.cs-mark svg { width: 18px; height: 18px; }
.cs-mark .cs-ico { width: 16px; height: 16px; }
.cs-mark[data-app] { border-radius: 30%; }
.cs-mark[data-app] svg { width: 23px; height: 23px; }
.cs-mark[data-app="kakao"] { background: #fee500; }
.cs-mark[data-app="naver"] { background: #03c75a; }
.cs-mark[data-app="channeltalk"] { background: #5e56f0; }
.cs-mark.cs-mark-sm { width: 18px; height: 18px; border-radius: 5px; }
.cs-mark.cs-mark-sm svg { width: 13px; height: 13px; }
.cs-mark.cs-mark-sm .cs-ico { width: 12px; height: 12px; }
.cs-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cs-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cs-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cs-wait { flex: none; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cs-wait.is-late { color: var(--amber); }
.cs-clock { flex: none; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cs-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.cs-row-meta { display: flex; gap: 10px; font-size: 12px; color: var(--faint); }
.cs-state { color: var(--muted); font-weight: 600; }
.cs-empty { margin: 0; padding: 48px 20px; text-align: center; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

.cs-detail { display: grid; grid-template-columns: minmax(0, 1fr) 290px; min-height: 0; }
/* 고객 정보 칸 접기(머리 오른쪽 끝 버튼, 기억함) → 대화·답장 칸이 넓어짐 */
.cs-detail.is-wide { grid-template-columns: minmax(0, 1fr); }
.cs-detail.is-wide .cs-info { display: none; }
.cs-info-toggle { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.cs-info-toggle[aria-expanded="false"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.cs-save-msg { flex-basis: 100%; min-height: 0; margin: 0; text-align: right; }
.cs-save-msg:empty { display: none; }
.cs-thread { display: flex; flex-direction: column; min-height: 0; background: var(--canvas); }
.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; padding: 14px 18px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.cs-back { display: none; }
.cs-who { min-width: 0; }
.cs-who h2 { margin: 0; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
.cs-who p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.cs-sub-wait { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-head-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.cs-head-ctl .seg .btn { height: 32px; padding: 0 12px; }
.cs-head-ctl .field input, .cs-head-ctl .field select { width: 116px; height: 32px; }
.cs-messages { flex: 1; min-height: 0; overflow-y: auto; }
#csMessages { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px; }
.cs-msg { align-self: flex-start; max-width: min(62ch, 82%); }
.cs-msg p { margin: 0; padding: 10px 13px; border: 1px solid var(--rule); border-radius: 4px 14px 14px 14px; background: var(--surface); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-msg small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--faint); }
.cs-msg.is-manager { align-self: flex-end; text-align: right; }
.cs-msg.is-manager p { border-color: transparent; border-radius: 14px 4px 14px 14px; background: var(--accent-soft); text-align: left; }
.cs-msg.is-bot { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; color: var(--faint); }
.cs-msg.is-bot .cs-ico { margin-top: 10px; }
.cs-msg.is-bot p { border-style: dashed; background: none; color: var(--muted); font-size: 13px; }
.cs-msg.is-bot small { grid-column: 2; }
.cs-note { margin: 24px auto; text-align: center; font-size: 13.5px; color: var(--muted); }
/* 답장 칸(고객에게 감) = 흰 칸, 내부 메모(안 감) = 노란 칸 */
.cs-compose { padding: 12px 18px 12px; border-top: 1px solid var(--rule); background: var(--surface); }
/* 답장 칸: 5줄에서 시작해 글이 길어지면 화면 45%까지 저절로 커짐(field-sizing 안 되는 브라우저는 5줄 + 손잡이) */
#csReply { min-height: calc(5lh + 22px); max-height: 45vh; field-sizing: content; }
.cs-compose textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.6; resize: vertical; }
.cs-compose textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cs-compose-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.cs-compose-bar .btn { display: inline-flex; align-items: center; gap: 6px; }
.cs-compose-bar .btn[disabled] { opacity: 0.5; cursor: default; }
.cs-compose-note { flex: 1 1 180px; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.cs-compose-note[data-kind="ok"] { color: var(--accent); }
.cs-compose-note[data-kind="warn"] { color: var(--amber); }
.cs-compose-note[data-kind="err"] { color: var(--sold); }
/* 자주 쓰는 답변: 답장 칸 위에 펼치는 목록. 고객 메시지와 주제가 맞으면 '추천' 표시, 누르면 커서 자리에 들어감 */
.cs-quick { margin-bottom: 8px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--canvas); }
.cs-quick-list { max-height: 280px; margin: 0; padding: 4px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.cs-quick-item { display: grid; gap: 3px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-s); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cs-quick-item:hover, .cs-quick-item:focus-visible { background: var(--surface); }
.cs-quick-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cs-quick-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cs-quick-head b { flex: 1; min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cs-quick-head small { flex: none; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cs-quick-tag { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.cs-quick-mark { flex: none; font-size: 11px; color: var(--muted); }
.cs-quick-text { display: -webkit-box; overflow: hidden; font-size: 12.5px; line-height: 1.5; color: var(--muted); white-space: pre-line; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cs-quick-empty { padding: 14px 10px; font-size: 13px; color: var(--muted); }
.cs-quick-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 6px 10px; border-top: 1px solid var(--rule); font-size: 11.5px; color: var(--faint); }
.cs-linkbtn { flex: none; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.cs-linkbtn[disabled] { color: var(--faint); cursor: default; }
.cs-memo { margin-bottom: 22px; } /* 고객 정보 칸 맨 위(답장 칸 아래 자리를 비워 대화·답장이 넓게) */
.cs-memo label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--amber); }
.cs-memo label small { font-weight: 400; color: var(--faint); }
.cs-memo textarea { display: block; width: 100%; padding: 8px 10px; border: 1px solid #ecd9a8; border-radius: var(--radius-s); background: var(--amber-soft); color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.55; resize: vertical; }
.cs-memo textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.cs-memo .form-msg { min-height: 0; margin: 4px 0 0; }

.cs-info { min-height: 0; border-left: 1px solid var(--rule); overflow-y: auto; }
/* 칸별 톤(사용자 2026-11-03: 채널톡처럼 칸·상담·채팅·말풍선을 밝기로 구분): 보관함 = 가장 어두운 회색, 목록 = 흰색,
   대화 = 차가운 연회색 바탕 위 흰 고객 말풍선·초록 직원 말풍선, 고객 정보 = 옅은 회색. 머리·답장 칸은 흰색 + 그림자로 떠 보이게 */
.cs { --cs-side: #eceef1; --cs-chat: #f2f4f7; --cs-info: #f8f9fa; --cs-me: color-mix(in srgb, var(--accent) 16%, #fff); }
.cs-side { background: var(--cs-side); }
.cs-list-col { background: var(--surface); }
.cs-thread { background: var(--cs-chat); }
.cs-head { box-shadow: 0 1px 3px rgba(23, 25, 28, 0.06); }
.cs-msg p { border-color: transparent; box-shadow: 0 1px 2px rgba(23, 25, 28, 0.08); }
.cs-msg.is-manager p { background: var(--cs-me); box-shadow: none; }
.cs-msg.is-bot p { border-color: #c9ced6; box-shadow: none; }
.cs-compose { box-shadow: 0 -1px 3px rgba(23, 25, 28, 0.05); }
.cs-info { background: var(--cs-info); }
/* 목록 강조(사용자): 답장 필요 = 기다린 시간이 호박색 알약, 새 메시지(이 기기에서 연 뒤 고객이 또 씀) = 굵게 + 초록 점 */
.cs-row.is-waiting .cs-wait { padding: 1px 8px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 13.5px; }
.cs-row.is-unread { background: color-mix(in srgb, var(--accent) 5%, #fff); }
.cs-row.is-unread .cs-name { font-weight: 800; }
.cs-row.is-unread .cs-preview { color: var(--ink); }
.cs-dot { display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--accent); vertical-align: middle; animation: cs-dot-in 0.6s ease-out; }
@keyframes cs-dot-in { from { transform: scale(0); } 60% { transform: scale(1.4); } }
/* [서비스허브로 보내기]: 아직 안 올린 문의면 초록 테두리 + 은은한 물결 3번(올려 달라는 느낌), 움직임 줄이기면 테두리만 */
#csToHub.is-nudge { border-color: var(--accent); color: var(--accent); font-weight: 600; animation: cs-nudge 1.8s ease-out 0.6s 3; }
@keyframes cs-nudge { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) {
  #csToHub.is-nudge { animation: none; }
}
/* 정렬 */
.cs-sort { display: flex; gap: 4px; margin: 10px 14px 0; overflow-x: auto; scrollbar-width: none; }
.cs-sort button { flex: none; height: 30px; padding: 0 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.cs-sort button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.cs-sort button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .cs-dot { animation: none; }
}
.cs-info > div { padding: 18px 16px; }
.cs-info h3 { display: flex; align-items: center; gap: 6px; margin: 22px 0 10px; font-size: 13.5px; font-weight: 600; }
.cs-info h3:first-child { margin-top: 0; }
.cs-info h3 .cs-ico { color: var(--faint); }
.cs-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.cs-info dt { color: var(--muted); }
.cs-info dd { margin: 0; overflow-wrap: anywhere; }
.cs-info dd a { color: var(--accent); }
.cs-assign-note { font-size: 12.5px; color: var(--muted); }
.cs-rel { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cs-rel li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cs-rel li:first-child { padding-top: 0; }
.cs-rel b { display: block; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.cs-rel small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.cs-rel .cs-rel-none { border: 0; color: var(--faint); }
.cs-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 24px; background: var(--canvas); text-align: center; font-size: 14px; color: var(--muted); }
.cs-placeholder .cs-ico { width: 28px; height: 28px; color: var(--faint); }

.cs-new-dlg { width: min(96vw, 560px); padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); }
.cs-new-dlg::backdrop { background: rgba(23, 25, 28, 0.4); }
.cs-new-dlg h3, .cs-new-dlg h2 { margin: 0; font-size: 18px; }
.cs-dlg-sub { margin: 4px 0 16px; font-size: 13px; color: var(--muted); }
.cs-new-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.cs-new-grid .cs-span { grid-column: 1 / -1; }
.cs-new-grid textarea { padding: 8px 10px; border: 1px solid var(--rule); border-radius: 12px; font: inherit; font-size: 14px; color: var(--ink); resize: vertical; }
.cs-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

@media (max-width: 1280px) {
  .cs { grid-template-columns: 180px 300px minmax(0, 1fr); }
  .cs-detail { display: flex; flex-direction: column; overflow-y: auto; }
  .cs-thread { flex: none; min-height: 100%; }
  .cs-info { border-left: 0; border-top: 1px solid var(--rule); overflow: visible; }
  .cs-info-toggle { display: none; } /* 이 폭에선 고객 정보가 대화 아래로 가서 접을 필요 없음 */
  .cs-detail.is-wide .cs-info { display: block; }
}
/* 폰·좁은 화면(채널톡 모바일처럼): 목록이 화면 전체, 보관함은 위 한 줄을 옆으로 넘김. 문의를 누르면 상세가 화면 전체(머리 고정,
   대화는 페이지 스크롤로, 열면 마지막 메시지로). 입력칸 16px(아이폰 확대 방지), 위쪽 버튼·필터는 32~34px로 낮게(2026-11-06 요청),
   보내기 줄 44px, 수기 접수는 아래에서 올라오는 시트 */
@media (max-width: 900px) {
  .container:has(> #view-cs:not([hidden])) { padding: 0; }
  .cs { display: block; height: auto; min-height: 0; border: 0; border-radius: 0; overflow: visible; }
  .cs-side { flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--rule); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cs-side::-webkit-scrollbar { display: none; }
  .cs-title { display: none; }
  .cs-side-head { display: contents; } /* 폰은 보관함이 가로 한 줄이라 고정 머리 없이 그대로 */
  .cs-title.has-guide { flex: none; margin: 0; white-space: nowrap; } /* 가이드 버튼이 붙으면 제목이 보이는데 '상/담'으로 꺾이지 않게 */
  .cs-new-btn { flex: none; height: 32px; margin: 0; padding: 0 12px; font-size: 13px; }
  .cs-folders, .cs-group { flex-direction: row; flex-wrap: nowrap; gap: 6px; }
  .cs-folders { gap: 14px; }
  .cs-group-title { display: none; }
  .cs-folder { flex: none; width: auto; height: 32px; padding: 0 10px; font-size: 13px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); white-space: nowrap; }
  .cs-folder[aria-pressed="true"] { border-color: var(--accent); }
  .cs-folder-label { overflow: visible; }
  .cs-side-foot { flex: none; flex-direction: row; align-items: center; margin: 0; padding: 0; }
  .cs-side-foot small { display: none; }
  .cs-side-foot .btn { height: 32px; padding: 0 10px; }
  .cs-sort { margin-top: 8px; }
  .cs-sort button { height: 28px; font-size: 12px; }
  .cs-search { margin: 8px 12px; }
  .cs-search input { height: 34px; }
  .cs-search input, .cs-head-ctl .field input, .cs-head-ctl .field select, .cs-memo textarea, .cs-compose textarea, .cs-new-grid input, .cs-new-grid select, .cs-new-grid textarea { font-size: 16px; }
  .cs-compose { padding: 12px 14px; }
  .cs-compose-bar .btn { height: 44px; }
  .cs-compose-note { order: 3; flex-basis: 100%; }
  .cs-quick-list { max-height: 50vh; }
  .cs-quick-item { padding: 12px; }
  .cs-linkbtn { padding: 10px 0; }
  .cs-list { max-height: none; overflow: visible; }
  .cs-row { min-height: 64px; padding: 12px 16px; }
  .cs-placeholder { display: none; }
  .cs.is-open .cs-side, .cs.is-open .cs-list-col { display: none; }
  .cs-detail { display: block; overflow: visible; }
  .cs-thread { min-height: 0; }
  /* 고정 머리는 낮게: [목록으로]+이름 한 줄, 상태 버튼 한 줄, 담당·팀·유형 한 줄(칸 이름은 화면낭독기만 — 고른 값이 곧 설명) */
  .cs-head { position: sticky; top: var(--stick-top); z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; padding: 8px 14px 10px; box-shadow: 0 1px 0 var(--rule); }
  .cs-head .cs-back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; }
  .cs-head .btn-sm { height: 32px; padding: 0 10px; }
  .cs-who h2 { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .cs-who p { margin-top: 2px; font-size: 12.5px; }
  .cs-head-ctl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cs-head-ctl .seg { grid-column: 1 / -1; display: flex; }
  .cs-head-ctl .seg .btn { flex: 1; height: 32px; font-size: 13px; }
  .cs-head-ctl .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cs-head-ctl .field input, .cs-head-ctl .field select { width: 100%; height: 34px; padding: 0 6px; }
  /* 대화는 칸 안에서 따로 스크롤(2026-11-06): 대화 칸 = 상단 머리 아래 화면 높이, 끝에 닿아도 페이지·답장 칸으로 안 넘어감(overscroll contain).
     고객 정보(.cs-info)는 머리·답장 줄을 끌어 페이지를 내리면 보임 */
  .cs.is-open .cs-thread { display: flex; flex-direction: column; height: calc(var(--vvh, 100dvh) - var(--stick-top)); } /* --vvh = 실제 보이는 화면(주소창·툴바 뺀 것) */
  .cs.is-open .cs-head, .cs.is-open .cs-compose { flex: none; }
  .cs-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  #csMessages { padding: 16px 14px; }
  .cs-msg { max-width: 88%; }
  .cs-save-msg { grid-column: 1 / -1; }
  /* 채팅앱처럼 답장 칸은 화면 아래에 붙음. 답장 칸을 누르면(카톡처럼) 대화가 키보드 위 보이는 화면 전체를 채움:
     --vvh·--vvt = 키보드 뺀 화면 높이·위치(forms.js visualViewport), 머리는 이름 한 줄만, 대화는 칸 안 스크롤로 마지막 메시지.
     답장 칸은 2줄에서 시작해 6줄까지 커지고 그 뒤로는 칸 안에서 스크롤 */
  .cs-compose { position: sticky; bottom: 0; z-index: 2; padding-bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--rule); }
  #csReply { min-height: calc(2lh + 22px); max-height: calc(6lh + 22px); overscroll-behavior: contain; } /* 답장 칸도 따로 스크롤 */
  /* 설명문구만 작게 — 입력 글자는 16px 유지(아이폰 자동 확대 방지) */
  #csReply::placeholder { font-size: 12px; }
  .cs:has(#csReply:focus) .cs-thread { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); z-index: 40; display: flex; flex-direction: column; height: var(--vvh, 100dvh); background: var(--surface); }
  .cs:has(#csReply:focus) .cs-head { position: static; flex: none; }
  .cs:has(#csReply:focus) .cs-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .cs:has(#csReply:focus) .cs-compose { flex: none; padding-bottom: 10px; }
  .cs:has(#csReply:focus) .cs-head-ctl, .cs:has(#csReply:focus) #csSaveMsg { display: none; }
  .cs:has(#csReply:focus) .cs-compose-note:empty { display: none; }
  .cs:has(#csReply:focus) .cs-compose-bar { flex-wrap: nowrap; }
  .cs:has(#csReply:focus) .cs-compose-bar .btn { flex: none; padding: 0 10px; }
  .cs:has(#csReply:focus) .cs-compose-bar .btn-primary { margin-left: auto; }
  .cs-info { border-left: 0; border-top: 8px solid var(--canvas); overflow: visible; }
  .cs-info > div { padding: 16px 14px 28px; }
  .cs-new-dlg { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: var(--radius-l) var(--radius-l) 0 0; }
  .cs-new-grid { grid-template-columns: 1fr 1fr; }
  .cs-new-grid .field:has(textarea), .cs-new-grid .cs-span { grid-column: 1 / -1; }
  .cs-dlg-actions .btn { flex: 1; height: 44px; }
}
@media (max-width: 420px) {
  .cs-new-grid { grid-template-columns: 1fr; }
}

/* 원격 로그인 한글 입력칸(그림 아래 — 위쪽 도구 줄과 같은 바탕) */
.remote-type { flex-wrap: nowrap; }
.remote-type label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.remote-type input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; font-size: 16px; border: 1px solid var(--rule); border-radius: var(--radius-s); }

/* 판매 인보이스 목록(2026-11-03): 판매입력 완료 줄 강조, 오른쪽 끝 작업자 열 고정(가로로 밀어도 보임), 히스토리 창 */
#invTable tr.inv-done > td { background: var(--accent-soft); }
.inv-done-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
#invTable .inv-worker { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: -1px 0 0 var(--rule); white-space: nowrap; }
#invTable tr.inv-done > td.inv-worker { background: var(--accent-soft); }
#invTable td.inv-worker .btn { margin-left: 8px; }
.inv-hist { width: min(96vw, 560px); }
.inv-hist-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 16px; margin: 0 0 14px; }
.inv-hist-sum dt { font-size: 12px; color: var(--muted); }
.inv-hist-sum dd { margin: 0; font-size: 15px; font-weight: 700; }
.inv-hist-list { max-height: 50vh; overflow: auto; margin: 0 0 14px; padding-left: 18px; font-size: 13px; line-height: 1.8; }
.inv-hist-list time { color: var(--muted); font-variant-numeric: tabular-nums; }
/* 전체화면 공통(사용자 2026-11-03): PC 작업 화면은 판매입력처럼 화면 폭을 꽉 채움. 모바일 작업(재고조회·발주관리)·대시보드는 그대로 */
.container:has(> #view-invoice:not([hidden])),
.container:has(> #view-orders:not([hidden])),
.container:has(> #view-returns:not([hidden])),
.container:has(> #view-acct:not([hidden])),
.container:has(> #view-move:not([hidden])),
.container:has(> #view-product:not([hidden])),
.container:has(> #view-webup:not([hidden])),
.container:has(> #view-webuptools:not([hidden])),
.container:has(> #view-cs:not([hidden])) { max-width: none; }

/* 판매입력 > 인보이스 대사(주문번호 QR → 인쇄한 인보이스와 표 비교) */
.recon-bar label { font-size: 13px; font-weight: 700; color: var(--ink); }
.recon { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
.recon-ok { border-color: var(--accent); }
.recon-bad { border-color: var(--sold); }
.recon-head { margin: 0 0 8px; font-weight: 700; }
.recon-ok .recon-head { color: var(--accent); }
.recon-bad .recon-head { color: var(--sold); }
.recon-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recon-table th, .recon-table td { padding: 5px 8px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.recon-table thead th { color: var(--muted); font-weight: 600; border-top: 0; }
.recon-table tbody th { width: 80px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.recon-table tr.bad td { background: var(--sold-soft); }
.recon-table em { color: var(--sold); font-style: normal; font-weight: 700; }
.recon-mark { width: 52px; font-weight: 700; color: var(--accent); }
.recon-table tr.bad .recon-mark { color: var(--sold); }
#saleSheet tr.recon-row-ok > td { box-shadow: inset 3px 0 0 var(--accent); }
#saleSheet tr.recon-row-bad > td { background: var(--sold-soft); }

/* 발주 관리: 바코드·송장 태깅(모바일 먼저 — 한 손에 폰, 한 손에 상품) */
.pack-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pack-pick { width: 100%; display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.pack-pick:hover, .pack-pick:focus-visible { border-color: var(--accent); }
.pack-pick b { font-size: 16px; }
.pack-pick span { font-size: 13px; color: var(--muted); }
/* 발주 관리 카드 오른쪽 [수정]·[직권처리](관리자) */
.pack-list li { display: flex; gap: 8px; align-items: center; }
.pack-list li .pack-pick { flex: 1; min-width: 0; }
.pack-acts { display: flex; flex-direction: column; gap: 6px; }
.pack-done-box summary { cursor: pointer; padding: 6px 0 10px; color: var(--muted); font-weight: 600; }
.pack-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pack-head b { font-size: 18px; display: block; }
.pack-scan { display: flex; gap: 8px; margin-bottom: 14px; }
.pack-scan input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 2px solid var(--ink); border-radius: var(--radius-m); font: inherit; font-size: 17px; background: var(--surface); }
.pack-scan .btn { height: 48px; }
.pack-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-line { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
.pack-line-name { min-width: 0; display: grid; gap: 2px; }
.pack-line-name b { overflow-wrap: anywhere; }
.pack-line-name span { font-size: 12.5px; color: var(--muted); }
.pack-line.is-now { border: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 12px; }
.pack-line.is-done { background: var(--accent-soft); border-color: var(--accent-soft); }
.pack-line.is-wait { opacity: .6; }
.pack-tag { padding: 4px 8px; border-radius: 999px; border: 1px dashed var(--faint); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pack-tag.on { border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.pack-ok { display: grid; gap: 6px; justify-items: center; margin-top: 14px; padding: 22px 16px; border-radius: var(--radius-m); background: var(--accent); color: #fff; text-align: center; }
.pack-ok b { font-size: 22px; }
.pack-ok .btn { margin-top: 6px; color: var(--ink); background: var(--surface); }
.pack-err { max-width: min(420px, calc(100vw - 32px)); padding: 20px; border: 2px solid var(--sold); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); }
.pack-err::backdrop { background: rgba(178, 58, 48, .35); }
.pack-err b { display: block; font-size: 18px; color: var(--sold); margin-bottom: 6px; }
.pack-err p { margin: 0 0 16px; line-height: 1.6; }
.pack-err .btn { width: 100%; height: 44px; }
@media (max-width: 560px) {
  .pack-line { grid-template-columns: 1fr 1fr; }
  .pack-line-name { grid-column: 1 / -1; }
  .pack-tag { text-align: center; padding: 6px 8px; }
}

/* CS관리 > 서비스허브(hub.js): 상태 흐름 막대 + 목록 + 상세·수기작성 창.
   수기작성은 1~6 순서 — 지금 채울 칸(.is-now)만 번호가 깜빡이고 왼쪽 띠가 생김(이 화면에서 움직이는 건 이것 하나) */
/* 상태 탭(사용자 2026-11-04): 칸마다 떨어진 탭 + 아래 막대 = 그 상태 비율(전체 탭 = 완료율). 막대·숫자는 지난 값에서 새 값으로 차오름(hub.js growPct), 호버 = 테두리 진하게·막대 두껍게 */
.hub-flow { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.hub-flow-step { --bar: var(--muted); position: relative; overflow: hidden; flex: 1 0 auto; display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 14px 11px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.hub-flow-step::after { content: ''; position: absolute; left: 0; bottom: 0; width: var(--p, 0%); height: 3px; background: var(--bar); transition: width 0.7s var(--ease-out), height var(--t-fast) var(--ease-out); }
.hub-flow-step b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.hub-flow-pct { font-size: 12px; font-variant-numeric: tabular-nums; }
.hub-flow-step[data-status="진행"] { --bar: var(--accent); }
.hub-flow-step[data-status="보류"] { --bar: var(--amber); }
.hub-flow-step[data-status="취소"] { --bar: var(--faint); }
.hub-flow-step:is([data-status="완료"], [data-status=""]) { --bar: var(--ink); }
.hub-flow-step:hover { border-color: var(--ink); }
.hub-flow-step:hover::after { height: 5px; }
.hub-flow-step[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.hub-flow-step[aria-pressed="true"] b { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .hub-flow-step::after { transition: none; } }
.hub-table tbody tr { cursor: pointer; }
/* PC 표(사용자 2026-11-04): 상담마다 따로 테두리 + 줄 사이 6px, 머리글 = 가운데 정렬·칸마다 구분선. 짧은 칸(코드·종류·담당·상태·때)은 내용도 가운데 */
@media (min-width: 901px) {
  .table-wrap:has(> .hub-table) { border: 0; background: none; }
  /* 칸 너비 고정: 상태 탭을 바꿔 줄 내용이 달라져도 머리글이 움직이지 않게(사용자 2026-11-04). 고객·제품이 남는 폭을 나눔 */
  .hub-table { border-collapse: separate; border-spacing: 0 6px; table-layout: fixed; }
  .hub-table th:nth-child(1) { width: 150px; }
  .hub-table th:nth-child(2) { width: 80px; }
  .hub-table th:nth-child(3) { width: 14%; }
  .hub-table th:nth-child(5) { width: 120px; }
  .hub-table th:is(:nth-child(6), :nth-child(7)) { width: 80px; }
  .hub-table th:nth-child(8) { width: 120px; }
  .hub-table th:nth-child(9) { width: 96px; }
  .hub-table :is(.hub-c-code, .hub-c-kind, .hub-c-cs, .hub-c-owner) { overflow: hidden; text-overflow: ellipsis; }
  .hub-table td.hub-c-st, .hub-table td.hub-c-st .hx-wait { white-space: normal; }
  .hub-table thead th { padding: 10px; border: 0; border-left: 1px solid var(--rule); background: color-mix(in srgb, var(--ink) 7%, var(--surface)); color: var(--ink-2); font-weight: 600; text-align: center; }
  .hub-table th:first-child { border-left: 0; border-radius: var(--radius-s) 0 0 var(--radius-s); }
  .hub-table th:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
  .hub-table td { padding: 12px 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--surface); }
  .hub-table td:first-child { border-left: 1px solid var(--rule); border-radius: var(--radius-s) 0 0 var(--radius-s); }
  .hub-table td:last-child { border-right: 1px solid var(--rule); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
  .hub-table tbody tr:hover td { border-color: var(--ink); background: var(--mist); }
  .hub-table :is(.hub-c-code, .hub-c-kind, .hub-c-cs, .hub-c-owner, .hub-c-st, .hub-c-when) { text-align: center; }
}
.hub-code { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; white-space: nowrap; }
.hub-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--mist); color: var(--muted); }
.hub-st-진행 { background: var(--accent-soft); color: var(--accent); }
.hub-st-보류 { background: var(--amber-soft); color: var(--amber); }
.hub-st-완료 { background: var(--ink); color: #fff; }
.hub-st-취소 { text-decoration: line-through; }

.hub-dlg { width: min(96vw, 760px); max-height: 92vh; padding: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-l); background: var(--surface); color: var(--ink); }
.hub-dlg::backdrop { background: rgba(23, 25, 28, 0.4); }
.hub-dlg form { display: flex; flex-direction: column; max-height: 92vh; }
.hub-dlg-head { position: relative; padding: 18px 56px 10px 22px; border-bottom: 1px solid var(--rule); }
.hub-dlg-head h3 { margin: 0; font-size: 18px; }
.hub-dlg-head .modal-close { position: absolute; top: 10px; right: 10px; }
/* 묶음 제품 줄(2026-11-06): 제품 1 · 제품 2 … + [+ 제품] — 폰에서 줄바꿈, 긴 제품명은 말줄임 */
.hub-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.hub-group-go, .hub-group b[aria-current] { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); font: inherit; line-height: 1.4; }
.hub-group-go { background: var(--surface); color: var(--muted); cursor: pointer; }
.hub-group-go:hover, .hub-group-go:focus-visible { color: var(--ink); border-color: var(--ink); }
.hub-group b[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.hub-grp-n { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--rule, #ddd); font-size: 11px; color: var(--muted, #666); vertical-align: middle; }
.hub-dlg-body { overflow-y: auto; padding: 14px 22px; }
.hub-dlg .form-msg, .hub-dlg .cs-dlg-actions { margin: 0; padding: 0 22px; }
.hub-dlg .cs-dlg-actions { padding-bottom: 18px; padding-top: 8px; border-top: 1px solid var(--rule); }
.hub-top { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.hub-top .field input, .hub-top .field select { width: 150px; }
.hub-same { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.hub-steps { list-style: none; margin: 0; padding: 0; }
.hub-step { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 10px 10px 8px; border-left: 3px solid transparent; border-radius: var(--radius-s); }
.hub-step + .hub-step { margin-top: 2px; }
.hub-step-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule); font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-step.is-done .hub-step-no { background: var(--accent); border-color: var(--accent); color: #fff; }
.hub-step.is-now { border-left-color: var(--accent); background: var(--accent-soft); }
.hub-step.is-now .hub-step-no { border-color: var(--accent); color: var(--accent); animation: hub-blink 1.1s ease-in-out infinite; }
@keyframes hub-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 107, 87, 0.55); } 50% { box-shadow: 0 0 0 7px rgba(47, 107, 87, 0); background: var(--accent); color: #fff; } }
@media (prefers-reduced-motion: reduce) { .hub-step.is-now .hub-step-no { animation: none; } }
.hub-step-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hub-step-label { font-size: 14px; font-weight: 600; }
.hub-step-label small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.hub-auto { display: inline-block; margin-top: 4px; padding: 1px 9px; border-radius: 999px; background: var(--amber-soft); color: var(--ink-2); font-size: 12px; font-weight: 600; } /* 대화에서 자동 채움 — 직원이 저장하면 사라짐 */
.hub-step input, .hub-step textarea, .hub-dlg .field textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); }
.hub-tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; margin: 0; padding: 0; }
.hub-tiles:empty { display: none; }
.hub-tiles li { position: relative; aspect-ratio: 1; border-radius: var(--radius-s); overflow: hidden; background: var(--mist); }
.hub-tiles img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-tile-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(23, 25, 28, 0.65); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.hub-photo-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hub-photo-btns label.btn { display: inline-flex; align-items: center; cursor: pointer; }
.hub-src { margin-top: 10px; font-size: 13px; }
.hub-src summary { cursor: pointer; color: var(--muted); }
.hub-src pre { white-space: pre-wrap; margin: 6px 0 0; padding: 10px; border-radius: var(--radius-s); background: var(--mist); font: inherit; }
.hub-src ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.hub-kind-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 6px; }
.hub-kind-pick .btn { height: 44px; }
@media (max-width: 720px) {
  .hub-dlg { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .hub-dlg form { max-height: 100dvh; }
  .hub-top .field { flex: 1 1 45%; }
  .hub-top .field input, .hub-top .field select { width: 100%; font-size: 16px; }
  .hub-step input, .hub-step textarea { font-size: 16px; }
  .hub-kind-pick { grid-template-columns: repeat(2, 1fr); }
}
.recon-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.recon-top .recon-head { margin: 0; }
.recon-top + .recon-table { margin-top: 8px; }
/* 판매 인보이스 연락처: 지역번호 - 가운데 - 끝 */
.inv-phone { display: flex; align-items: center; gap: 6px; }
.inv-phone select { flex: 0 0 96px; }
.inv-phone input { flex: 1; min-width: 0; }
.inv-phone > span { color: var(--muted); }
.scan-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 0; padding: 0 16px; font-size: 13px; color: var(--muted); }
.scan-tools .scan-mode-btn { flex: 0 0 auto; }
.pack-track { margin-bottom: 8px; }
.pack-track.is-now { border: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 12px; }
.pack-track.is-done { background: var(--accent-soft); border-color: var(--accent-soft); }
.pack-line { grid-template-columns: 1fr auto; }
@media (max-width: 560px) { .pack-line { grid-template-columns: 1fr auto; } .pack-line-name { grid-column: auto; } }
.inv-phone-field { grid-column: span 2; }
@media (max-width: 640px) { .inv-phone-field { grid-column: auto; } }
/* 서비스허브 2차(2026-11-03): 칸별 세부 정보·부속품/컨디션 칩·구매 상품 카드·연속 촬영 */
.hub-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.hub-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.hub-etc { max-width: 360px; }
.hub-money { max-width: 220px; text-align: right; font-variant-numeric: tabular-nums; }
.hub-code-row { display: flex; gap: 6px; max-width: 420px; }
.hub-code-row input { flex: 1; }
.hub-prod { display: flex; gap: 10px; align-items: center; margin-top: 4px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); }
.hub-prod img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-s); background: var(--mist); }
.hub-pick { padding: 24px 0; }
.hub-cam { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.hub-cam[open] { display: flex; flex-direction: column; }
.hub-cam video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.hub-cam-shots { list-style: none; display: flex; gap: 6px; margin: 0; padding: 8px 12px; overflow-x: auto; min-height: 72px; }
.hub-cam-shots img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.hub-cam-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.hub-cam-bar .btn { min-width: 88px; height: 44px; }
.hub-shutter { width: 68px; height: 68px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, 0.25); cursor: pointer; }
.hub-shutter:active { background: #fff; }
/* 담당자 알림 숫자(hub.js poll이 html[data-hub-n]·--hub-n을 채움): CS관리 탭과 서비스허브 메뉴에. 메뉴를 다시 그려도 유지
   탭 ::after는 선택 밑줄이라 ::before + order로 글자 뒤에 둠 */
html[data-hub-n] { counter-reset: hubn var(--hub-n); }
html[data-hub-n] a.tab[href="#cs"]::before,
html[data-hub-n] a.ribbon-item[href="#hub"]::after {
  content: counter(hubn); 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;
}
html[data-hub-n] a.tab[href="#cs"]::before { order: 1; margin-left: 6px; }
html[data-hub-n] a.ribbon-item[href="#hub"] { position: relative; }
html[data-hub-n] a.ribbon-item[href="#hub"]::after { position: absolute; top: 2px; right: 2px; }
@media (max-width: 720px) {
  .hub-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-spec input, .hub-etc input, .hub-code-row input, .hub-money { font-size: 16px; }
  .hub-chip { min-height: 40px; }
}

/* 상세 창: 다음 단계 제안(자동으로 안 넘어가는 단계 — 첫 버튼이 할 일, 한 번 내려오며 나타남) */
/* 키/락·스트랩 칩 옆 더스트 있음/없음(필수) */
.hub-dust { display: inline-flex; gap: 0; margin-right: 6px; border: 1px solid var(--accent); border-radius: 999px; overflow: hidden; vertical-align: middle; }
.hub-dust-btn { min-height: 34px; padding: 0 10px; border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.hub-dust-btn + .hub-dust-btn { border-left: 1px solid var(--accent); }
.hub-dust-btn[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.hub-dust-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* 제시가 역제안 기록 한 줄 */
.hub-counter-line { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-s); background: var(--amber-soft); font-size: 13.5px; line-height: 1.5; }
.hub-counter-line b { color: var(--amber); }
.hub-counter-line small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
/* 고객 수락·거절: 목록 상태 옆 작은 표, 상세 제시 가격 칸 안 한 줄(고정 기록), 기록 시트의 고객 메시지 인용 */
.hub-consent { display: inline-block; margin-left: 4px; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.hub-consent.is-yes { background: var(--accent-soft); color: var(--accent); }
.hub-consent.is-no { background: var(--mist); color: var(--sold); }
.hub-consent-line { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-s); background: var(--mist); font-size: 13.5px; line-height: 1.5; }
.hub-consent-line.is-yes b { color: var(--accent); }
.hub-consent-line.is-no b { color: var(--sold); }
.hub-consent-line small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.hub-consent-msg { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.hub-consent-msg small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
/* 받은 담당자 한 화면 요약(창 위에 덮음, 폰은 한 화면 안에): 사진 → 제품 → 정보·컨디션·부속품·희망가 → 제시 가격 → 전달 */
.hub-quick { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 14px; background: rgba(23, 25, 28, 0.35); }
.hub-quick-card { width: min(100%, 420px); max-height: 100%; overflow-y: auto; padding: 16px; border-radius: var(--radius-l); background: var(--surface); box-shadow: 0 12px 32px rgba(23, 25, 28, 0.25); }
.hub-quick-code { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.hub-quick-img { display: block; width: 100%; max-height: 32vh; object-fit: contain; border-radius: var(--radius-s); background: var(--mist); }
.hub-quick-slide { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; border-radius: var(--radius-s); background: var(--mist); }
.hub-quick-slide .hub-quick-img { flex: 0 0 100%; height: 32vh; scroll-snap-align: center; border-radius: 0; }
.hub-quick-count { margin: 4px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.hub-quick h4 { margin: 10px 0 6px; font-size: 16px; line-height: 1.35; }
.hub-quick dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 10px; font-size: 13.5px; }
.hub-quick dt { color: var(--muted); }
.hub-quick dd { margin: 0; }
.hub-quick-btns { display: flex; gap: 8px; margin-top: 8px; }
.hub-quick-btns .btn { flex: 1; min-height: 44px; }
.hub-quick-btns .btn:first-child { flex: 0 0 auto; }
.hub-quick-note { margin: 0 0 4px; font-size: 13.5px; color: var(--ink-2); }
/* 묶음 요약(2026-11-06): 카드 = 제품 하나, 가로로 밀어 넘김(사진 슬라이드와 같은 scroll-snap) + 아래 ‹ 이전 상품 1 2 3 다음 상품 › */
.hub-quick-wrap { display: flex; flex-direction: column; width: min(100%, 420px); max-height: 100%; border-radius: var(--radius-l); background: var(--surface); box-shadow: 0 12px 32px rgba(23, 25, 28, 0.25); overflow: hidden; }
.hub-quick-deck { display: flex; flex: 1 1 auto; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hub-quick-deck > .hub-quick-card { flex: 0 0 100%; width: auto; max-height: none; border-radius: 0; box-shadow: none; scroll-snap-align: center; scroll-snap-stop: always; }
.hub-quick-pager { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--rule); }
.hub-pg-side { border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); padding: 10px 6px; min-height: 44px; cursor: pointer; }
.hub-pg-side:disabled { opacity: 0.35; cursor: default; }
.hub-pg-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.hub-pg-nums button { position: relative; min-width: 36px; min-height: 36px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.hub-pg-nums button[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.hub-pg-nums small { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; }
/* 목록 줄마다 [요약](상담코드 아래) */
.hub-quick-open { display: block; margin: 4px auto 0; padding: 2px 10px; min-height: 26px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.hub-quick-open:hover { border-color: var(--accent); color: var(--accent); }
.hub-quick-head { position: absolute; top: 14px; right: 56px; }
.hub-dlg-head:has(.hub-quick-head) { padding-right: 150px; }
/* PC 상세: 사진(1번)은 위 한 줄 그대로, 2~6번은 2단(사용자 2026-11-04) */
@media (min-width: 1000px) {
  .hub-dlg { width: min(96vw, 1080px); }
  .hub-steps:has(> [data-step="photos"]) { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; align-items: stretch; }
  .hub-steps:has(> [data-step="photos"]) > .hub-step { margin-top: 0; }
  .hub-steps > [data-step="photos"] { grid-column: 1 / -1; }
}
/* 제시 가격 도착 큰 알림(CS 담당): 화면 위 가운데, 누를 때까지 */
.hub-big-alert { position: fixed; top: 12px; left: 50%; z-index: 1000; display: flex; align-items: center; gap: 10px; width: min(94vw, 560px); padding: 14px 16px; border: 2px solid var(--accent); border-radius: var(--radius-m); background: var(--surface); box-shadow: 0 10px 30px rgba(23, 25, 28, 0.22); transform: translateX(-50%); animation: hub-big-in 0.35s ease-out; }
.hub-big-alert b { flex: none; color: var(--accent); font-size: 15px; }
.hub-big-alert span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; }
.hub-big-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
@keyframes hub-big-in { from { opacity: 0; transform: translate(-50%, -12px); } }
@media (prefers-reduced-motion: reduce) {
  .hub-big-alert { animation: none; }
}
/* 다음 단계는 창을 내려도 맨 위에 고정(사용자 2026-11-04: 버튼이 헷갈림 → 지금 할 일을 늘 보이게). 아래 고객과의 대화 말풍선 */
.hub-next { position: sticky; top: -14px; z-index: 3; box-shadow: 0 4px 10px rgba(23, 25, 28, 0.06); }
.hub-chat-body { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius-s); background: var(--cs-chat, var(--mist)); }
.hub-bubble { align-self: flex-start; max-width: 85%; margin: 0; }
.hub-bubble span { display: block; padding: 8px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; }
.hub-bubble small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.hub-bubble.is-manager { align-self: flex-end; text-align: right; }
.hub-bubble.is-manager span { border-radius: 12px 4px 12px 12px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); text-align: left; }
.hub-bubble.is-bot span { background: none; border: 1px dashed var(--rule); color: var(--muted); }
.hub-bubble .cs-imgs img { width: min(160px, 40vw); height: auto; } /* 말풍선이 내용 폭이라 auto면 0으로 줄어듦 */
.hub-bubble.is-manager .cs-imgs { justify-content: flex-end; }
.hub-next { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--radius-s); background: var(--accent-soft); animation: hub-next-in 0.32s ease-out; }
.hub-next-label { font-size: 12px; font-weight: 700; color: var(--accent); }
.hub-next p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.hub-next-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hub-next-btns .btn-primary { animation: hub-next-pulse 1.6s ease-out 0.4s 2; }
@keyframes hub-next-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes hub-next-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
/* 대표 사진 1장 크게 + 나머지 작은 그림 */
.hub-gallery { margin: 0 0 14px; }
.hub-main { margin: 0; border-radius: var(--radius-s); background: var(--mist); overflow: hidden; }
.hub-main img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.hub-thumbs { list-style: none; display: flex; gap: 6px; margin: 8px 0; padding: 0; overflow-x: auto; }
.hub-thumbs button { display: block; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; overflow: hidden; cursor: pointer; }
.hub-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.hub-thumbs img { width: 100%; height: 100%; object-fit: cover; }
/* 우리 제시 가격 + 추천 가격 */
.hub-offer { margin: 14px 0; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-s); }
.hub-svc { margin: 14px 0; padding: 14px; border: 1px dashed var(--rule); border-radius: var(--radius-s); }
.hub-fee { max-width: 11em; }
.hub-cs-line { margin: 6px 0; font-size: 14px; }
.hub-cs-line small { margin-left: 4px; color: var(--muted); }
.hub-fee input { width: 100%; }
.hub-counter-item + .hub-counter-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.hub-offer h4, .hub-svc h4 { margin: 0 0 10px; font-size: 15px; }
.hub-offer h4 small, .hub-svc h4 small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.hub-offer-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.hub-price-box { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 13px; }
.hub-price-head { margin: 0 0 8px; font-weight: 600; }
.hub-price-head small { font-weight: 400; color: var(--muted); }
.hub-price-avg { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; }
.hub-price-avg li { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 6px; background: var(--surface); }
.hub-price-avg li span { font-size: 11.5px; color: var(--muted); }
.hub-price-avg li b { font-variant-numeric: tabular-nums; }
.hub-price-avg li.is-main { outline: 2px solid var(--accent); }
.hub-price-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 200px; overflow-y: auto; }
.hub-price-list li { padding: 4px 0; border-bottom: 1px solid var(--rule); }
.hub-price-list li span { color: var(--muted); }
.hub-price-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 목록 대표 사진 */
.hub-thumb { float: left; width: 40px; height: 40px; margin: 0 10px 0 0; border-radius: 6px; object-fit: cover; background: var(--mist); }
@media (prefers-reduced-motion: reduce) {
  .hub-next, .hub-next-btns .btn-primary { animation: none; }
}
/* 표 모드: 짧은 칸은 한 줄로(이름·종류가 한두 자씩 꺾이지 않게) */
.hub-table .hub-code, .hub-c-kind, .hub-c-cs, .hub-c-owner, .hub-c-st, .hub-c-cust .cell-sub, .hub-c-money { white-space: nowrap; }
@media (max-width: 900px) {
  /* 폰·태블릿 세로 목록 = 상담마다 카드(표 칸이 좁아 고객·제품이 한두 자씩 꺾이던 것, 2026-11-03 사용자):
     위 = 상담코드·종류 … 상태, 가운데 = 제품(가장 굵게)·고객·연락처, 아래 = 금액 … 담당 */
  .table-wrap:has(> .hub-table) { overflow: visible; border: 0; background: none; }
  .hub-table, .hub-table tbody { display: block; }
  .hub-table thead, .hub-table td.hide-sm { display: none; }
  .hub-table tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "code kind st" "prod prod prod" "cust cust cust" "money money money" "cs cs owner"; align-items: center; gap: 2px 8px; margin-bottom: 10px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); }
  .hub-table tbody tr:hover { background: var(--surface); }
  .hub-table tbody tr:active { background: var(--mist); }
  .hub-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .hub-table td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  .hub-c-code { grid-area: code; }
  .hub-c-code .hub-code { font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .hub-c-code .hub-quick-open { display: inline-block; margin: 0 0 0 6px; min-height: 28px; vertical-align: middle; }
  .hub-c-kind { grid-area: kind; font-size: 12.5px; color: var(--ink-2); }
  .hub-c-st { grid-area: st; justify-self: end; text-align: right; }
  .hub-c-prod { grid-area: prod; margin-top: 6px; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
  .hub-c-prod .cell-sub { font-weight: 400; }
  .hub-table td.hub-c-cust, .hub-table td.hub-c-money { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
  .hub-c-cust { grid-area: cust; font-size: 13.5px; color: var(--ink-2); }
  .hub-c-cust .cell-sub, .hub-c-money .cell-sub { margin: 0; }
  .hub-table td.hub-c-money { grid-area: money; margin-top: 8px; column-gap: 6px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: left; }
  .hub-c-money .cell-sub { font-weight: 400; }
  .hub-c-cs, .hub-c-owner { justify-self: end; margin-top: 4px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
  .hub-c-cs { grid-area: cs; justify-self: start; }
  .hub-c-owner { grid-area: owner; }
  .hub-c-cs:not(:empty)::before { content: 'CS 담당 '; color: var(--muted); }
  .hub-c-owner:not(:empty)::before { content: '확인자 '; color: var(--muted); }
}

/* ----- 사용 가이드(사용자 2026-11-03): 화면 머리 책자 아이콘 → 가이드 팝업, 홈 [가이드북] → 목차 + 장 넘김 ----- */
/* 번호(쓰는 순서) = 캡처 이미지의 번호 표시와 같은 숫자 — 시에나/피치 원이 이 가이드의 유일한 강조 */
.page-head.has-guide { position: relative; padding-right: 96px; }
.page-head.has-guide:has(> .guide-book-btn) { padding-right: 118px; }
.page-head.has-guide > .guide-btn { position: absolute; top: 0; right: 0; }
.cs-title.has-guide { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* 피치 바탕·시에나 글자 = 가이드 번호 원과 같은 색 — 화면 버튼들(초록·흰색) 사이에서 바로 보이게(사용자 2026-11-03) */
.guide-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-left: auto; padding: 0 12px 0 10px; border: 1px solid color-mix(in srgb, var(--sienna, #5d2a1a) 22%, var(--peach, #fbe1d1)); border-radius: 999px; background: var(--peach, #fbe1d1); color: var(--sienna, #5d2a1a); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.guide-btn:hover { border-color: var(--sienna, #5d2a1a); }
.guide-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.guide-btn:focus-visible, .guide-dlg button:focus-visible, .guide-dlg select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide-dlg { width: min(96vw, 760px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius-l, 20px); background: var(--surface); color: var(--ink); overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
.guide-dlg::backdrop { background: rgba(23, 25, 28, 0.45); }
.guide-dlg[open] { display: grid; grid-template-columns: minmax(0, 1fr); }
.guide-dlg.is-book { width: min(96vw, 1040px); height: 92vh; grid-template-columns: 220px minmax(0, 1fr); }
.guide-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mist, #f2f2f3); font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.guide-page { max-height: 92vh; overflow-y: auto; padding: 28px 36px 32px; overscroll-behavior: contain; }
.guide-where { margin: 0 44px 6px 0; font-size: 13px; color: var(--muted); }
.guide-page h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.guide-what { max-width: 60ch; margin: 0 0 20px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.guide-page h3 { margin: 24px 0 10px; font-size: 15px; font-weight: 700; }
.guide-fig { margin: 0 0 8px; padding: 10px; border-radius: var(--radius-m); background: var(--mist, #f2f2f3); }
.guide-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--radius-s); }
.guide-fig a { display: block; cursor: zoom-in; }
.guide-fig figcaption { margin: 8px 2px 0; font-size: 12px; color: var(--muted); }
.guide-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.guide-videos figure { margin: 0; }
.guide-videos video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--mist, #f2f2f3); }
.guide-videos figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.guide-videos figcaption b { color: var(--ink, inherit); font-weight: 600; }
.guide-ol, .guide-ul { max-width: 62ch; margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.7; }
.guide-ol { counter-reset: gstep; }
.guide-ol li { counter-increment: gstep; position: relative; padding: 0 0 12px 40px; }
.guide-ol li::before { content: counter(gstep); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--peach, #fbe1d1); color: var(--sienna, #5d2a1a); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.guide-ul li { position: relative; padding: 0 0 8px 18px; }
.guide-ul li::before { content: ''; position: absolute; left: 4px; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); }
.guide-tips li::before { background: var(--accent); }
.g-key { display: inline-block; padding: 0 7px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.guide-turn { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); }
.guide-toc { overflow-y: auto; padding: 24px 12px 24px 16px; border-right: 1px solid var(--rule); background: var(--canvas); }
.guide-toc-title { margin: 0 0 14px 8px; font-size: 17px; font-weight: 700; }
.guide-toc-tab { margin: 14px 0 4px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.guide-toc ul { margin: 0; padding: 0; list-style: none; }
.guide-toc button { width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius-s); background: none; font: inherit; font-size: 14px; text-align: left; color: var(--ink-2); cursor: pointer; }
.guide-toc button:hover { background: var(--mist, #f2f2f3); }
.guide-toc button[aria-current='page'] { background: var(--peach, #fbe1d1); color: var(--sienna, #5d2a1a); font-weight: 700; }
.guide-toc-pick { display: none; }
@media (max-width: 720px) {
  .guide-dlg, .guide-dlg.is-book { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .guide-dlg.is-book { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .guide-dlg.is-book .guide-toc { display: none; }
  .guide-toc-pick { display: block; padding: 12px 56px 12px 16px; border-bottom: 1px solid var(--rule); }
  .guide-toc-pick select { width: 100%; height: 40px; font-size: 16px; }
  .guide-page { max-height: none; padding: 20px 16px 28px; }
  .guide-dlg:not(.is-book) .guide-page { max-height: 100dvh; }
}

/* 홈 > 공지(notice.js). 띠 = 안 읽은 공지가 있을 때만 화면 위 한 줄 */
.notice-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 12px 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--rule)); border-radius: var(--radius-m); background: var(--accent-soft); }
.notice-bar[hidden] { display: none; }
.notice-bar-tag { flex: none; padding: 1px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.notice-bar-title { flex: 1; min-width: 0; overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.notice-bar-title:hover { text-decoration: underline; }
.notice-bar-more { flex: none; color: var(--muted); font-size: 13px; }
.notice-bar a.btn { flex: none; color: var(--ink); text-decoration: none; }
.notice-wrap { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.notice-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--stick-top, 0px) + 12px); }
.notice-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-s); background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.notice-item:hover { background: var(--mist); }
.notice-item.is-on { border-color: var(--rule); background: var(--surface); color: var(--ink); }
.notice-item-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.notice-item-meta { font-size: 12px; color: var(--muted); }
.notice-dot { display: inline-block; width: 7px; height: 7px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.notice-doc { padding: 22px 26px 26px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); outline: none; }
.notice-doc-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.notice-doc-head h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.notice-doc-head p { grid-column: 1; margin: 0; font-size: 13px; color: var(--muted); }
.notice-doc-tools { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-self: start; }
.notice-body { max-width: 72ch; word-break: keep-all; overflow-wrap: anywhere; font-size: 15px; line-height: 1.75; color: var(--ink); }
.notice-body h3 { margin: 24px 0 6px; font-size: 16px; }
.notice-body p { margin: 12px 0 0; }
.notice-body ul { margin: 6px 0 0; padding-left: 20px; }
.notice-body li + li { margin-top: 5px; }
.notice-body mark { padding: 1px 3px; border-radius: 3px; background: var(--amber-soft); color: var(--ink); font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.notice-dlg { width: min(94vw, 720px); padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); }
.notice-dlg h3 { margin: 0 0 12px; }
.notice-dlg .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.notice-dlg input[name="title"], .notice-dlg textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; }
.notice-dlg textarea { resize: vertical; line-height: 1.6; }
.notice-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.notice-pin { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.notice-dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 900px) {
  .notice-wrap { grid-template-columns: 1fr; gap: 12px; }
  .notice-list { position: static; }
  .notice-doc { padding: 16px; }
  .notice-doc-head { grid-template-columns: 1fr; }
  .notice-doc-tools { grid-column: 1; grid-row: auto; }
  .notice-dlg input[name="title"], .notice-dlg textarea { font-size: 16px; }
}
/* 새 버전 [업데이트](notice.js) — 상단 바에서 눈에 띄게 */
/*  클레이(말랑한 점토) 모양 + 그라데이션(사용자 2026-11-05): 위·왼쪽 안쪽 빛, 아래·오른쪽 안쪽 그늘, 아래로 떨어지는 부드러운 그림자(빛 번짐 없음).
    움직임 = 처음 한 번 통 튀어나오고, 3.6초마다 말랑하게 눌렸다 늘어남(찌그러짐·늘어남) + 아이콘 한 바퀴, 그라데이션은 천천히 흐름. 누르면 눌린 점토처럼 들어감 */
.app-update {
  --clay-hi: rgb(255 255 255 / 0.7); --clay-lo: rgb(156 74 0 / 0.38); --clay-drop: rgb(150 72 0 / 0.42);
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 15px 0 11px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #ffe08a 0%, #ffbe55 30%, #f7943a 62%, #ec6f45 100%); background-size: 220% 220%;
  color: #3d1f00; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; cursor: pointer;
  box-shadow: inset 2px 3px 4px var(--clay-hi), inset -3px -4px 7px var(--clay-lo), 0 7px 14px -6px var(--clay-drop);
  transform-origin: 50% 100%;
  animation: clay-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both, clay-flow 6s ease-in-out infinite, clay-squish 3.6s ease-in-out 1s infinite;
  transition: box-shadow var(--t-mid) var(--ease-out), translate var(--t-mid) var(--ease-out);
}
.app-update svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: clay-spin 3.6s ease-in-out 1s infinite; }
.app-update:hover { translate: 0 -1px; box-shadow: inset 2px 3px 4px var(--clay-hi), inset -3px -4px 7px var(--clay-lo), 0 10px 18px -6px var(--clay-drop); }
.app-update:active { translate: 0 1px; animation-play-state: paused; box-shadow: inset 3px 4px 8px var(--clay-lo), inset -2px -2px 4px var(--clay-hi), 0 3px 6px -3px var(--clay-drop); }
.app-update:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.app-update[hidden] { display: none; }
@keyframes clay-pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.12, 0.9); opacity: 1; } 80% { transform: scale(0.95, 1.06); } 100% { transform: scale(1); } }
@keyframes clay-squish { 0%, 70%, 100% { transform: scale(1); } 76% { transform: scale(1.1, 0.88); } 83% { transform: scale(0.94, 1.08); } 90% { transform: scale(1.03, 0.97); } }
@keyframes clay-flow { 0%, 100% { background-position: 0% 30%; } 50% { background-position: 100% 70%; } }
@keyframes clay-spin { 0%, 70% { transform: rotate(0); } 92%, 100% { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .app-update, .app-update svg { animation: none; } }
/* 공지 읽음(마스터만) */
.notice-read-badge { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.notice-reads-btn { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.notice-reads-btn .notice-read-badge { margin-left: 4px; background: var(--accent-soft); color: var(--accent); }
.notice-reads { grid-column: 1 / -1; margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 13px; line-height: 1.7; }
.notice-reads p { margin: 0; }
.notice-reads small { margin-left: 3px; color: var(--muted); }
/* CS [AI 추천] 옆 오늘 남은 횟수(하루 600번) */
.cs-ai-left { align-self: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-ai-left.is-low { color: var(--amber); font-weight: 600; }
/* CS 대화: 직원 내부 메모(채널톡처럼 노란 메모 — 고객은 못 봄, 사용자 2026-11-05) */
#csMessages .cs-msg.is-memo p { border: 1px dashed color-mix(in srgb, var(--amber) 55%, transparent); background: var(--amber-soft); box-shadow: none; }
.cs-memo-tag { display: inline-block; margin-bottom: 3px; padding: 0 8px; border-radius: 999px; background: var(--amber); color: var(--surface); font-size: 11px; font-weight: 700; line-height: 1.7; }
/* CS 대화 속 사진(채널톡 첨부) — 작은 그림, 누르면 원본 */
.cs-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cs-msg.is-manager .cs-imgs { justify-content: flex-end; }
.cs-imgs img { display: block; width: auto; height: auto; max-width: min(220px, 60vw); max-height: 260px; border: 1px solid var(--rule); border-radius: 10px; background: var(--mist); object-fit: cover; }
.cs-file { display: inline-block; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); font-size: 13px; }
/* 메모 표시는 말풍선 글 안 맨 앞(봇 메시지가 2칸 grid라 따로 두면 글이 좁은 칸으로 밀림 — 사용자 2026-11-05) */
.cs-memo-tag { margin: 0 6px 0 0; vertical-align: 1px; }
.cs-msg.is-bot .cs-imgs { grid-column: 2; }
/* 사진 크게 보기 */
.cs-lightbox { max-width: 96vw; max-height: 94vh; padding: 0; border: 0; border-radius: 12px; background: #000; overflow: hidden; }
.cs-lightbox::backdrop { background: rgba(0, 0, 0, 0.75); }
.cs-lightbox img { display: block; max-width: 96vw; max-height: 94vh; object-fit: contain; }
.cs-lightbox .modal-close { position: absolute; top: 8px; right: 8px; color: #fff; background: rgba(0, 0, 0, 0.45); border-radius: 50%; }
/* 새 공지 띠: 제목을 누르면 팝업 */
.notice-bar-title { padding: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.notice-pop { width: min(94vw, 560px); max-height: 86vh; padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); color: var(--ink); overflow: auto; }
.notice-pop::backdrop { background: rgba(23, 25, 28, 0.4); }
.notice-pop-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 14px 16px 8px; background: var(--surface); }
.notice-pop-head h3 { flex: 1; min-width: 0; margin: 0; font-size: 17px; line-height: 1.4; }
.notice-pop-meta { margin: 0; padding: 0 16px; font-size: 12.5px; color: var(--muted); }
.notice-pop .notice-body { padding: 0 16px; font-size: 14.5px; }
.notice-pop-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--rule); background: var(--surface); }
.notice-pop-foot .btn { min-height: 42px; }
.notice-pop-foot a.btn { text-decoration: none; }
/* 동그란·알약 버튼 글자 가운데(사용자 2026-11-05 전체 점검). :where = 선택도 0 — 화면별로 display를 따로 정한 곳은 그대로 */
:where(.modal-close, .drawer-x, .to-top-btn, .hub-tile-x, .hub-big-x, .guide-close, .blur-del) { display: inline-grid; place-items: center; padding: 0; line-height: 1; }
:where(.btn, .load-more-btn, .ghost-btn, .logout-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; }
:where(.pill, .cs-count, .drawer-sec summary small, .notice-read-badge, .notice-bar-tag, .cs-memo-tag) { display: inline-flex; align-items: center; justify-content: center; line-height: 1.4; }
.pill, .cs-count { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
/* 공지 화면 = 분류 고르기 + 목록(순번·분류·제목·일자), 누르면 작은 창(사용자 2026-11-05) */
.notice-wrap { display: block; max-width: 920px; }
.notice-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.notice-cat-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.notice-cat-btn small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.notice-cat-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.notice-rows { margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); overflow: hidden; }
.notice-rows li + li { border-top: 1px solid var(--rule); }
.notice-row { display: grid; grid-template-columns: 2.5em auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.notice-row:hover { background: var(--mist); }
.notice-row.is-unread { color: var(--ink); }
.notice-row.is-unread .notice-row-title { font-weight: 600; }
.notice-no { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.notice-cat { display: inline-flex; align-items: center; justify-content: center; padding: 1px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.notice-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.notice-pin-tag { margin-left: 6px; color: var(--amber); font-size: 11.5px; font-weight: 600; }
.notice-row-date { display: inline-flex; align-items: center; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.notice-pop-head .notice-cat { flex: none; }
.notice-pop .notice-reads { margin: 6px 16px 0; }
.notice-pop-gap { flex: 1; }
.notice-dlg select { width: 100%; padding: 7px 9px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); font: inherit; }
@media (max-width: 720px) {
  .notice-row { grid-template-columns: 2em auto minmax(0, 1fr); grid-template-areas: "no cat date" "no title title"; gap: 3px 10px; padding: 10px 12px; }
  .notice-no { grid-area: no; align-self: start; padding-top: 2px; }
  .notice-row .notice-cat { grid-area: cat; justify-self: start; }
  .notice-row-date { grid-area: date; justify-self: end; }
  .notice-row-title { grid-area: title; white-space: normal; }
}
