/* ============================================================
   AHA 고객사용 앱 (aha-customer-app) — 공통 스타일
   기준은 「AHA 디자인 테마 확정본」(사본 03_Shared/Brand/DESIGN.md) + 그레이 구조틀(2026-09-08).
   - 주 버튼·체크박스 채움은 테라코타 #C9552C + 눌림반응 (확정본 5·6절)
   - 검정은 둘만: 글자 #201D1A · 면 차콜 #262220(Insights 표지·모달 머리·그래프 마지막 점 포함). 다크브라운 #2B2118 은 2026-11-19 없앰
   - 서체는 SUIT 1종, 숫자 줄맞춤은 tabular-nums. 라벨·표 머리에 대문자·자간 없음 (2026-11-03 정리)
   - 카드 묶음 대신 패널+hairline, 선택 상태는 컬러 보더로만
   ============================================================ */
:root {
  --aha-bg-page:     #E8E6E2;
  --aha-bg-content:  #F4F3F0;
  --aha-bg-card:     #FFFFFF;
  --aha-bg-sunken:   #DCD9D4;
  --aha-bg-hover:    #F8F7F4;
  --aha-bg-disabled: #EFEDE9;
  --aha-border:      #C6C2BB;
  --aha-border-soft: #E1DED9;
  /* 입력칸 테두리 — 흰 바탕 대비 약 3.1:1(--aha-border 는 약 1.8:1로 희미했다). 결정 로그 11-20 「Input 중요 칸 구분」 ①.
     --aha-border 는 버튼 · 모달 · 표 · 도움말에도 쓰여 그대로 두고, 입력칸(.field)만 이 값을 쓴다 */
  --aha-border-input: #98918A;
  /* 필수 별표에만 쓰는 밝은 테라코타(같은 결정 ⑤) */
  --aha-req-mark: #E8683A;

  /* KPI·AI요약 패널 전용 (2026-09-23 지시값). 위 border 계열보다 한 단계 연하다 —
     패널은 바깥 테두리 하나만 두고 안쪽은 머리카락 선으로만 나눈다. */
  --aha-panel-border: #E3DED5;
  --aha-panel-line:   #ECE7DE;
  --aha-panel-label:  #6B6259;
  --aha-panel-value:  #262220;
  --aha-panel-body:   #3A352F;

  /* 탭 전용 (2026-09-24 E단계 — 5개 제품 이름 통일).
     값은 바로 위 패널 색과 같지만 **이름을 따로 둔다.** 탭 색을 손볼 때 패널까지
     같이 바뀌면 안 되고, 무엇보다 Policy·Price가 이미 이 이름으로 쓰고 있어서다
     — 같은 자리를 제품마다 다른 이름으로 부르던 것이 이번에 고친 것이다.
     계층1(어두운 바 위)은 바탕이 달라 --aha-nav-idle 을 따로 쓴다. */
  --aha-tab-idle:     #6B6259;   /* 계층2~4 비활성 글자 */
  --aha-tab-line:     #E3DED5;   /* 계층3 비활성 보더 (고를 수 있음을 드러내는 옅은 선) */

  --aha-text-strong: #201D1A;
  --aha-text:        #3C3835;
  --aha-text-sub:    #6C6660;
  --aha-text-muted:  #98918A;

  --aha-brand-bar:      #262220; /* 차콜 — 2026-10-07 5개 제품·랜딩 #262220으로 통일, 2026-11-19 다크브라운(--aha-brand #2B2118) 남은 곳도 이 값으로 */
  --aha-brand-bar-text: #F5F2EE;
  --aha-brand-bar-sub:  #A69E96;

  --aha-accent:        #C9552C;
  /* 어두운 브랜드바 위에서 쓰는 테라코타. #C9552C는 어두운 바탕에서 탁해 보여
     한 단 밝힌 값을 따로 둔다 (2026-09-23 규격서 계층1). */
  --aha-accent-on-dark: #E07A4C;
  /* 브랜드바 위 비활성 탭 글자. 바탕과 붙지 않으면서 활성보다는 물러나는 톤. */
  --aha-nav-idle:       #C9BCAA;
  --aha-accent-hover:  #B94D27;
  --aha-accent-shadow: #9C4020;
  --aha-accent-soft:   #F5E5DC;

  --aha-success-border: #639922;
  --aha-success-text:   #27500A;
  --aha-warn:           #9C4A28;
  --aha-amber:          #B37E2A;
  --aha-bg-warn-soft:   #F7EBDC;
  --aha-bg-danger-soft: #F8E3DC;

  /* 그래프 (2026-11-20 그래프 작업 · 디자인 확정본 「그래프: 무채색 농도차 중심 · 추이 상승 #639922 / 하락 #9C4A28」) */
  --aha-trend-up:      #639922;
  --aha-trend-down:    #9C4A28;
  --aha-chart-strong:  #7A736C;   /* 진한 회색 막대 — Hub 무선 */
  --aha-chart-soft:    #C9C3BB;   /* 연한 회색 막대 — Hub 유선 · 지난달 선 */

  --aha-font: 'SUIT', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  /* 수치 자리 — 모노 서체 없이 SUIT 그대로, 줄맞춤은 각 자리의 tabular-nums 가 맡는다 (확정본 2절) */
  --aha-font-mono: var(--aha-font);

  /* 모서리 둥글기 — 5개 제품 공통 2단계 (2026-09-24 확정).
     작은 것 8px = 버튼·칩·배지·입력칸·탭, 큰 것 12px = 카드·패널·모달.
     **이 두 값 말고 다른 숫자를 쓰지 않는다.** 6px·10px·14px이 섞여 있던 것을 이때 걷어냈다.

     스케일 밖으로 남긴 것 둘 — 크기가 아니라 모양 자체가 뜻을 가진 것들이다:
       50%    슬라이더 점·화살표 (원)
       20px 미만 그래픽 조각 — 목표바(높이 7px)·범례 스와치(11px).
              8px를 주면 제 높이의 절반을 넘어 동그래지고, 그러면 다른 것으로 읽힌다
              (네모 스와치가 점이 되면 막대그래프 범례가 꺾은선 범례처럼 보인다). */
  --radius-sm: 8px;
  --radius-md: 12px;

  /* --- 선택 상태 입체감 3단계 (2026-09-30 확정 · 디자인 테마 확정본 9절 · 5개 제품 공통) ---
     탭·하위 탭·필터·칩·세그먼트처럼 "고른 것"을 보여주는 컨트롤 전용. 활성은 떠오르고,
     비활성을 담는 트레이는 눌려 있다. 이 블록은 Policy Center·Price·고객사용 앱 세 레포에
     이름·값을 글자 하나까지 똑같이 둔다 — 한쪽만 고치지 말 것.
     1 = 제품 안 최상위 전환 탭 / 2 = 하위 탭 / 3 = 필터·칩·세그먼트 */
  --aha-sel-surface: linear-gradient(var(--aha-bg-card), #FAF9F7);
  --aha-sel-tray-bg: var(--aha-bg-sunken);
  --aha-sel-tray-radius: 12px;
  --aha-sel-radius: 8px;
  --aha-sel-tray-1: inset 0 2px 5px rgba(32,29,26,.16), inset 0 -1px 0 rgba(255,255,255,.55);
  --aha-sel-tray-3: inset 0 2px 4px rgba(32,29,26,.12), inset 0 -1px 0 rgba(255,255,255,.5);
  --aha-sel-tray-pad-1: 4px;
  --aha-sel-tray-pad-3: 3px;
  --aha-sel-tray-gap: 2px;
  --aha-sel-lift-1: inset 0 1px 0 #fff, 0 1px 0 rgba(32,29,26,.18), 0 4px 8px -1px rgba(32,29,26,.22), 0 8px 14px -6px rgba(32,29,26,.22);
  --aha-sel-lift-2: inset 0 1px 0 #fff, 0 1px 0 rgba(32,29,26,.14), 0 2px 5px -1px rgba(32,29,26,.18);
  --aha-sel-lift-3: inset 0 1px 0 #fff, 0 1px 0 rgba(32,29,26,.14), 0 3px 6px -1px rgba(32,29,26,.2);
  --aha-sel-raise: translateY(-1px);
  --aha-sel-sink: translateY(1px);
  --aha-sel-press: inset 0 2px 4px rgba(32,29,26,.22);
  --aha-sel-motion: transform .12s ease, box-shadow .12s ease;
  --aha-sel-1-size: 14px;
  --aha-sel-1-pad: 8px 20px;
  --aha-sel-1-weight: 600;
  --aha-sel-1-weight-on: 700;
  --aha-sel-2-size: 12px;
  --aha-sel-2-pad: 7px 12px;
  --aha-sel-2-weight: 500;
  --aha-sel-2-weight-on: 600;
  --aha-sel-3-size: 12px;
  --aha-sel-3-pad: 7px 10px;
  --aha-sel-3-weight: 500;
  --aha-sel-3-weight-on: 600;
  --aha-sel-3-min-w: 70px;
  --aha-filter-label-size: 11px;
  --aha-filter-label-weight: 600;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-family: var(--aha-font); }
body { background: var(--aha-bg-content); color: var(--aha-text); font-size: 14px; line-height: 1.55; }
::selection { background: var(--aha-accent); color: #fff; }
:focus-visible { outline: 2px solid var(--aha-accent); outline-offset: 2px; }
a { color: inherit; }
button { font-family: inherit; }

/* ---------- 상단바 (2026-09-30 확정 · F안 바 + G2 제품 스위처 · 5개 제품 공통) ----------
   흰 바 56px + 바닥 4px 차콜 띠(밑줄 아님, 활성 표시와 무관) + 차콜 글자 로고 24px(태그라인 없음).
   제품 이동은 탭이 아니라 로고 옆 스위처 메뉴다 — 화면 안 탭(9절 트레이)과 모양을 구분한다.
   띠·로고·스위처의 차콜 #262220 은 --aha-brand-bar(로그인 배경)와 같은 값이다(2026-10-07 통일).
   모달 머리도 같은 차콜(--aha-brand-bar)이다(2026-11-19 다크브라운 없앰). 09-09·09-23 다크 바 + 제품 탭 규격을 대체했다.
   (2026-11-19 머리 줄 ②: Input · Hub · Insights · 사용자 관리 · 거래 도매는 이 바 대신 공통 틀 css/shell.css 를 쓴다.
    이 블록은 아직 이 바를 쓰는 /return/ · /admin 용으로 남긴다) */
.topbar {
  position: relative;
  background: #FFFFFF; color: var(--aha-text);
  height: 56px; padding: 0 20px; border-bottom: 4px solid #262220;
  display: flex; align-items: center; gap: 12px;
}
.topbar .logo { height: 24px; width: auto; display: block; flex: none; }
.topbar .who { font-size: 13px; color: var(--aha-text-sub); white-space: nowrap; }
.topbar .util {
  height: 32px; padding: 0 13px; flex: none;
  background: #FFFFFF; color: var(--aha-text); border: 1px solid var(--aha-border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.topbar .util:hover { background: var(--aha-bg-hover); }
@media (max-width: 480px) {
  .topbar { padding: 0 16px; }
  .topbar .who { display: none; }
}

/* ── 제품 스위처 (G2) ──
   이 블록(.aha-sw*)은 Price(AHA Priceboard.html)·Policy Center(styles.css)에 값 그대로 둔다.
   바 안에서 자기 오른쪽을 밀어내(margin-right:auto) 사용자명·버튼을 오른쪽 끝으로 보낸다.
   좁은 화면에서는 패널을 바 전체 폭 기준(좌우 16px)으로 펴서 잘리지 않게 한다 —
   그래서 바(.topbar 등)에 position:relative 가 있어야 한다. */
.aha-sw { position: relative; margin-right: auto; }
.aha-sw-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 14px;
  background: #262220; color: #F5F2EE; border: none; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap;
}
button.aha-sw-btn { cursor: pointer; transition: background .15s; }
button.aha-sw-btn:hover { background: #3C3835; }
.aha-sw-caret { font-size: 11px; transition: transform .15s; }
.aha-sw-btn[aria-expanded="true"] .aha-sw-caret { transform: rotate(180deg); }
.aha-sw-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: 320px; padding: 6px;
  background: #FFFFFF; border: 1px solid #C6C2BB; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(32,29,26,.18);
}
.aha-sw-menu[hidden] { display: none; }
.aha-sw-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px;
  color: #3C3835; text-decoration: none;
}
.aha-sw-item:hover { background: #F8F7F4; }
.aha-sw-item[aria-current="page"] { background: #F4F3F0; }
.aha-sw-mark {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #262220; color: #F5F2EE; font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.aha-sw-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aha-sw-name { font-size: 14px; font-weight: 700; line-height: 1.3; color: #201D1A; }
.aha-sw-desc { font-size: 12px; line-height: 1.4; color: #6C6660; }
.aha-sw-ext { margin-left: 6px; font-size: 11px; color: #98918A; white-space: nowrap; }
.aha-sw-check { flex: none; font-size: 15px; font-weight: 700; color: #262220; }
@media (max-width: 480px) {
  .aha-sw { position: static; }
  .aha-sw-menu { top: calc(100% + 6px); left: 16px; right: 16px; width: auto; }
}

main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; }

/* ── 선택 상태 입체감 1단계 — 제품 안 최상위 전환 탭 (2026-09-30 확정 · 테마 확정본 9절) ──
   Hub의 현황·판매목록·알람·목표, Insights의 Cockpit·상세분석, Input의 무선·유선(#line-toggle).
   눌린 트레이 안에서 고른 탭이 떠오른다. 09-23 "보더+글자색만" 방식을 대체했다.
   (상단바 제품 스위처 .aha-sw 는 상단바 규격이라 이 규칙 밖이다.) */
.view-tabs,
#line-toggle {
  display: flex; width: fit-content; gap: var(--aha-sel-tray-gap);
  padding: var(--aha-sel-tray-pad-1); margin-bottom: 16px;
  background: var(--aha-sel-tray-bg); border-radius: var(--aha-sel-tray-radius);
  box-shadow: var(--aha-sel-tray-1);
}
#line-toggle { margin-bottom: 0; }
.view-tabs button,
#line-toggle button {
  padding: var(--aha-sel-1-pad); font-size: var(--aha-sel-1-size); font-weight: var(--aha-sel-1-weight);
  background: transparent; color: var(--aha-text-sub);
  border: none; border-radius: var(--aha-sel-radius); cursor: pointer;
  transition: var(--aha-sel-motion);
}
.view-tabs button:hover:not(.on),
#line-toggle button:hover:not(.on) { color: var(--aha-text); }
.view-tabs button.on,
#line-toggle button.on {
  color: var(--aha-accent); font-weight: var(--aha-sel-1-weight-on);
  background: var(--aha-sel-surface); transform: var(--aha-sel-raise); box-shadow: var(--aha-sel-lift-1);
}
.hidden { display: none !important; }
/* 원리베이트를 못 보는 계정(비오픈 매장, 2026-11-17 묶음 ④) — 금액 칸·문구를 칸째 숨긴다(0원으로 안 그림) */
.no-raw .raw-money { display: none !important; }

/* ---------- 패널 (카드 묶음 대신 한 패널 + hairline) ---------- */
.panel {
  background: var(--aha-bg-card); border: 1px solid var(--aha-border-soft);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px;
}
.panel-head {
  padding: 12px 16px; border-bottom: 1px solid var(--aha-border-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.panel-title { font-size: 13px; font-weight: 700; color: var(--aha-text-strong); }
.panel-note { font-size: 11.5px; color: var(--aha-text-sub); }

/* ── Input 구간 접기 (2026-10-01 Input 개편 3단계 · js/inputFold.js) ──
   아래 네 구간(.panel.fold)만 접힌다. 머리줄의 제목 쪽 전체가 버튼이고, 접힌 동안 안내 문구
   (.fold-open-only) 대신 지금 값 요약(.fold-sum)을 같은 panel-note 모양으로 보인다.
   접혀도 칸은 폼 안에 그대로 있다(보이지만 않음). 새 색·새 변수 없이 기존 값만 쓴다. */
.fold-toggle {
  display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap;
  margin: -12px -16px; padding: 12px 16px; /* 머리줄 여백까지 눌리게 */
  background: none; border: none; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
.fold > .panel-head:has(.fold-toggle:hover) { background: var(--aha-bg-hover); }
/* 접기 표시는 누르는 자리라 테라코타로 강조한다(테라코타는 클릭 요소에만 — 디자인 공통 규칙) */
.fold-chev {
  width: 9px; height: 9px; flex: none; margin: 0 4px 0 2px;
  border-right: 2.5px solid var(--aha-accent); border-bottom: 2.5px solid var(--aha-accent);
  transform: rotate(-45deg); transition: transform .15s;
}
.fold:not(.is-closed) .fold-chev { transform: rotate(45deg); }
.fold-sum { font-size: 11.5px; color: var(--aha-text-sub); }
.fold:not(.is-closed) .fold-sum,
.fold.is-closed .fold-open-only { display: none; }
.fold.is-closed > .panel-body { display: none; }
.fold.is-closed > .panel-head { border-bottom: none; }
.panel-body { padding: 12px 16px 14px; overflow-x: auto; }

.section-label {
  font-size: 13.5px; font-weight: 700; color: var(--aha-text-strong);
  margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
/* Hub 새로고침(2026-11-19 머리 줄 ② — 옛 상단바에서 옮김) — 범위 안내는 제목 옆에 두고 버튼만 오른쪽 끝으로 */
.section-label .hub-refresh { margin-left: auto; }

/* ---------- 통계 라벨 + 수치 ---------- */
/* 칸 이름 11px → 12px(결정 11-20 「Input 중요 칸 구분」 ② — .stat-label 은 입력칸 이름에만 쓴다. KPI 숫자 이름은 .lbl) */
.stat-label {
  font-size: 12px; font-weight: 600; color: var(--aha-text-sub);
}
/* 필수 칸 이름은 진하게(②) — 나머지 칸 이름은 지금처럼 회색 */
.stat-label.req { color: var(--aha-text-strong); }
.num, .stat-value { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; }

/* 한글 라벨 — 대문자·자간 대신
   굵기·크기·색만으로 위계를 준다 (2026-09-23 지시). KPI·AI요약이 이걸 쓴다. */
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--aha-panel-label); }

/* KPI 스트립 — 바깥 패널 하나에만 테두리, 안쪽은 1px 틈으로만 나눈다.
   칸마다 테두리·그림자를 주면 선이 겹쳐 두꺼워지고 카드가 따로 논다.
   틈으로 내는 선이라 칸이 꺾여도 마지막 열·행에 이중선이 생기지 않는다.
   Insights 6칸은 3열×2행 고정 — 6열 한 줄이면 칸이 좁아 숫자와 증감이 붙는다. */
.kpi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--aha-panel-line); border: 1px solid var(--aha-panel-border);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px;
}
@media (max-width: 560px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
/* 칸 수가 3의 배수가 아닌 격자는 파일 아래쪽에서 id로 열을 맞춘다(#kpi·#alarm-kpi). */
.kpi-card { background: var(--aha-bg-card); padding: 16px 20px; }
.kpi-label { display: block; }
.kpi-value {
  font-size: 21px; font-weight: 600; color: var(--aha-panel-value);
  letter-spacing: -.3px; margin-top: 3px;
}
.kpi-delta { font-size: 12px; font-weight: 600; margin-top: 8px; }
.kpi-delta.up { color: var(--aha-success-text); }
.kpi-delta.down { color: var(--aha-warn); }
.kpi-sub { font-size: 12px; color: var(--aha-panel-label); margin-top: 6px; }
.kpi-split { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12px; }

/* 산출 기준 (2026-10-21, 약관 제13조 제7항) — 숫자마다 붙는 짧은 기준은 기존 .panel-note·.kpi-sub 자리를 쓴다.
   기준 문구는 전부 .basis 로 표시해 두고, 화면마다 버튼 하나(js/basisToggle.js)로 한꺼번에 보였다 숨겼다 한다.
   기본은 숨김(body.basis-on 일 때만 보임). 화면(screen)에서만 숨기므로 인쇄·PDF 에는 늘 펼친 채로 나간다. */
@media screen { body:not(.basis-on) .basis { display: none; } }
.basis-bar { margin: 0 0 12px; }
.basis-box { margin: 0 0 16px; font-size: 12px; color: var(--aha-text-sub); }
.basis-box ul { margin: 0; padding-left: 16px; line-height: 1.6; }
.basis-box ul ul { margin-top: 4px; }
.basis-box li + li { margin-top: 4px; }

/* ---------- 표 (헤더 배경 없음·하단 보더만·hover만) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--aha-border);
  font-size: 11px; font-weight: 600; color: var(--aha-text-sub); white-space: nowrap;
}
table.data td { padding: 7px 8px; border-bottom: 1px solid var(--aha-border-soft); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--aha-bg-hover); }
table.data th.num, table.data td.num { text-align: right; white-space: nowrap; }
/* 표 규칙(9-3절, 2026-09-30): 행 구분선 + 묶음 사이 세로선만. 렌더러를 안 건드리려고 열 순서로 잡는다.
   Hub 직원별 통계 = 판매자 | 건수 3칸 | 마진 3칸, Hub 목표 = 이름·매장 | 건수 3칸 | 마진 3칸 | 버튼 */
table.data:has(#sales-stat-body) :is(thead th, tbody td):is(:nth-child(1), :nth-child(4)),
table.data:has(#targets-body) :is(thead th, tbody td):is(:nth-child(2), :nth-child(5), :nth-child(8)) {
  border-right: 1px solid var(--aha-border);
}
table.data td.num { font-size: 12px; }

/* ---------- 버튼 ---------- */
.btn-solid {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--aha-accent); border: 1px solid var(--aha-accent); color: #fff;
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 0 var(--aha-accent-shadow), 0 6px 12px rgba(32,29,26,.2);
  transition: transform .08s ease-out, box-shadow .08s ease-out, background .12s;
}
.btn-solid:hover { background: var(--aha-accent-hover); border-color: var(--aha-accent-hover); }
.btn-solid:active { transform: translateY(4px); box-shadow: 0 0 0 var(--aha-accent-shadow), 0 2px 4px rgba(32,29,26,.15); }
.btn-solid:disabled { opacity: .6; cursor: default; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--aha-bg-card); border: 1px solid var(--aha-border); color: var(--aha-text-strong);
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-outline:hover { background: var(--aha-bg-hover); }

select.month-select {
  background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px;
  color: var(--aha-text-strong); font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ── 선택 상태 입체감 3단계 — 필터·세그먼트 (2026-09-30 확정 · 테마 확정본 9절) ──
   Hub 판매목록의 전체·무선·유선, Insights 순위의 규모·효율처럼 "보기를 좁히는" 것.
   눌린 트레이 안에서 고른 것이 떠오른다. 버튼 최소 폭 70px로 글자 수에 따라 들쭉날쭉하지 않게.
   (Input 무선·유선 #line-toggle 은 같은 클래스를 쓰지만 1단계라 위에서 따로 정한다.) */
.toggle-group:not(#line-toggle) {
  display: inline-flex; gap: var(--aha-sel-tray-gap); padding: var(--aha-sel-tray-pad-3);
  background: var(--aha-sel-tray-bg); border-radius: var(--aha-sel-tray-radius);
  box-shadow: var(--aha-sel-tray-3);
}
.toggle-group:not(#line-toggle) button {
  min-width: var(--aha-sel-3-min-w); padding: var(--aha-sel-3-pad);
  font-size: var(--aha-sel-3-size); font-weight: var(--aha-sel-3-weight); white-space: nowrap;
  background: transparent; color: var(--aha-text-sub);
  border: none; border-radius: var(--aha-sel-radius); cursor: pointer;
  transition: var(--aha-sel-motion);
}
.toggle-group:not(#line-toggle) button:hover:not(.on) { color: var(--aha-text); }
.toggle-group:not(#line-toggle) button.on {
  color: var(--aha-accent); font-weight: var(--aha-sel-3-weight-on);
  background: var(--aha-sel-surface); transform: var(--aha-sel-raise); box-shadow: var(--aha-sel-lift-3);
}

/* 클릭 순간은 단계와 상관없이 한 번 눌려 들어간다. */
.view-tabs button:active,
.toggle-group button:active { transform: var(--aha-sel-sink); box-shadow: var(--aha-sel-press); }
@media (prefers-reduced-motion: reduce) {
  .view-tabs button, .toggle-group button { transition: none; }
}

/* 필터 그룹 라벨(9-3절) — 트레이 옆에 그 묶음이 무엇을 고르는지 적는다. */
.filter-group { display: inline-flex; align-items: center; gap: 8px; }
.filter-label {
  font-size: var(--aha-filter-label-size); font-weight: var(--aha-filter-label-weight);
  color: var(--aha-text-sub); white-space: nowrap;
}

/* 값 강조는 테라코타 글자 600만 — 문장 중간 굵은 글씨 대신(9-3절) */
.val { color: var(--aha-accent); font-weight: 600; }

/* ---------- 로그인 화면 ----------
   2026-10-21 확정: 로그인·비밀번호 설정 화면만 홈페이지(ahasight.com)와 같은 보라 그라데이션 + 흰 카드.
   로그인 뒤 업무 화면은 제품 테마 그대로 — 보라 값은 이 블록 안(.auth-bg·.auth-screen)에만 둔다. */
.auth-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(160deg, #120a2b, #2a1260);
}
.auth-bg::before, .auth-bg::after {
  content: ""; position: absolute; width: 110vmax; height: 110vmax; border-radius: 50%; opacity: .6;
  animation: auth-drift 30s ease-in-out infinite alternate;
}
.auth-bg::before { left: -35vmax; top: -45vmax; background: radial-gradient(circle, #6a35e0 0, #4b23a8 25%, transparent 62%); }
.auth-bg::after { right: -40vmax; bottom: -50vmax; background: radial-gradient(circle, #5a2bc4 0, #36188a 28%, transparent 62%); animation-duration: 36s; }
@keyframes auth-drift { to { transform: translate(6vmax, 4vmax); } }
@media (prefers-reduced-motion: reduce) { .auth-bg::before, .auth-bg::after { animation: none; } }
.auth-screen {
  /* 카드 C(부드러운) — 순백·진보라는 눈이 아파 한 톤 낮춤 (2026-10-21 인승님) */
  --auth-vio: #6a4fd8; --auth-vio-d: #5038b3; --auth-focus: #8a6cf0; --auth-link: #5b3fc4; --auth-ink: #2a2436; --auth-muted: #6f6880;
  position: fixed; inset: 0; z-index: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; padding: 64px 20px 40px;
  word-break: keep-all;
}
/* 카드가 화면보다 길어지면(재설정 칸을 연 폰) 위가 잘리지 않고 스크롤되게 — 가운데 정렬은 margin:auto 로 */
.auth-screen > .auth-card { margin-top: auto; }
.auth-screen > :last-child { margin-bottom: auto; }
.auth-home {
  position: absolute; top: 16px; left: 20px;
  font-size: 13px; color: #d8d2f0; text-decoration: none;
}
.auth-home:hover { color: #fff; text-decoration: underline; }
.auth-card {
  width: min(400px, 100%); text-align: center; color: var(--auth-ink);
  background: #f6f3fd; border: 1px solid #e6dff9; border-radius: 20px; padding: 34px 30px 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}
.auth-card .logo { height: 24px; }
.auth-title { margin: 16px 0 4px; font-size: 20px; font-weight: 600; color: var(--auth-ink); }
.auth-sub { margin: 0 0 22px; font-size: 13px; color: var(--auth-muted); }
.auth-card form { text-align: left; }
.auth-card label { display: block; margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--auth-muted); }
.auth-card input {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid #ddd5f2; background: #fff; color: var(--auth-ink);
  font-family: inherit; font-size: 15px; outline: none;
}
.auth-card input:focus { border-color: var(--auth-focus); box-shadow: 0 0 0 3px rgba(138,108,240,.22); }
.auth-card input::placeholder { color: #9a94a3; }
/* 라벨 없이 쌓인 칸(비밀번호 설정 화면)은 칸 사이를 띄운다 */
.auth-card input + input { margin-top: 10px; }
/* 칸 아래 문장(js/fieldCheck.js)이 칸 사이에 끼어도 다음 칸이 붙지 않게(독립 검토 11-20 #9) */
.auth-card .field-error + input { margin-top: 10px; }
.auth-btn {
  width: 100%; height: 50px; margin-top: 22px; border: none; border-radius: 12px;
  background: var(--auth-vio); color: #fff; font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 3px 0 var(--auth-vio-d); transition: transform .06s;
}
.auth-btn:focus-visible { outline: 3px solid rgba(138,108,240,.45); outline-offset: 2px; }
.auth-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--auth-vio-d); }
.auth-btn:disabled { opacity: .7; cursor: default; }
.auth-error {
  display: none; margin-top: 12px; padding: 8px 10px;
  font-size: 12.5px; color: #a3261a; text-align: left;
  background: #fdeeec; border: 1px solid #f3c4bd; border-radius: 10px;
}
/* 비밀번호 설정·재설정 (2026-10-16 종합검증 H2) — 위 로그인 카드 톤 그대로 */
.auth-card [hidden] { display: none !important; }
a.auth-btn { display: block; line-height: 50px; text-decoration: none; text-align: center; }
.auth-link {
  display: inline-block; margin-top: 16px; padding: 0; border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--auth-link); text-decoration: underline;
}
.auth-link:hover { color: var(--auth-vio-d); }
.auth-link:focus-visible { outline: 2px solid var(--auth-vio); outline-offset: 2px; border-radius: 4px; }
.auth-note {
  margin-top: 12px; padding: 8px 10px; font-size: 12.5px; text-align: left;
  color: var(--auth-ink); background: #f4f1fb;
  border: 1px solid #e1daf3; border-radius: 10px;
}
.auth-foot { margin: 14px 0 0; font-size: 12px; color: #8b849a; }
/* 문장 안 링크(처음이면 ahasight.com · 비활성 안내 「문의하기」, 2026-11-24) — 버튼 아래 줄 링크와 달리 위 여백 없이 */
.auth-foot:not(.auth-mail) .auth-link, .auth-error .auth-link { margin-top: 0; font-size: inherit; }
/* 로그인 화면 메일 문의 2개 (2026-10-29 A/S) */
.auth-mail { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; }
.auth-mail .auth-link { margin-top: 0; }
.auth-mail span { flex-basis: 100%; text-align: center; }
.auth-forgot { margin-top: 18px; padding-top: 18px; border-top: 1px solid #ece8f4; }
.auth-forgot .auth-sub { text-align: center; }

/* ---------- 표지 (Insights Cockpit) ---------- */
.cover {
  background: var(--aha-brand-bar); color: var(--aha-brand-bar-text);
  border-radius: var(--radius-md); padding: 24px 28px; margin-bottom: 16px;
}
.cover-in { display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.cover .label { font-size: 11px; color: var(--aha-brand-bar-sub); margin-bottom: 4px; font-weight: 600; }
.cover .num { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.cover .delta { font-size: 15px; font-weight: 600; margin-top: 8px; }
.cover .delta.up { color: #B9DC8B; }
.cover .delta.down { color: #F0A48E; }
.cover .ai {
  flex: 1; min-width: 260px; font-size: 13.5px; line-height: 1.7; color: #D9D3CC;
  border-left: 3px solid var(--aha-accent); padding-left: 14px; margin-bottom: 4px; word-break: keep-all;
}
.cover .ai-when { display: block; margin-top: 5px; font-size: 11px; color: var(--aha-brand-bar-sub); }
.cover .basis { margin-top: 8px; font-size: 11px; color: var(--aha-brand-bar-sub); }
/* 표지 기준 한 줄 · 입력 대기 건수 — 기준 보기와 상관없이 늘 보인다(2026-11-17 묶음 ④-5) */
.cover .cover-note { margin-top: 6px; font-size: 12px; color: var(--aha-brand-bar-sub); }

/* AI 요약 3단 — KPI 스트립과 같은 규칙(바깥 테두리 하나 + 1px 틈 구분). */
.summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--aha-panel-line); border: 1px solid var(--aha-panel-border);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px;
}
.summary-card { background: var(--aha-bg-card); padding: 16px 20px; }
/* AI 요약 갱신 줄 — 요약 3단 바로 위. 기존 버튼(.btn-outline)과 보조 글자 크기만 쓴다 (2026-10-09) */
.ai-refresh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-refresh[hidden] { display: none; }
.ai-refresh-status { font-size: 12px; color: var(--aha-text-sub); }
/* 이 버튼에만 — .btn-outline 전체에 걸면 Hub 의 다른 버튼 모양까지 바뀐다 */
#btn-ai-refresh:disabled { opacity: .6; cursor: default; }
.summary-title { font-size: 14px; font-weight: 600; color: var(--aha-panel-value); margin-bottom: 8px; }
.summary-list { margin: 0; padding-left: 16px; font-size: 13px; color: var(--aha-panel-body); line-height: 1.7; }

/* 순위 */
.rank-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid var(--aha-border-soft); font-size: 13px;
}
.rank-row:last-child { border-bottom: none; }
.rank-left { display: flex; align-items: center; gap: 10px; }
.rank-no { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; color: var(--aha-text-sub); min-width: 26px; }
.rank-name { font-weight: 600; color: var(--aha-text-strong); }
.rank-value { font-weight: 600; font-size: 13px; }
.rank-value.neg { color: var(--aha-warn); }
.rank-note { font-size: 12px; color: var(--aha-text-sub); padding: 8px 0 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
#rank-seller .rank-row { cursor: pointer; }
/* 누를 수 있는 줄 — 호버에서 이름에 밑줄(9-3절 테라코타 범위 축소로 옛 주황 글자 대체, 2026-09-30) */
#rank-seller .rank-row:hover .rank-name { text-decoration: underline; text-underline-offset: 3px; }

/* 목표 대비 진행바 */
.goal-bar-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--aha-text-sub); margin-top: 4px; }
.goal-bar-label { width: 34px; flex-shrink: 0; }
.goal-bar-track { flex: 1; height: 7px; border-radius: 4px; background: var(--aha-border-soft); overflow: hidden; }
.goal-bar-fill { display: block; height: 100%; border-radius: 4px; }
.goal-bar-fill.ok { background: var(--aha-success-text); }
.goal-bar-fill.warn { background: var(--aha-amber); }
.goal-bar-fill.low { background: var(--aha-warn); }
.goal-pct { width: 40px; text-align: right; font-weight: 600; color: var(--aha-text-strong); flex-shrink: 0; }
.goal-num { width: 170px; text-align: right; color: var(--aha-text-sub); flex-shrink: 0; }
.goal-row { padding: 12px 0; border-bottom: 1px solid var(--aha-border-soft); }
.goal-row:last-child { border-bottom: none; }
.goal-store-name { font-weight: 600; font-size: 13.5px; color: var(--aha-text-strong); }

/* 목표 대비 실적 — 지역별 / 전체 (2026-10-09 매장 다수 대응). 새 색·새 크기 없이 기존 값만 쓴다.
   지역 선택은 select.month-select 를 그대로 쓰고, 검색칸은 같은 상자 값을 쓴다. 묶음 머리는 .goal-row 와 같은 줄 간격. */
.goal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.goal-search {
  width: 170px; background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px;
  color: var(--aha-text-strong); font-family: inherit;
}
.goal-search:focus-visible { outline: 2px solid var(--aha-accent); outline-offset: -1px; }
.goal-region { border-bottom: 1px solid var(--aha-border-soft); }
.goal-region:last-child { border-bottom: none; }
.goal-region-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 0; cursor: pointer; list-style: none;
}
.goal-region-head::-webkit-details-marker { display: none; }
/* flex 로 바꾸면 기본 펼침 표시가 사라져 눌러야 펼쳐진다는 게 안 보인다 — 직접 단다 */
.goal-region-head::before { content: '▸'; font-size: 12px; color: var(--aha-text-sub); }
.goal-region[open] > .goal-region-head::before { content: '▾'; }
.goal-region-name { font-weight: 600; font-size: 13.5px; color: var(--aha-text-strong); }
.goal-region-meta { font-size: 12px; color: var(--aha-text-sub); }
.goal-region-pct { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--aha-text-sub); }
.goal-region .goal-row { padding-left: 16px; }
/* 좁은 화면에서 매장·지역 이름이 한 글자씩 꺾이지 않게 — 표는 .panel-body 의 가로 스크롤로 넘겨 본다 */
.goal-table-wrap td { white-space: nowrap; }
.goal-sort {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
}
.goal-sort:hover { color: var(--aha-text); }

/* ---------- 직원 상세 모달 ---------- */
.emp-overlay {
  position: fixed; inset: 0; z-index: 400; background: rgba(32,29,26,.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.emp-overlay.open { display: flex; }
.emp-modal {
  width: min(420px, 94vw); background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.emp-modal-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; background: var(--aha-brand-bar); color: var(--aha-brand-bar-text);
}
.emp-modal-hd .emp-name { font-size: 15px; font-weight: 600; }
.emp-modal-hd .emp-month { font-size: 12px; color: var(--aha-brand-bar-sub); }
.emp-modal-hd button { background: none; border: none; color: var(--aha-brand-bar-text); font-size: 18px; cursor: pointer; padding: 0 2px; }
.emp-modal-body { padding: 6px 18px 14px; }
.emp-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--aha-border-soft); font-size: 13px;
}
.emp-row:last-child { border-bottom: none; }
.emp-row .k { color: var(--aha-text-sub); font-size: 11px; font-weight: 600; }
.emp-row .v { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--aha-text-strong); }
.emp-row .v.neg { color: var(--aha-warn); }

/* ---------- 상세자료 슬라이드 (2026-09-21 확정 방식) ----------
   화면 하나 = 자료 한 장, 가로 스와이프 전환. 스크롤 스냅이 넘김을 맡고,
   컨테이너 높이는 JS가 현재 장에 맞춘다 — 긴 장(목표 대비)이 짧은 장 화면까지
   늘려놓지 않게. 점·화살표가 전체 장 수와 현재 위치를 보여준다. */
.slider {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  transition: height .25s ease;
}
.slider::-webkit-scrollbar { display: none; }
.slider .slide {
  flex: 0 0 100%; min-width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always; margin-bottom: 0;
}
.slide-hint { font-size: 12px; font-weight: 500; color: var(--aha-text-sub); margin-left: 6px; }
/* 상세 자료 이름표 묶음 탭 (2026-11-06 A안) — 선택 상태 2단계(하위 탭): 트레이 없이 콘텐츠 면 위, 켜진 탭만 떠오른다.
   좁은 화면에선 탭 줄만 옆으로 밀어 본다(페이지 전체 가로 스크롤 없음). 위아래 여백은 떠오른 그림자가 잘리지 않게. */
.slide-tabs {
  position: relative; display: flex; gap: 4px; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 3px 2px 6px; margin: -3px 0 6px;
}
.slide-tabs::-webkit-scrollbar { display: none; }
.slide-tabs:empty { display: none; }
.slide-tabs button {
  flex: none; white-space: nowrap;
  padding: var(--aha-sel-2-pad); font-size: var(--aha-sel-2-size); font-weight: var(--aha-sel-2-weight);
  background: transparent; color: var(--aha-text-sub); border: none; border-radius: var(--aha-sel-radius);
  cursor: pointer; transition: var(--aha-sel-motion);
}
.slide-tabs button:hover:not(.on) { color: var(--aha-text); }
.slide-tabs button.on {
  color: var(--aha-text-strong); font-weight: var(--aha-sel-2-weight-on);
  background: var(--aha-sel-surface); transform: var(--aha-sel-raise); box-shadow: var(--aha-sel-lift-2);
}
.slide-tabs button:active { transform: var(--aha-sel-sink); box-shadow: var(--aha-sel-press); }
@media (prefers-reduced-motion: reduce) { .slide-tabs button { transition: none; } }
/* 고른 묶음 밖의 장은 화면에서 뺀다(인쇄·PDF는 아래 print 규칙이 다시 펼친다). 장이 하나뿐인 묶음은 점·화살표 없이 글자만 */
.slider .slide.slide-off { display: none; }
.slider-ctl.single :is(.slider-nav, .slider-dots) { display: none; }
.slider-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; margin: 12px 0 20px; }
/* 점 옆 「n / N · 자료 이름」 — 보조 글자, 숫자 고정폭. 한 줄에 안 들어가면 점 아래 줄로 내려가고, 긴 제목은 줄바꿈해 가로 스크롤을 만들지 않는다 */
.slider-pos {
  min-width: 0; max-width: 100%; text-align: center; overflow-wrap: anywhere;
  font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--aha-text-sub);
  font-variant-numeric: tabular-nums;
}
.slider-pos:empty { display: none; }
.slider-dots { display: flex; align-items: center; gap: 8px; }
.slider-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--aha-border); transition: background .15s ease, transform .15s ease;
}
.slider-dots button:hover { background: var(--aha-text-muted); }
.slider-dots button.on { background: var(--aha-accent); transform: scale(1.3); }
.slider-dots button.on:hover { background: var(--aha-accent); }
.slider-nav {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--aha-border);
  background: var(--aha-bg-card); color: var(--aha-text-sub); cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.slider-nav:hover { background: var(--aha-bg-hover); }
.slider-nav:disabled { opacity: .35; cursor: default; }
.slider-nav:disabled:hover { background: var(--aha-bg-card); }

/* ---------- 추이 차트 ---------- */
.chart-wrap { padding: 6px 4px 0; }

/* ---------- Insights Cockpit 그래프 둘 · Hub 크게 보기 공통 모양 (2026-11-20 그래프 작업) ---------- */
.cockpit-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 900px) { .cockpit-charts { grid-template-columns: minmax(0, 1fr); } }
.chart-card { display: flex; flex-direction: column; margin-bottom: 0; }
.chart-card-head { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.chart-card-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.chart-headline { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.chart-headline:empty { display: none; }
.chart-headline .big { font-size: 20px; font-weight: 600; color: var(--aha-text-strong); }
.chart-headline .sub { font-size: 12px; color: var(--aha-text-sub); }
.chart-headline .delta { font-size: 13px; font-weight: 600; color: var(--aha-text-sub); }
/* 글자는 디자인 확정본 글자색 — 오름 #27500A(성공 글자) · 내림 #9C4A28(경고). 선 색(--aha-trend-*)은 그림에만 (2026-11-20 독립 검토 1번) */
.chart-headline .delta.up { color: var(--aha-success-text); }
.chart-headline .delta.down { color: var(--aha-warn); }
.chart-legend { flex-wrap: wrap; row-gap: 4px; }
.chart-legend:empty { display: none; }
.chart-legend .sw.flow-cur { background: var(--aha-brand-bar); }
.chart-legend .sw.flow-prev { background: var(--aha-chart-soft); }
.chart-legend .sw.trend-up { background: var(--aha-trend-up); }
.chart-legend .sw.trend-down { background: var(--aha-trend-down); }
.chart-legend .sw.trend-live { background: repeating-linear-gradient(90deg, var(--aha-text-sub) 0 3px, transparent 3px 5px); height: 3px; }
.chart-box { padding: 4px 4px 0; min-height: 120px; }
.chart-box .empty-box { margin: 12px; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-cap { margin: 0; padding: 4px 16px 14px; font-size: 11px; color: var(--aha-text-sub); }
.flow-prev-line { stroke: var(--aha-chart-soft); stroke-width: 2.5; }
.flow-cur-line { stroke: var(--aha-brand-bar); stroke-width: 3; }
.flow-today { stroke: var(--aha-text-sub); stroke-width: 1; stroke-dasharray: 3 4; }
.flow-cur-dot { fill: var(--aha-brand-bar); }
.flow-prev-dot { fill: var(--aha-bg-card); stroke: var(--aha-text-sub); stroke-width: 1.5; }
.trend-seg { stroke-width: 2.5; stroke-linecap: round; stroke: var(--aha-text-sub); }
.trend-seg.up { stroke: var(--aha-trend-up); }
.trend-seg.down { stroke: var(--aha-trend-down); }
.trend-seg.live { stroke-dasharray: 6 5; }
.trend-dot { fill: var(--aha-bg-card); stroke: var(--aha-text-sub); stroke-width: 1.5; }
.trend-dot.last { fill: var(--aha-brand-bar); stroke: var(--aha-brand-bar); }
.chart-hit { fill: transparent; cursor: pointer; }

/* 매장 순위 막대 목록 (Insights 상세분석) — 1위만 차콜, 나머지 회색 */
.rank-bars { display: flex; flex-direction: column; }
.rank-bar-row {
  display: grid; grid-template-columns: 26px minmax(80px, 180px) minmax(60px, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--aha-border-soft); font-size: 13px;
}
.rank-bar-row .rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar-track { height: 12px; background: var(--aha-bg-content); border-radius: 4px; overflow: hidden; }
.rank-bar-track i { display: block; height: 100%; background: var(--aha-chart-soft); border-radius: 4px; }
.rank-bar-track i.first { background: var(--aha-brand-bar); }
.rank-bar-row .rank-value { text-align: right; white-space: nowrap; }
.rank-cnt { font-weight: 500; font-size: 12px; color: var(--aha-text-sub); }
@media (max-width: 560px) {
  .rank-bar-row { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 6px; }
  .rank-bar-track { grid-column: 2 / 4; grid-row: 2; }
}

/* ---------- 상태·안내 ---------- */
.notice-line { font-size: 12.5px; color: var(--aha-text-sub); margin: -6px 0 14px; }
.error-box {
  background: var(--aha-bg-danger-soft); border: 1px solid var(--aha-warn);
  color: var(--aha-warn); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
}
/* 매장 미배정 직원 안내 (Input, 2026-11-19 머리 줄 ② · 예시 「매장 미배정」) — 입력 칸 대신 이 한 장 */
.no-store-panel {
  background: var(--aha-bg-card); border: 1px solid var(--aha-border-soft); border-radius: var(--radius-md);
  padding: 56px 40px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.no-store-title { font-size: 17px; font-weight: 600; color: var(--aha-text-strong); }
.no-store-body { font-size: 14px; line-height: 1.6; color: var(--aha-text); max-width: 420px; }
.no-store-sub { font-size: 12px; color: var(--aha-text-sub); }
.empty-box { padding: 40px 16px; text-align: center; color: var(--aha-text-sub); font-size: 13.5px; }
.loading { padding: 40px 16px; text-align: center; color: var(--aha-text-muted); font-size: 13px; }

/* ---------- 불러오는 동안 회색 틀 (2026-10-28 · Insights 보고서) ----------
   표지·숫자 6칸·요약 3단 모양을 먼저 그려 둔다. 격자는 .kpi-grid·.summary-grid 를 그대로 써서 폭별 칸 수가 실제와 같다.
   동작 줄이기 설정이면 반짝임을 끈다. */
.report-skel .kpi-card, .report-skel .summary-card { display: grid; gap: 10px; }
.skel-cover {
  display: grid; gap: 10px; background: var(--aha-bg-sunken);
  border-radius: var(--radius-md); padding: 24px 28px; margin-bottom: 16px;
}
.sk {
  display: block; height: 12px; width: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--aha-bg-sunken) 0%, var(--aha-bg-disabled) 40%, var(--aha-bg-sunken) 80%);
  background-size: 300% 100%; animation: aha-sk 1.3s ease-in-out infinite;
}
.skel-cover .sk { background: var(--aha-bg-disabled); animation: none; }
.sk-s { width: 35%; }
.sk-m { width: 60%; }
.sk-v { height: 20px; width: 55%; }
.sk-l { height: 34px; width: 45%; }
@keyframes aha-sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; background: var(--aha-bg-sunken); } }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 클릭형 「?」 도움말 (2026-10-28 · js/helpTip.js) ----------
   설명 문장(계산 방식·용어 뜻·확인하는 곳)만 접는다. 경고·제약은 화면 글 그대로.
   480px 초과는 버튼 아래에 띄우고(is-float), 이하는 놓인 자리에서 아래로 펼친다. 테라코타는 포커스 링에만. */
.help-btn {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 18px; height: 18px; padding: 0; margin: 0 2px; vertical-align: middle;
  border: 1px solid var(--aha-border); border-radius: 50%; background: var(--aha-bg-card);
  color: var(--aha-text-sub); font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1;
  letter-spacing: 0; text-transform: none; cursor: pointer;
  transition: transform .12s ease, color .12s ease, border-color .12s ease;
}
.help-btn::after { content: ''; position: absolute; inset: -11px; }  /* 눌리는 범위 40px */
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--aha-text-strong); border-color: var(--aha-text-strong); }
.help-btn:active { transform: scale(.95); }
.help-btn:focus-visible { outline: 2px solid var(--aha-accent); outline-offset: 2px; }
.help-pop {
  display: block; flex-basis: 100%; margin-top: 8px; padding: 10px 12px;
  background: var(--aha-bg-card); border: 1px solid var(--aha-border); border-radius: 10px;
  font-size: 12px; font-weight: 400; line-height: 1.6; color: var(--aha-text);
  letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
}
.help-pop[hidden] { display: none; }
.label-row { display: flex; align-items: center; gap: 4px; }
.field > .help-pop { margin-top: 0; }
.help-pop.is-float {
  position: fixed; z-index: 500; margin: 0; width: max-content; max-width: min(290px, calc(100vw - 16px));
  box-shadow: 0 10px 24px rgba(32,29,26,.18);
}
@media (prefers-reduced-motion: reduce) { .help-btn { transition: none; } }

footer.page-foot { text-align: center; font-size: 11.5px; color: var(--aha-text-muted); padding: 8px 0 24px; }

@media (max-width: 900px) {
  .row-2 { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .goal-num { display: none; }
}

/* ============================================================
   입력 폼 (Input) — 2026-09-23 신설
   위 규칙은 건드리지 않는다. 라벨은 기존 .stat-label(트래킹캡)을 쓰고,
   선택 상태는 공통 패턴대로 컬러 보더로만 표시한다.
   ============================================================ */

/* 한 패널 안의 칸 배치. 기본 2열, 좁아지면 1열 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }

/* ── Input 개편 2단계 (2026-09-30) ──
   Input은 모바일 대응이 필요 없어(테마 7절) 넓은 화면에서 4열로 놓아 세로 길이를 줄인다.
   창이 좁으면(≤1024px) 2열로 물러난다. */
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 한 패널 안에서 칸 묶음을 나누는 작은 제목 (판매 정보 / 고객 정보) — 필터 그룹 라벨과 같은 값 */
.form-subhead {
  font-size: var(--aha-filter-label-size); font-weight: var(--aha-filter-label-weight);
  color: var(--aha-text-sub); margin: 0 0 8px;
}
.form-grid + .form-subhead { margin-top: 18px; }
/* 고칠 수 없는 값 — 입력칸이 아니라 글자로 보인다(입력칸과 정적 텍스트는 보더·배경으로 구분, 테마 2절) */
.static-value {
  min-height: 38px; display: flex; align-items: center;
  font-size: 13.5px; color: var(--aha-text-strong);
}
/* ③ 선택기 자리 — 감싸기만 한다. 안의 칸(모델·색상·요금제명·정가)은 바깥 격자에 그대로 놓인다(js/masterPicker.js) */
.picker-slot { display: contents; }
/* 체크로 여는 칸의 체크 자리 — 옆 입력칸과 높이를 맞춘다 */
.field > .check-line { min-height: 38px; }
/* 이번 달 판매 실적 한 줄 (Input 맨 위) — 서버 집계를 보여주기만 한다 */
.month-strip {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--aha-text);
  background: var(--aha-bg-card); border: 1px solid var(--aha-border-soft); border-radius: var(--radius-md);
}
.month-strip .num { font-weight: 600; color: var(--aha-text-strong); }
/* 금액 항목 "중고반납" 줄을 켜면 그 줄 바로 아래에 붙는 모델 칸 */
#adj-list > #field-used-model { padding: 0 0 12px 160px; max-width: 520px; border-bottom: 1px solid var(--aha-border-soft); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > .stat-label { margin: 0; }
/* 필수 표시는 색 하나로만 — 별표가 라벨 정렬을 흔들지 않게 여백을 고정한다 */
.req::after { content: '*'; color: var(--aha-req-mark); margin-left: 3px; font-weight: 700; font-size: 16px; line-height: 1; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%; min-height: 38px; padding: 8px 11px;
  background: var(--aha-bg-card); color: var(--aha-text-strong);
  border: 1px solid var(--aha-border-input); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color .15s ease;
}
.field textarea { min-height: 64px; resize: vertical; line-height: 1.5; }

/* 칸 옆 우리 문장(js/fieldCheck.js — 브라우저 기본 말풍선 대신, 문구 묶음 11-20) · 칸 테두리 경고색 */
.field-error { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--aha-warn); }
input.field-invalid, select.field-invalid, textarea.field-invalid,
.field input.field-invalid, .field select.field-invalid, .field textarea.field-invalid { border-color: var(--aha-warn) !important; }
/* 한 칸에 문장 하나만(실기기 묶음 11-20) — 칸 아래 문장이 뜨면 같은 칸의 주황 안내(목록 밖 모델 · 같은 번호 안내)는 숨긴다 */
.field:has(> .field-error) > .field-hint.warn { display: none; }
/* 금액 항목 줄 — 칸 아래 문장은 그 줄 칸 묶음 아래 한 줄로 */
.line-ctl > .field-error { flex-basis: 100%; text-align: right; margin-top: 0; }

/* ---------- Input 중요 칸 구분 (결정 로그 2026-11-20 · 예시 「Input 중요 칸 구분 · B 테라코타 선」) ----------
   칸 배치 · 입력 순서 · EMR 바뀐 값 색 · 저장은 그대로 — 강조만 얹는다. 폰도 같은 규칙. #sale-form = Input 판매 입력 폼만.
   ③ 돈이 걸린 칸 묶음(원리베이트 · 공시/선약 · 할부 · 차감) — 회색 바탕 · 칸 이름 진하게 */
#sale-form .money-panel { background: var(--aha-bg-content); }
#sale-form .money-panel > .panel-head { border-bottom-color: var(--aha-border-soft); }
#sale-form .money-field { background: var(--aha-bg-content); border-radius: var(--radius-sm); padding: 8px 10px; margin: -8px -10px; }
#sale-form :is(.money-panel, .money-field) .stat-label { color: var(--aha-text-strong); }
#sale-form .money-note { color: var(--aha-text-strong); font-weight: 600; }
/* ⑥ 지금 입력 중인 구간 — 왼쪽 3px 테라코타 선. 구간(패널)마다 · 한 번에 한 구간(포커스가 든 곳만) · 칸 포커스 테두리와 같은 색 */
#sale-form .panel { position: relative; }
#sale-form .panel:focus-within::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--aha-accent); pointer-events: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--aha-accent); }
.field input:disabled, .field select:disabled {
  background: var(--aha-bg-disabled); color: var(--aha-text-muted); cursor: not-allowed;
}
/* 금액·수량은 수치라 tabular-nums + 우측 정렬 (표의 .num과 같은 규약) */
.field input.amount {
  font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; text-align: right;
}
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type="number"] { -moz-appearance: textfield; }

/* 생년월일 앞 6자리 - 뒷자리 첫 숫자 (780808-1●●●●●●). 나머지 여섯 자리는 받지 않는다는 표시로 ●만 둔다 */
.birth-pair { display: flex; align-items: center; gap: 6px; }
.field .birth-pair input.birth-front { flex: 1; min-width: 76px; }
.field .birth-pair input.birth-back { width: 44px; flex: none; text-align: center; }
.birth-pair .birth-sep, .birth-pair .birth-rest { color: var(--aha-text-sub); flex: none; }
.birth-pair .birth-rest { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; letter-spacing: 1px; font-size: 12px; }
/* 좁은 화면(두 칸 배치)에서는 앞 6자리 칸 자리를 먼저 확보한다 — ● 표시는 뺀다 */
@media (max-width: 560px) { .birth-pair .birth-rest { display: none; } }
/* 유선 상품 「직접 입력」 — 고르기 칸 아래 이름(·속도) 칸 (유선 분류 기준 통일, 2026-11-10) */
.wired-manual { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.wired-manual input { flex: 1; min-width: 0; }
.wired-manual select { width: 96px; flex: none; }
/* 유선 셋톱 — TV 칸 아래 주 셋톱 · 추가 셋톱 대수 (셋톱박스, 2026-11-10). TV 를 골랐을 때만 보인다 */
.wired-settop { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--aha-border-soft); display: flex; flex-direction: column; gap: 8px; }
.wired-settop-row { display: flex; align-items: center; gap: 8px; }
.wired-settop-row .stat-label { flex: none; width: 64px; }
.wired-settop-row select { flex: 1; min-width: 0; }
.wired-settop-row input[type="number"] { width: 72px; flex: none; }
.wired-settop .wired-manual { margin-top: 0; }

.field-hint { font-size: 11.5px; color: var(--aha-text-sub); }
/* Hub 고객 찾기 결과 — 이름 옆 본인 확인 표시 「780808 · 남」 (세부 정보라 text-sub 400) */
/* 판매 목록 통신사 칸 아래 개통 경로 「온라인 · 업체명」, 도매별 표의 온라인 묶음 시작 줄 (온라인 개통 경로 ④, 2026-11-06) */
.route-sub { display: block; font-size: 11px; color: var(--aha-text-sub); }
table.data tr.ws-online-first td { border-top: 2px solid var(--aha-border); }
.id-check { margin-left: 6px; font-size: 12px; color: var(--aha-text-sub); font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; }
/* Input 저장 버튼 위 한 줄 경고 — DESIGN 안내 문구 농도 「제약·경고 text-strong 600」 */
.notice-line.strong { color: var(--aha-text-strong); font-weight: 600; margin: 4px 0 10px; }
.field-hint.warn { color: var(--aha-warn); }

/* 입력칸 안 오른쪽에 붙는 단위 표시.
   반드시 input만 감싼 .unit-wrap 안에서 위치를 잡는다 —
   .field 전체를 기준으로 잡으면 라벨·안내문까지 같이 떠서 서로 겹친다. */
.unit-wrap { position: relative; display: block; }
/* .field input[type=…] 의 padding(8px 11px)보다 뒤 · 같은 무게로 — 예전엔 그 규칙이 이 오른쪽 여백을 덮어 단위가 숫자와 겹쳤다(2026-11-18) */
.field .unit-wrap > input, .unit-wrap > input { padding-right: 34px; }
.unit-wrap > .unit {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--aha-text-muted); pointer-events: none;
}

/* 체크 한 줄 — 결합할인처럼 켜고 끄는 칸 */
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--aha-text-strong); }
.check-line input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--aha-accent); cursor: pointer; }

/* ---------- 금액 항목 / PAYBACK 줄 ---------- */
.line-row {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--aha-border-soft);
}
.line-row:last-child { border-bottom: none; }
.line-name { font-size: 13px; font-weight: 600; color: var(--aha-text-strong); }
.line-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.line-ctl input[type="text"], .line-ctl input[type="date"], .line-ctl select {
  min-height: 34px; padding: 6px 10px;
  background: var(--aha-bg-card); color: var(--aha-text-strong);
  border: 1px solid var(--aha-border-input); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; outline: none;
}
.line-ctl input:focus, .line-ctl select:focus { border-color: var(--aha-accent); }
.line-ctl input.amount {
  width: 130px; font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; text-align: right;
}
.line-ctl input:disabled, .line-ctl select:disabled {
  background: var(--aha-bg-disabled); color: var(--aha-text-muted); cursor: not-allowed;
}
/* 고정금액 항목(유심)은 입력칸 대신 계산된 금액을 그대로 보여준다 */
.line-fixed {
  font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; color: var(--aha-text-strong); min-width: 92px; text-align: right;
}
.line-sub { font-size: 11.5px; color: var(--aha-text-sub); }
.line-del {
  width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm);
  border: 1px solid var(--aha-border); background: var(--aha-bg-card);
  color: var(--aha-text-sub); font-size: 15px; line-height: 1; cursor: pointer;
}
.line-del:hover { background: var(--aha-bg-hover); color: var(--aha-warn); border-color: var(--aha-warn); }

/* PAYBACK 한 줄은 칸이 많아 자체 격자를 쓴다 */
.pb-entry { padding: 12px 0; border-bottom: 1px solid var(--aha-border-soft); }
.pb-entry:last-child { border-bottom: none; }
.pb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pb-head .line-name { margin-right: auto; }
.pb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pb-grid .wide { grid-column: 1 / -1; }

/* ---------- 저장 막대 ---------- */
.form-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; background: var(--aha-bg-card);
  border: 1px solid var(--aha-border-soft); border-radius: var(--radius-md); margin-bottom: 20px;
}
.form-actions .spacer { margin-left: auto; }
.form-msg { font-size: 13px; font-weight: 600; }
.form-msg.ok { color: var(--aha-success-text); }
.form-msg.bad { color: var(--aha-warn); }
/* 안내 한 줄(오류 아님 — 「바뀐 값이 없어 저장하지 않았어요」 등, 문구 묶음 11-20) */
.form-msg.info { color: var(--aha-text-sub); font-weight: 500; }

.success-box {
  background: #EDF3E4; border: 1px solid var(--aha-success-border);
  color: var(--aha-success-text); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
}

@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .pb-grid { grid-template-columns: 1fr 1fr; }
  .line-row { grid-template-columns: 1fr; align-items: stretch; }
  .line-ctl { justify-content: flex-start; }
}

/* ============================================================
   Hub 판매목록 · 알람 · 목표 — 2026-09-23 신설
   기존 규칙은 건드리지 않는다. 표는 table.data, 진행바는 .goal-* 를 그대로 쓴다.
   ============================================================ */

/* 패널 머리의 기간·기준월 입력 — select.month-select와 같은 규격 */
.filter-date {
  background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-sm); padding: 6px 10px; font-size: 12.5px;
  color: var(--aha-text-strong); font-family: inherit; outline: none;
}
.filter-date:focus { border-color: var(--aha-accent); }

/* KPI 격자는 칸 수에 열을 맞춘다 — 남는 칸이 생기면 그 자리가 회색으로 비어 보인다
   (칸 배경이 hairline용이라서). 알람은 두 칸, 현황은 네 칸이다. */
#alarm-kpi { grid-template-columns: repeat(2, 1fr); }
/* 현황 4칸은 한 줄로 세운다. 880px이면 칸마다 200px 남짓이라 값과 부제가 한 줄에 들어간다
   (2026-09-23 지시 — 1080px 기준이면 노트북 창 폭에서 두 줄로 접혔다). */
#kpi { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 880px) {
  #kpi { grid-template-columns: repeat(4, 1fr); }
}

/* 알람 한 줄 — 왼쪽 종류·기한, 오른쪽 내용.
   왼쪽 폭은 가장 긴 이름("PAYBACK 입금예정") + 기한 뱃지가 한 줄에 들어가게 잡는다. */
.alarm-row {
  display: grid; grid-template-columns: 190px 1fr; gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--aha-border-soft); font-size: 13px;
}
.alarm-row:last-child { border-bottom: none; }
.alarm-kind { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.alarm-name { font-weight: 600; color: var(--aha-text-strong); white-space: nowrap; }
/* 기한 표시는 컬러 보더로만 — 채운 배경은 목록에서 너무 튄다 */
.alarm-dday {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--radius-sm);
  border: 1px solid var(--aha-border); color: var(--aha-text-sub);
}
/* 당일 — 칩 테두리는 무채색(9-3절 테라코타 범위 축소, 2026-09-30). 진한 차콜로 한 단 올려 구분한다 */
.alarm-dday.now { border-color: var(--aha-text-strong); color: var(--aha-text-strong); }
.alarm-detail { color: var(--aha-text); word-break: keep-all; }
.alarm-detail .k { color: var(--aha-text-muted); margin-right: 4px; }
.alarm-detail .v { font-weight: 600; color: var(--aha-text-strong); }
.alarm-detail .num { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; }
.alarm-seller { font-size: 11.5px; color: var(--aha-text-sub); margin-top: 3px; }

/* 목표 표 안의 입력칸 */
.target-input {
  width: 110px; padding: 5px 8px; text-align: right;
  background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-sm); font-family: var(--aha-font-mono);
  font-variant-numeric: tabular-nums; font-size: 12.5px;
  color: var(--aha-text-strong); outline: none;
}
.target-input:focus { border-color: var(--aha-accent); }
.target-unset { color: var(--aha-text-muted); font-size: 12px; }
.target-pct { display: flex; align-items: center; gap: 7px; min-width: 128px; }
.target-pct .goal-bar-track { width: 70px; flex: none; }
table.data tfoot td {
  padding: 9px 8px; border-top: 1px solid var(--aha-border);
  font-weight: 600; color: var(--aha-text-strong);
}
table.data tfoot td.num { text-align: right; font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .alarm-row { grid-template-columns: 1fr; gap: 4px; }
}

/* 다음 판매 기회 (고객 케어 ③, 2026-11-06) — 줄은 .alarm-row 그대로, 리베이트 한 줄만 더한다.
   안내는 제약이라 text-strong 600(9-3절 안내 농도). 칩·알약 없이 글자와 행 구분선만. */
.care-notice { font-size: 12.5px; font-weight: 600; color: var(--aha-text-strong); margin: 0 0 6px; }
.care-based { font-size: 11px; color: var(--aha-text-sub); margin: 8px 0 0; }
.care-row .num { font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums; }
.care-row .alarm-detail { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.care-phone { color: var(--aha-text-sub); }
.care-sep .k, .care-rb .k { color: var(--aha-text-sub); margin-right: 4px; }
.care-rebate { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; font-size: 12.5px; color: var(--aha-text); }
.care-rb { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.care-rb .v { font-weight: 600; color: var(--aha-text-strong); }
.care-to { color: var(--aha-text); }
.care-tier, .care-sub { font-size: 11px; color: var(--aha-text-sub); }
#care-range { margin-left: auto; }
@media (max-width: 760px) {
  #care-range { margin-left: 0; }
}

/* ---------- 판매건 수정 모달 (Hub) ----------
   덮개는 직원 상세 모달의 .emp-overlay 를 그대로 쓴다. 폼이 길어서 본문만 스크롤하고
   머리·바닥은 고정한다 — 저장 버튼을 찾으러 스크롤하게 만들지 않는다. */
.sale-modal {
  width: min(760px, 96vw); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.sale-modal-hd {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 14px 18px; background: var(--aha-brand-bar); color: var(--aha-brand-bar-text);
}
.sale-modal-hd .t { font-size: 15px; font-weight: 600; }
.sale-modal-hd .line-tag {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm);
  border: 1px solid rgba(245,242,238,.45);
}
.sale-modal-hd .x {
  margin-left: auto; background: none; border: none; color: var(--aha-brand-bar-text);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px;
}
/* 창 크기 (2026-10-21) — 오른쪽 아래 모서리로 끌어 키우고, 머리줄 [크게]로 화면 가득 ↔ [원래대로].
   끈 크기는 인라인 width/height 로 남는다 — 버튼을 누르면 지우고 정해진 크기로 돌아간다. */
.sale-modal { resize: both; min-width: min(420px, 96vw); min-height: 320px; max-width: 100%; }
/* 덮개(.emp-overlay)의 안쪽 여백까지 꽉 — vw 로 잡으면 여백만큼 넘친다 */
.sale-modal.is-max { width: 100%; height: 100%; max-width: none; max-height: none; resize: none; }
.sale-modal-hd .sz {
  margin-left: auto; background: none; color: var(--aha-brand-bar-text); cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-sm);
  border: 1px solid rgba(245,242,238,.45);
}
.sale-modal-hd .sz:hover { background: rgba(245,242,238,.12); }
.sale-modal-hd .sz + .x { margin-left: 4px; }
@media (max-width: 760px) {
  .sale-modal { resize: none; min-width: 0; }
  .sale-modal-hd .sz { display: none; }
  .sale-modal-hd .sz + .x { margin-left: auto; }
}
.sale-modal-body { padding: 14px 18px 18px; overflow-y: auto; flex: 1; }
/* 판매 수정 창 예상 마진 (EMR 2단계 묶음 ③, 2026-11-18) — 금액 칸 아래 「최종마진 지금 → 저장하면」. 서버 숫자 그대로 */
.edit-margin-preview { margin: 8px 0 4px; padding: 8px 12px; border: 1px solid var(--aha-border-soft); border-radius: 8px; background: var(--aha-bg-card); }
.edit-margin-main { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 13px; }
.edit-margin-main .k { color: var(--aha-text-sub); white-space: nowrap; }
.edit-margin-main .v { color: var(--aha-text-strong); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.edit-margin-sub { font-size: 12px; color: var(--aha-text-sub); text-align: right; }
.edit-margin-note { font-size: 11px; color: var(--aha-text-sub); padding-top: 2px; }
.edit-margin-preview.is-dim .edit-margin-main .v { color: var(--aha-text-sub); }
.sale-modal-ft {
  flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--aha-border-soft); background: var(--aha-bg-hover);
}
.sale-modal-ft .spacer { margin-left: auto; }

/* 고칠 수 없는 칸 — 매장·도매대리점·판매자·판매유형은 취소 후 재입력이라 읽기로만 보여준다 */
.readonly-box {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px;
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--aha-bg-sunken); border-radius: var(--radius-sm);
}
.readonly-box .r { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; min-width: 0; }
.readonly-box .r .k { color: var(--aha-text-sub); flex: none; }
.readonly-box .r .v { color: var(--aha-text-strong); font-weight: 600; overflow-wrap: anywhere; }

.modal-section {
  font-size: 12px; font-weight: 600; color: var(--aha-text-strong);
  padding-top: 14px; margin-bottom: 10px; border-top: 1px solid var(--aha-border-soft);
}
.modal-section.first { padding-top: 0; border-top: none; }

/* 판매목록 행은 눌러서 수정 모달을 연다 */
table.data tr.row-click { cursor: pointer; }
table.data tr.row-click:hover td { background: var(--aha-bg-hover); }

/* 차트 범례 — 색 견본 + 이름 */
.chart-legend { display: flex; align-items: center; gap: 14px; }
.chart-legend .lg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--aha-text-sub); }
.chart-legend .sw { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.chart-legend .sw.target { background: var(--aha-border); }
.chart-legend .sw.actual { background: var(--aha-accent); }
/* 현황탭 통신사별·매장별 막대 — 한 막대 안에 무선·유선을 쌓아 구성까지 보인다.
   2026-11-20 그래프 작업: 무선 진한 회색 · 유선 연한 회색(테마 무채색 규칙 — 예전 테라코타 · 황토 대신) */
.chart-legend .sw.wireless { background: var(--aha-chart-strong); }
.chart-legend .sw.wired { background: var(--aha-chart-soft); }
.bar-w { fill: var(--aha-chart-strong); }
.bar-wd { fill: var(--aha-chart-soft); }
.trend-seg.mini { stroke-width: 2; }

/* ── Hub 현황 「이번 달 한눈에」 카드 3장 (2026-11-20) — KPI 바로 아래. 누르면 크게(.chart-overlay) ── */
.glance { margin-bottom: 16px; }
.glance-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.glance-title { font-size: 15px; font-weight: 600; color: var(--aha-text-strong); }
.glance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .glance-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.glance-card {
  display: flex; flex-direction: column; gap: 10px; min-height: 150px; box-sizing: border-box; width: 100%;
  padding: 16px; background: var(--aha-bg-card); border: 1px solid var(--aha-border); border-radius: var(--radius-md);
  font: inherit; color: inherit; text-align: left;
}
button.glance-card { cursor: pointer; transition: background .12s ease; }
button.glance-card:hover { background: var(--aha-bg-hover); }
button.glance-card:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { button.glance-card { transition: none; } }
@media (max-width: 900px) { .glance-card { min-height: 0; } }
.glance-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glance-card-title { font-size: 13px; font-weight: 600; color: var(--aha-text-sub); }
.glance-more {
  flex: none; font-size: 12px; font-weight: 600; color: var(--aha-text-strong);
  border: 1px solid var(--aha-border); border-radius: 8px; padding: 6px 10px; background: var(--aha-bg-card);
}
.glance-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex: 1; }
.glance-nums { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.glance-main { font-size: 20px; font-weight: 600; color: var(--aha-text-strong); word-break: keep-all; overflow-wrap: anywhere; }
/* 매장별 카드 — 큰 글자 줄을 「이름(한 줄, 넘치면 …) · 금액(안 잘림)」으로 나눈다 */
.glance-nums.fill { flex: 1 1 auto; }
.glance-main.split { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.glance-main-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.glance-main-amt { flex: none; }
.glance-sub { font-size: 12px; color: var(--aha-text-sub); }
.glance-sub:empty { display: none; }
.glance-mini { flex: none; display: block; }

/* 크게 보기 창 — 겉틀은 .emp-overlay(스크림 · 가운데) · 머리는 .sale-modal-hd(차콜). 폰은 아래에서 올라오는 창 */
.chart-modal {
  width: min(880px, 96vw); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--aha-bg-card); border: 1px solid var(--aha-border);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.chart-modal .sale-modal-hd .x { min-width: 36px; min-height: 36px; }
.chart-modal-body { padding: 16px 20px 4px; overflow-y: auto; }
.chart-modal-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; color: var(--aha-text-sub); }
.chart-modal-box { margin-top: 12px; overflow-x: auto; overscroll-behavior-x: contain; }
.chart-modal .chart-cap { padding: 8px 0 14px; }
@media (max-width: 560px) {
  .chart-overlay { align-items: flex-end; padding: 0; }
  .chart-modal { width: 100%; max-height: 88vh; border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: none; }
  .chart-modal-body { padding: 14px 14px 4px; }
}

/* 취소요청·반려·철회 이력 — 승인 판단에 쓰는 정보라 눈에 띄게 둔다 */
.cancel-box {
  padding: 11px 13px; margin-bottom: 14px; font-size: 12.5px;
  background: var(--aha-bg-warn-soft); border: 1px solid var(--aha-amber);
  border-radius: var(--radius-sm); color: var(--aha-text-strong);
}
.cancel-box .hd { font-weight: 600; color: var(--aha-warn); margin-bottom: 6px; }
.cancel-box .r { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.cancel-box .r .k { color: var(--aha-text-sub); flex: none; min-width: 58px; }
.cancel-box .r .v { overflow-wrap: anywhere; }

/* 금액 항목·PAYBACK을 못 고치는 상태일 때 띄우는 안내 */
.locked-note {
  padding: 10px 12px; font-size: 12.5px; border-radius: var(--radius-sm);
  background: var(--aha-bg-warn-soft); border: 1px solid var(--aha-amber); color: var(--aha-warn);
  margin-bottom: 10px;
}

@media (max-width: 620px) {
  .readonly-box { grid-template-columns: 1fr; }
}

/* ============================================================
   PAYBACK 월 정산 · 대표자 알림 — 묶음 F-3 (2026-10-17)
   Insights 대표자 알림 칸·정산 탭, Hub 정산 패널. 새 색·새 폰트 없이 위 토큰만 쓴다.
   굵기는 600까지(테마 2절 신규 화면 규칙). 그림자는 떠 있는 것(모달·토스트)과 눌림반응 버튼에만.
   ============================================================ */

/* 주 버튼 — 테라코타 + 눌림반응 (테마 5·6절). 정산 승인·지급 확정·재지급 확정에만 쓴다.
   .btn-solid 도 2026-11-03 같은 값(테라코타)으로 맞췄다. */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--aha-accent); border: 1px solid var(--aha-accent); color: #fff;
  border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 0 var(--aha-accent-shadow), 0 6px 12px rgba(32,29,26,.2);
  transition: transform .08s ease-out, box-shadow .08s ease-out, background .12s;
}
.btn-primary:hover { background: var(--aha-accent-hover); border-color: var(--aha-accent-hover); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--aha-accent-shadow), 0 2px 4px rgba(32,29,26,.15); }
.btn-primary:disabled, .btn-outline:disabled, .btn-text:disabled { opacity: .55; cursor: default; }
.btn-primary:disabled:active { transform: none; }
/* 텍스트 버튼 — 호버 때 밑줄만 (테마 6절) */
.btn-text {
  background: none; border: none; padding: 2px 0; font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--aha-text); cursor: pointer; white-space: nowrap;
}
.btn-text:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.btn-text.warn { color: var(--aha-warn); }

/* 상태 칩 — 눌린 바탕(sunken) 12px. 실패만 경고색 글자 */
.settle-chip {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  background: var(--aha-bg-sunken); color: var(--aha-text); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.settle-chip.warn { color: var(--aha-warn); }
.warn-text { color: var(--aha-warn); font-weight: 600; }
/* 폰에서 안 보이던 title 경고·제약을 화면 글로 (2026-10-28). DESIGN 7절 「제약·경고 text-strong 600」.
   .hold-warn = 승인된 PAYBACK 묶음 표 위 안내줄(좌측 경고색 띠 — DESIGN에 없는 표현, 인승 기본안 승인)
   .limit-note = 막힌 칸·버튼 옆 짧은 이유(12px) */
.hold-warn {
  /* 표와 같은 가로 스크롤 영역 안이라, 폰에서 표를 옆으로 밀어도 안내줄은 왼쪽에 붙어 있게 */
  position: sticky; left: 0;
  margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid var(--aha-warn);
  font-size: 12.5px; font-weight: 600; color: var(--aha-text-strong); line-height: 1.5;
}
.hold-warn[hidden] { display: none; }
.limit-note { font-size: 12px; font-weight: 600; color: var(--aha-text-strong); margin-left: 6px; white-space: nowrap; }

/* ── 대표자 알림 칸 ── */
.appr-card { margin-bottom: 16px; }
.appr-card .panel-head { justify-content: space-between; }
.appr-card .panel-title { font-size: 15px; font-weight: 600; }
.appr-card.is-empty .panel-head { border-bottom: none; }
.appr-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--aha-border-soft);
}
.appr-row:last-child { border-bottom: none; }
.appr-text { font-size: 14px; color: var(--aha-text); }
/* 경고 줄(지급 실패·해지 예고·유예) — 위 .appr-text 가 뒤에 있어 .warn-text 색을 덮던 것 (2026-10-30 D-2) */
.appr-text.warn-text { color: var(--aha-warn); }
.appr-figure {
  font-size: 20px; font-weight: 600; color: var(--aha-text-strong); white-space: nowrap;
  font-family: var(--aha-font-mono); font-variant-numeric: tabular-nums;
}
.appr-row .btn-outline { padding: 6px 12px; min-height: 32px; white-space: nowrap; }
.appr-caption { font-size: 11px; color: var(--aha-text-sub); padding-top: 8px; }
/* 고객 케어 ④ 다음 달 약정 만료 줄 — 줄 전체가 Hub 링크 */
.appr-care { color: inherit; text-decoration: none; }
.appr-care:hover .appr-text { text-decoration: underline; }
.appr-sub { display: block; font-size: 11px; color: var(--aha-text-sub); margin-top: 2px; }
@media (max-width: 560px) {
  .appr-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .appr-figure { font-size: 16px; }
  .appr-row > :last-child { grid-column: 1 / -1; justify-self: start; }
}

/* 합류 신청 목록 모달 */
.join-modal { width: min(720px, 96vw); }
.join-list { max-height: 60vh; overflow-y: auto; }
.join-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--aha-border-soft); font-size: 13px;
}
.join-row:last-child { border-bottom: none; }
.join-email { font-weight: 600; color: var(--aha-text-strong); overflow-wrap: anywhere; }
.join-meta { font-size: 12px; color: var(--aha-text-sub); margin-top: 4px; }
.join-btns { display: flex; gap: 8px; }

/* ── 정산 탭 ── */
.settle-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.settle-head .settle-payday { font-size: 12.5px; color: var(--aha-text-sub); margin-left: 8px; }
/* 이름·계좌가 한 글자씩 꺾이지 않게 — 좁은 화면은 .panel-body 가로 스크롤로 넘겨 본다(목표 표와 같은 방식) */
.settle-table td { vertical-align: middle; white-space: nowrap; }
.settle-table tr.store-row td {
  font-weight: 600; color: var(--aha-text-strong); background: var(--aha-bg-content);
  border-bottom: 1px solid var(--aha-border);
}
.settle-table tr.store-row:hover td { background: var(--aha-bg-content); }
.settle-table tr.is-held td:not(.keep) { color: var(--aha-text-sub); }
.settle-table .cell-sub { display: block; font-size: 11px; color: var(--aha-text-sub); }
.settle-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--aha-accent); cursor: pointer; }
.settle-table input[type="checkbox"]:disabled { cursor: not-allowed; }
.settle-table .acts { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.settle-prepaid { font-size: 12px; color: var(--aha-text-sub); margin: -12px 0 16px; }
.settle-actions { justify-content: flex-start; }
.settle-actions .spacer { margin-left: auto; }
.settle-history { margin-bottom: 20px; }
.settle-history > summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--aha-text-strong); padding: 4px 0;
}
.settle-history ul { margin: 8px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--aha-text); line-height: 1.8; }
.print-only { display: none; }

/* Hub 알람 탭 「PAYBACK 정산」 패널 */
.pb-settle-summary { font-size: 14px; color: var(--aha-text); }

/* 토스트 — 차콜 바탕, 성공 초록·실패 경고색 글자 대신 왼쪽 띠 (테마 6절) */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 500; transform: translate(-50%, 16px);
  max-width: min(480px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--aha-brand-bar); color: var(--aha-brand-bar-text); font-size: 13px; font-weight: 500;
  border-left: 4px solid var(--aha-success-border);
  box-shadow: 0 12px 32px rgba(32,29,26,.18); opacity: 0; pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-left-color: var(--aha-warn); }
.toast.info { border-left-color: var(--aha-border-input); } /* 안내 알림 — 신고 링크 없음(문구 묶음 11-20) */
/* 로그인 만료 안내(api.js) — 닫히지 않고 「다시 로그인」 링크를 누를 수 있다 */
.toast.sticky { pointer-events: auto; }
.toast.sticky a { margin-left: 10px; color: inherit; font-weight: 700; }

/* 확인·사유 모달 (settleUi.js) — 직원 상세 모달 양식 */
.act-modal { width: min(460px, 94vw); }
.act-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.act-message { font-size: 13.5px; color: var(--aha-text); line-height: 1.6; white-space: pre-line; }
.act-fields { display: flex; flex-direction: column; gap: 12px; }
.act-fields textarea[readonly] { font-family: var(--aha-font-mono); font-size: 12.5px; min-height: 120px; }
.act-error:empty { display: none; }
.act-buttons { display: flex; justify-content: flex-end; gap: 8px; }

/* ── 굵기 최신 기준 — body.type-std 화면만 (2026-10-21, DESIGN.md 2절) ──
   굵기 400/500/600. 700은 제품 스위처·최상위 탭 활성 글자에만.
   type-std 는 Hub·Insights·반품·사용자·계약·운영자 6개 화면에 붙어 있다. Input·첫 화면·로그인은 안 붙어
   공용 700이 남는다(DESIGN.md: 허용 목록 밖 700은 그 화면을 고칠 때 정리, 일괄 변경 안 함).
   서체는 2026-11-03부터 전 화면 SUIT 1종이라 여기서 따로 덮어쓰지 않는다(:root --aha-font-mono). */
body.type-std :is(.topbar .util, .panel-title, .section-label, .toast.sticky a) { font-weight: 600; }
body.type-std .req::after { font-weight: 600; }

/* ── 인쇄 — 정산 부분만 A4 세로 (settleUi.js printScoped) ──
   print-target 을 품은 줄기만 남기고 그 곁가지(상단바·탭·다른 패널·모달·꼬리말)는 감춘다.
   계좌는 화면과 같은 가린 값뿐이다(인쇄용 원문 없음). */
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  body { background: #fff; }
  body.print-scope > :not(.print-target):not(:has(.print-target)),
  body.print-scope :has(.print-target) > :not(.print-target):not(:has(.print-target)) { display: none !important; }
  body.print-scope main { max-width: none; padding: 0; }
  body.print-scope .print-target .no-print { display: none !important; }
  body.print-scope .print-target .print-only { display: block !important; }
  /* 「?」 도움말 — 버튼은 빼고, 명단을 읽는 데 필요한 설명(.help-print)만 늘 펼쳐서 낸다 */
  .help-btn, .help-pop:not(.help-print) { display: none !important; }
  .help-pop.help-print {
    display: block !important; position: static; margin: 0; padding: 0;
    border: 0; box-shadow: none; max-width: none; font-size: 11px; color: var(--aha-text-sub);
  }
  body.print-scope .print-target .panel { border: none; overflow: visible; }
  body.print-scope .print-target .panel-body { overflow: visible; padding: 0; }
  body.print-scope .print-target table.data { font-size: 10.5px; }
  /* 종이는 가로 스크롤이 없다 — 화면용 줄바꿈 금지를 풀어 A4 폭 안에 들어오게 한다 */
  body.print-scope .print-target .settle-table td { white-space: normal; }
  body.print-scope .print-target table.data thead { display: table-header-group; }
  body.print-scope .print-target table.data tr { break-inside: avoid; }
  body.print-scope .print-target .kpi-grid { break-inside: avoid; }
  /* ── 월간 경영보고서 PDF (insights.js printReport, 2026-10-21) — 정산 인쇄(print-scope)와 따로 건다 ──
     Cockpit·상세분석을 둘 다 펼치고, 옆으로 넘기던 상세 자료는 세로로 늘어놓는다. 상세분석은 새 쪽에서 시작. */
  body.print-report > :not(.print-target):not(:has(.print-target)),
  body.print-report :has(.print-target) > :not(.print-target):not(:has(.print-target)) { display: none !important; }
  body.print-report main { max-width: none; padding: 0; }
  body.print-report .print-target .print-only { display: block !important; }
  body.print-report .print-target :is(select, button, .ai-refresh, .slider-ctl, .slide-tabs, .slide-hint, .no-print) { display: none !important; }
  /* 머리줄(print-head)에 업체·월·집계 시각을 다 적었다 — 화면용 제목 줄·상태 줄은 겹치므로 뺀다 */
  body.print-report .print-target :is(.section-label:has(#month-select), #status-line) { display: none !important; }
  body.print-report #view-cockpit, body.print-report #view-detail { display: block !important; }
  body.print-report #view-detail { break-before: page; }
  body.print-report .slider { display: block; overflow: visible; height: auto !important; }
  body.print-report .slider .slide { min-width: 0; margin-bottom: 14px; }
  body.print-report .slider .slide.slide-off { display: block !important; }   /* 화면에선 고른 묶음만, 종이엔 전부 */
  body.print-report .panel { break-inside: avoid; overflow: visible; }
  body.print-report .panel-body { overflow: visible; }
  body.print-report :is(.kpi-grid, .summary-grid, .cover) { break-inside: avoid; }
  /* 표지의 짙은 바탕을 종이에도 그대로 — 안 그러면 흰 글자가 사라진다 */
  body.print-report .cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Cockpit 그래프 둘 (2026-11-20) — 종이엔 하나씩 A4 폭으로 크게(insights.js 가 인쇄 때 700px 폭으로 다시 그림) · 순위 막대 색 그대로 */
  body.print-report .cockpit-charts { display: block; }
  body.print-report .chart-card { break-inside: avoid; margin-bottom: 14px; }
  body.print-report :is(.chart-card, .rank-bar-track) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-report .chart-hit { display: none; }
  .print-head { margin-bottom: 12px; font-size: 12px; color: var(--aha-text); }
  .print-head .t { font-size: 16px; font-weight: 600; color: var(--aha-text-strong); margin-bottom: 4px; }
  .print-foot { margin-top: 12px; font-size: 12px; color: var(--aha-text); border-top: 1px solid var(--aha-border); padding-top: 8px; }
}

/* 「이 오류 신고하기」 (2026-10-29 A/S) — 오류 글 뒤에 붙는 글자 버튼. 토스트 안에서는 누를 수 있게 둔다 */
.report-link {
  margin-left: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: inherit; text-decoration: underline;
}
.toast.has-link { pointer-events: auto; }
/* 문의창 맨 위 「도움말」(2026-11-25, js/support.js) — Policy Center styles.css .support-help 와 같은 값. 새 색 없음(테라코타 강조 · 보조 글자) */
.support-help { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.support-help a { font-size: 13px; font-weight: 600; color: var(--aha-accent); text-decoration: underline; text-underline-offset: 2px; }
.support-help span { font-size: 12px; color: var(--aha-text-sub); }
/* 상단바 버튼이 3개(새로고침·문의하기·로그아웃)라 375px 에서 12px 넘쳤다 — 폰 폭에서만 간격·로고를 줄인다 */
@media (max-width: 480px) {
  .topbar { gap: 6px; }
  .topbar .util { padding: 0 7px; }
}
@media (max-width: 400px) {
  .topbar .logo { height: 20px; }
}
body.type-std .report-link { font-weight: 600; }

/* ── 일일 보고 대체 (2026-11-02) — 상담·접수·특이사항 창(js/daily.js) · Hub 오늘 보고(js/hubDaily.js) · Insights 매장 운영 장 ── */
.daily-modal { width: min(460px, 94vw); max-height: 92vh; display: flex; flex-direction: column; }
.daily-modal.wide { width: min(680px, 96vw); }
.daily-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.daily-form { display: flex; flex-direction: column; gap: 14px; }
.daily-form.inline { flex-direction: row; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.daily-form.line-add { flex-direction: row; gap: 8px; }
.daily-form.line-add input { flex: 1; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.req-mark { font-size: 11px; color: var(--aha-accent-shadow); font-weight: 600; margin-left: 4px; }
.consent-box { border: 1px solid var(--aha-border-soft); border-radius: var(--radius-md); padding: 10px 12px; background: var(--aha-bg-content); }
.consent-box details { margin-top: 6px; font-size: 12px; color: var(--aha-text-sub); }
.consent-box ul { margin: 6px 0 0 18px; padding: 0; line-height: 1.6; }
.wanted-box { border-left: 3px solid var(--aha-border); padding-left: 12px; }
.seg { display: flex; gap: 16px; font-size: 13px; }
.seg label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--aha-border-soft); border-radius: var(--radius-md); }
.pick-list:empty { display: none; }
.pick-list li { border-bottom: 1px solid var(--aha-border-soft); }
.pick-list li:last-child { border-bottom: none; }
.pick-list button { width: 100%; text-align: left; background: none; border: none; padding: 8px 10px; font: inherit; cursor: pointer; }
.pick-list button:hover { background: var(--aha-bg-hover); }
.pick-list > .line-sub { padding: 8px 10px; }
.picked { font-size: 13px; margin: 0; }
.note-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.note-body, .today-note p, .ops-note p { margin: 4px 0 0; font-size: 13.5px; white-space: pre-line; }
.note-line { margin: 2px 0 0; font-size: 13px; }
.badge-line { margin: 0; font-size: 12px; color: var(--aha-success-text); }
.act-buttons.wrap { flex-wrap: wrap; justify-content: flex-start; }
.daily-actions { display: inline-flex; gap: 8px; margin-left: auto; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; }
:is(.daily-body, #panel-today, #panel-consults, #panel-cases) .warn { color: var(--aha-warn); }
.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--aha-border-soft); border: 1px solid var(--aha-border-soft); margin-bottom: 10px; }
.today-grid > div { background: var(--aha-bg-card); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.today-grid .k, .ops-kpis .k { font-size: 12px; color: var(--aha-text-sub); }
.today-grid b, .ops-kpis b { font-size: 18px; font-weight: 600; color: var(--aha-text-strong); font-variant-numeric: tabular-nums; }
.today-grid b.warn, .ops-kpis b.warn { color: var(--aha-warn); }
.today-note { border-top: 1px solid var(--aha-border-soft); padding-top: 8px; margin-top: 8px; }
table.click-rows tbody tr { cursor: pointer; }
table.click-rows tbody tr:hover { background: var(--aha-bg-hover); }
.alarm-row.clickable { cursor: pointer; }
.alarm-row.clickable:hover { background: var(--aha-bg-hover); }
.ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ops-kpis > div { display: flex; flex-direction: column; gap: 2px; }
.panel-sub-title { font-size: 12px; font-weight: 600; color: var(--aha-text-sub); margin: 14px 0 6px; }
.ops-bars { display: flex; flex-direction: column; gap: 6px; }
.ops-bar-row { display: grid; grid-template-columns: 120px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; }
.ops-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-bar-track { height: 10px; background: var(--aha-bg-sunken); border-radius: 4px; overflow: hidden; }
.ops-bar-track i { display: block; height: 100%; background: var(--aha-text-sub); border-radius: 4px; }
.ops-notes { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; }
.ops-note { border-bottom: 1px solid var(--aha-border-soft); padding-bottom: 8px; }
@media (max-width: 760px) {
  .form-grid.cols-3, .today-grid, .ops-kpis { grid-template-columns: 1fr 1fr; }
  .daily-actions { margin-left: 0; }
}

/* ── Input 윗줄 · 판매자 칸 (2026-11-20 실기기 묶음) ──
   폰(600px 이하): 1줄 「판매 입력」 + 무선 · 유선, 2줄 「고객 접수」 · 「오늘 특이사항」 반반. 글자는 줄바꿈 안 함. 600px 넘으면 그대로 */
.sale-head, .sale-head button { white-space: nowrap; }
@media (max-width: 600px) {
  .sale-head { flex-wrap: wrap; justify-content: flex-start; row-gap: 10px; }
  .sale-head .daily-actions { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-left: 0; }
  .sale-head .daily-actions .btn-outline { width: 100%; justify-content: center; }
}
/* 판매자(고칠 수 없는 글자) — 옆 칸 글자와 같은 왼쪽 여백(입력칸 테두리 1 + 안쪽 11). 날짜 칸은 칸 폭을 넘지 않게(아이폰 날짜 칸 최소 폭) */
#sale-form .static-value { padding-left: 12px; }
.field input[type="date"] { min-width: 0; max-width: 100%; box-sizing: border-box; }
