/* 04-screens.css — 대시보드 · 파이프라인 · 전망 밴드 · 통계 · 담당자 상세
   원본 index.html 1325~1693줄. 파일 순서 = 캐스케이드 순서이므로 이름 앞 번호를 바꾸지 말 것. */
  /* ===== 3탭 무스크롤 레이아웃 (FHD 1920×1080 기준, 표 내부만 스크롤) ===== */
  #dashboard{ display:flex; flex-direction:column; gap:var(--sp-4); flex:1; min-height:0; }
  #dashboard .card{ margin-bottom:0; }
  /* 배치 순서 — KPI 3장이 한 줄, 그 아래 전망 스트립, 월별 매출 표,
     맨 아래 파이프라인(넓게) + 개인별 달성률(좁게). */
  .dash-kpi{ display:grid; grid-template-columns:1.25fr 1fr 1fr; gap:var(--sp-4); flex:none; }
  .dash-kpi .card{ height:164px; overflow:hidden; display:flex; flex-direction:column; }
  .dash-kpi .kpi-card.kpi-highlight{ padding:16px 18px; }
  .dash-kpi .kpi-card.kpi-highlight .ref{ margin-top:6px; font-size:var(--fs-4); }
  .dash-kpi .kpi-card .comment-box{ flex:1; min-height:0; overflow-y:auto; margin-top:8px; padding-top:8px; font-size:var(--fs-3); line-height:1.55; }
  .dash-kpi .kpi-card.kpi-week{ padding:16px 18px; justify-content:flex-start; }
  .dash-kpi .kpi-card.kpi-week .ref{ margin-top:auto; font-size:var(--fs-4); line-height:1.6; }
  .kpi-delta-slot{ display:flex; align-items:center; }
  .kpi-delta{
    display:inline-block; padding:2px 9px; border-radius:var(--radius-full);
    font-size:var(--fs-2); font-weight:700; line-height:1.6; white-space:nowrap;
  }
  .kpi-delta.up{ background:var(--positive-bg); color:var(--positive); }
  .kpi-delta.down{ background:var(--negative-bg); color:var(--negative); }
  .kpi-delta.flat{ background:var(--surface2); color:var(--faint); }
  .dash-forecast{ flex:none; }
  .dash-mid{ flex:1; min-height:0; display:grid; grid-template-columns:1.6fr 1fr; gap:var(--sp-4); }
  .pipe-mirror{ display:flex; flex-direction:column; }
  .pipe-mirror .pipeline-tab-header{ flex:none; }
  .pipe-mirror .pipeline-tab-panel{ flex:1; min-height:0; display:flex; flex-direction:column; }
  .pipe-mirror .pipeline-tab-panel table{ flex:1; min-height:0; }
  .pipe-mirror .pipeline-tab-panel .note{ flex:none; }
  .dash-mid .card{ min-height:0; overflow:hidden; }
  .pipeline-card{ display:flex; flex-direction:column; }
  .pipeline-card .pipeline-tab-header{ flex:none; margin-bottom:10px; }
  .pipeline-card .pipeline-tab-panel{ flex:1; min-height:0; display:flex; flex-direction:column; }
  .pipeline-card .pipeline-tab-panel table{ flex:1; min-height:0; }
  .pipeline-card .pipeline-tab-panel .note{ flex:none; }
  .rep-achieve-card{ display:flex; flex-direction:column; }
  .rep-achieve-card h3{ flex:none; }
  .rep-achieve-card .note{ flex:none; }
  /* 개인별 목표 달성률 표 */
  .rep-table-wrap{ flex:1; min-height:0; overflow-y:auto; }
  table.rep-table{ width:100%; border-collapse:collapse; font-size:var(--fs-4); font-variant-numeric:tabular-nums; }
  table.rep-table th{ position:sticky; top:0; z-index:1; background:var(--card); text-align:left;
    font-size:var(--fs-3); font-weight:800; color:var(--muted); padding:7px 9px; border-bottom:1.5px solid var(--border); white-space:nowrap; }
  table.rep-table th.num, table.rep-table td.num{ text-align:right; }
  table.rep-table td{ padding:8px 9px; border-bottom:1px solid var(--border-soft); white-space:nowrap; }
  table.rep-table td.strong{ font-weight:800; }
  table.rep-table tr.total-row td{ border-top:2px solid var(--border); border-bottom:none; font-weight:800; background:var(--surface2); }
  table.rep-table .dash{ color:var(--muted); }
  table.rep-table tr.row-zero td{ color:var(--muted); }
  .pct-sm{ display:inline-block; margin-left:5px; font-size:var(--fs-1); font-weight:800; color:var(--primary); }
  /* 행 — 달성률 등급별 좌측 띠 + 호버 애니메이션 */
  .rp-row{ cursor:pointer; transition:background .16s ease, transform .16s ease; }
  .rp-row .rp-name{ font-weight:800; position:relative; }
  .rp-dot{ display:inline-block; width:4px; height:15px; border-radius:var(--radius-xs); margin-right:9px; vertical-align:-3px;
    background:var(--border); transition:height .16s ease, background .16s ease; }
  .rp-row.lv-a100 .rp-dot{ background:#6b82be; }
  .rp-row.lv-a80  .rp-dot{ background:#16a34a; }
  .rp-row.lv-a60  .rp-dot{ background:#6b82be; }
  .rp-row.lv-a40  .rp-dot{ background:#f59e0b; }
  .rp-row.lv-a0   .rp-dot{ background:#dc2626; }
  .rp-row:hover{ background:var(--row-hover); }
  .rp-row:hover .rp-dot{ height:19px; }
  .rp-pct-cell{ display:flex; align-items:center; justify-content:flex-end; gap:var(--sp-3); }
  .rp-pct{ font-weight:800; font-size:var(--fs-5); min-width:52px; text-align:right; }
  .rp-row.lv-a100 .rp-pct{ color:#6b82be; }
  .rp-row.lv-a80  .rp-pct{ color:#16a34a; }
  .rp-row.lv-a60  .rp-pct{ color:#6b82be; }
  .rp-row.lv-a40  .rp-pct{ color:#b45309; }
  .rp-row.lv-a0   .rp-pct{ color:#dc2626; }
  .rp-mini{ display:inline-block; width:64px; height:6px; border-radius:var(--radius-xs); background:var(--surface2); overflow:hidden; flex:none; }
  .rp-mini i{ display:block; height:100%; border-radius:var(--radius-xs); background:currentColor; transition:width .5s cubic-bezier(.22,.61,.36,1); }
  /* 달성률은 0%(빨강) → 100%(초록) 로 읽힌다 */
  .rp-row.lv-a100 .rp-mini i{ background:var(--rate-100); }
  .rp-row.lv-a80  .rp-mini i{ background:var(--rate-80); }
  .rp-row.lv-a60  .rp-mini i{ background:var(--rate-60); }
  .rp-row.lv-a40  .rp-mini i{ background:var(--rate-40); }
  .rp-row.lv-a0   .rp-mini i{ background:var(--rate-0); }
  /* 100% 달성 행은 은은하게 빛나는 효과 */
  @keyframes rpGlow{ 0%,100%{ box-shadow:inset 3px 0 0 #6b82be; } 50%{ box-shadow:inset 3px 0 0 #d5ddee; } }
  .rp-row.lv-a100 td:first-child{ animation:rpGlow 2.4s ease-in-out infinite; }
  html.no-motion .rp-row.lv-a100 td:first-child{ animation:none; box-shadow:inset 3px 0 0 #6b82be; }
  /* 담당자 상세 팝업 */
  .rpd-box{ width:min(1080px,94vw); max-height:88vh; display:flex; flex-direction:column; }
  .rpd-body{ padding:16px 18px 20px; overflow-y:auto; }
  .rpd-kpis{ display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:var(--sp-4); margin-bottom:16px; }
  .rpd-kpi{ border:1.5px solid var(--border); border-radius:var(--radius-lg); padding:11px 14px; background:var(--card); }
  .rpd-kpi.main{ border-color:var(--primary); border-width:2px; background:#eef2f9; }
  .rpd-k-label{ font-size:var(--fs-2); font-weight:800; color:var(--muted); margin-bottom:3px; }
  .rpd-k-value{ font-size:23px; font-weight:800; line-height:1.12; letter-spacing:-.5px; font-variant-numeric:tabular-nums; }
  .rpd-kpi.main .rpd-k-value{ color:var(--primary); }
  .rpd-kpi.lv-a100 .rpd-k-value{ color:#6b82be; }
  .rpd-kpi.lv-a80  .rpd-k-value{ color:#16a34a; }
  .rpd-kpi.lv-a60  .rpd-k-value{ color:#6b82be; }
  .rpd-kpi.lv-a40  .rpd-k-value{ color:#b45309; }
  .rpd-kpi.lv-a0   .rpd-k-value{ color:#dc2626; }
  .rpd-k-sub{ font-size:var(--fs-1); font-weight:700; color:var(--muted); margin-top:3px; }
  .rpd-sec{ margin-top:16px; }
  .rpd-sec h4{ font-size:var(--fs-5); font-weight:800; margin:0 0 8px; padding-left:9px; border-left:4px solid var(--primary);
    display:flex; align-items:center; gap:var(--sp-3); }
  .rpd-count{ font-size:var(--fs-3); font-weight:700; color:var(--muted); }
  .rpd-table-wrap{ max-height:230px; overflow-y:auto; border:1px solid var(--border); border-radius:var(--radius-md); }
  table.rpd-table{ width:100%; border-collapse:collapse; font-size:var(--fs-3); font-variant-numeric:tabular-nums; }
  table.rpd-table th{ position:sticky; top:0; z-index:1; background:var(--surface2); text-align:left;
    font-size:var(--fs-2); font-weight:800; color:var(--muted); padding:7px 9px; border-bottom:1px solid var(--border); white-space:nowrap; }
  table.rpd-table td{ padding:7px 9px; border-bottom:1px solid var(--border-soft); white-space:nowrap; }
  table.rpd-table th.num, table.rpd-table td.num{ text-align:right; }
  table.rpd-table tr:last-child td{ border-bottom:none; }
  table.rpd-table tr:hover td{ background:var(--row-hover); }
  .rpd-cust{ font-weight:700; }
  .rpd-empty{ text-align:center; color:var(--muted); padding:16px 0; font-size:var(--fs-3); }
  .rpd-stats{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:var(--sp-4); }
  .rpd-mini{ border:1px solid var(--border); border-radius:var(--radius-md); padding:11px 13px; }
  .rpd-mini-h{ font-size:var(--fs-3); font-weight:800; color:var(--muted); margin-bottom:8px; }
  .rpd-mini-row{ display:grid; grid-template-columns:minmax(0,1fr) 72px 62px 46px; gap:var(--sp-3); align-items:center;
    font-size:var(--fs-3); padding:3px 0; }
  .rpd-mini-k{ font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .rpd-mini-bar{ height:7px; border-radius:var(--radius-sm); background:var(--surface2); overflow:hidden; }
  .rpd-mini-bar i{ display:block; height:100%; background:var(--primary); border-radius:var(--radius-sm);
    transition:width .5s cubic-bezier(.22,.61,.36,1); }
  .rpd-mini-v{ text-align:right; font-weight:800; font-variant-numeric:tabular-nums; }
  .rpd-mini-p{ text-align:right; font-weight:800; color:var(--primary); }
  .rpd-months{ display:grid; grid-template-columns:repeat(12,1fr); gap:var(--sp-1); align-items:end; height:86px; }
  .rpd-month{ display:flex; flex-direction:column; align-items:center; height:100%; }
  .rpd-m-bar{ flex:1; width:100%; display:flex; align-items:flex-end; }
  .rpd-m-bar i{ display:block; width:100%; background:var(--primary); border-radius:var(--radius-xs) var(--radius-xs) 0 0;
    transition:height .5s cubic-bezier(.22,.61,.36,1); }
  .rpd-month.zero .rpd-m-bar i{ background:var(--surface2); }
  .rpd-m-lab{ font-size:var(--fs-1); font-weight:700; color:var(--muted); margin-top:3px; }
  .dash-bottom{ flex:none; }
  .dash-bottom .card{ padding:12px 20px; }
  .dash-bottom .card h3{ margin-bottom:0; }
  .dash-bottom #monthlyTableWrap{ max-height:34vh; overflow-y:auto; margin-top:12px; }
  .stage-card{ display:flex; flex-direction:column; }
  .stage-card h3{ flex:none; }
  /* 표 헤더 클릭 정렬 표시 */
  /* 섹션 제목 컬러 배지 — 표가 많은 화면에서 섹션을 색으로 구분 */
  .card h3 .title-with-icon{ padding:4px 12px; border-radius:var(--radius-md); }
  .card h3 .title-with-icon .section-icon{ color:inherit; }
  .sec-blue{ background:#d5ddee; color:#6b82be; }
  .sec-cyan{ background:#d5ddee; color:#4c64a6; }
  .sec-violet{ background:#e4e9f2; color:#6b82be; }
  .sec-green{ background:#dcfce7; color:#15803d; }
  .sec-red{ background:#fee2e2; color:#b91c1c; }
  .sec-amber{ background:#fef3c7; color:#b45309; }
  .sec-gray{ background:var(--surface2); color:var(--muted); }
  /* 이월 탭 유형 배지 — 변동 감지 결과를 이어받는다 */
  .change-type{ display:inline-block; padding:2px 9px; border-radius:var(--radius-full); font-size:var(--fs-3); font-weight:700; white-space:nowrap; }
  .ct-manual{ background:#d5ddee; color:#6b82be; }
  /* 이월 표 컬럼 폭 — 구분,담당자,고객사명,제품명,영업단계,매출액,변경내용(합 100%) */
  table.review-table.carry-table th:nth-child(1), table.review-table.carry-table td:nth-child(1){ width:7%; }
  table.review-table.carry-table th:nth-child(2), table.review-table.carry-table td:nth-child(2){ width:9%; }
  table.review-table.carry-table th:nth-child(3), table.review-table.carry-table td:nth-child(3){ width:19%; }
  table.review-table.carry-table th:nth-child(4), table.review-table.carry-table td:nth-child(4){ width:16%; }
  table.review-table.carry-table th:nth-child(5), table.review-table.carry-table td:nth-child(5){ width:13%; }
  table.review-table.carry-table th:nth-child(6), table.review-table.carry-table td:nth-child(6){ width:13%; }
  table.review-table.carry-table th:nth-child(7), table.review-table.carry-table td:nth-child(7){ width:23%; }
  .ct-moved{ background:#fef3c7; color:#b45309; }
  .ct-dropped{ background:#fee2e2; color:#b91c1c; }
  .ct-completed{ background:#dcfce7; color:#15803d; }
  th.sortable{ cursor:pointer; user-select:none; white-space:nowrap; }
  th.sortable:hover{ color:var(--text); }
  th.sortable::after{ content:'⇅'; margin-left:3px; font-size:var(--fs-1); color:var(--faint); }
  th.sortable.sorted-desc::after{ content:'▼'; font-size:10px; color:var(--primary); }
  th.sortable.sorted-asc::after{ content:'▲'; font-size:10px; color:var(--primary); }
  /* 매출액 5,000만원 이상 강조 */
  td.num.rev-hi{ color:#dc2626; }
  /* 헤더 SALES(영업포털) 버튼 — 오렌지 */
  .btn.btn-sales{ background:#f97316; color:#fff; text-decoration:none; display:inline-flex; align-items:center; }
  /* 헤더 3개 버튼(File Upload / SALES / Report) 크기 통일 */
  .btn.btn-hd{ min-width:124px; padding:9px 18px; font-size:var(--fs-5); font-weight:700;
    display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; height:38px; }
  .btn.btn-sales:hover{ background:#ea580c; }
  .btn.btn-sm{ padding:4px 10px; font-size:var(--fs-3); font-weight:700; }
  /* 개인별 목표 설정 모달 입력칸 */
  .sales-cat-sel.unset{ color:var(--faint); }
  /* 통계 탭 — 숫자와 %가 크게 보이도록 차트 + 표를 나란히 배치 */
  #statsContent{ overflow-y:auto; }
  .stats-head{ display:flex; align-items:baseline; gap:var(--sp-4); margin-bottom:10px; flex:none; }
  .stats-title{ font-size:var(--fs-7); font-weight:800; }
  .stats-sub{ font-size:var(--fs-4); color:var(--muted); }
  .stats-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-4); align-content:start; padding-bottom:12px; }
  .prod-dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:7px; vertical-align:-1px; }
  /* 영업구분 미선택 행 — 놓치지 않도록 행 전체를 붉게 */
  table.review-table > tbody > tr.row-cat-unset > td,
  table.pipeline-table > tbody > tr.row-cat-unset > td{ background:#fef2f2; color:#b91c1c; }
  tr.row-cat-unset > td .stage-pill{ opacity:.92; }
  tr.row-cat-unset > td select.sales-cat-sel{ border-color:#f87171; color:#b91c1c; font-weight:800; background:#fff; }
  table.review-table > tbody > tr.row-cat-unset:hover > td,
  table.pipeline-table > tbody > tr.row-cat-unset:hover > td{ background:#fee2e2; }
  /* 파이프라인 정체(노후도) */
  .stale-chip{ display:inline-block; min-width:46px; text-align:center; padding:2px 8px; border-radius:var(--radius-sm);
    font-size:var(--fs-2); font-weight:800; background:var(--surface2); color:var(--muted); }
  .stale-chip.st-30{ background:#fef3c7; color:#b45309; }
  .stale-chip.st-60{ background:#ffedd5; color:#c2410c; }
  .stale-chip.st-90{ background:#fee2e2; color:#b91c1c; }
  table.stale-table > tbody > tr.st-90 > td{ background:#fef2f2; }
  table.stale-table > tbody > tr.st-90:hover > td{ background:#fee2e2; }
  .stats-prod-bar{ display:flex; flex-wrap:wrap; gap:var(--sp-3); margin-bottom:11px; flex:none; }
  /* 목표 달성 전망 배너 */
  .forecast-band{ flex:none; margin-bottom:12px; }
  .forecast-band:empty{ display:none; }
  .forecast-band > *{ }
  .fc-head{ display:flex; align-items:center; gap:var(--sp-3); flex-wrap:wrap; margin-bottom:9px; }
  .fc-badge{ padding:3px 12px; border-radius:var(--radius-full); font-size:var(--fs-3); font-weight:800; color:#fff; }
  .fc-badge.lv-done{ background:#6b82be; } .fc-badge.lv-ok{ background:#16a34a; }
  .fc-badge.lv-warn{ background:#f59e0b; } .fc-badge.lv-risk{ background:#dc2626; }
  .fc-badge.lv-none{ background:#94a3b8; }
  .fc-title{ font-size:var(--fs-6); font-weight:800; }
  .fc-msg{ font-size:var(--fs-4); font-weight:700; color:var(--text); }
  .fc-bar{ position:relative; height:15px; border-radius:var(--radius-md); background:var(--surface2); overflow:hidden; margin-bottom:14px; }
  .fc-bar-exp{ position:absolute; left:0; top:0; height:100%; border-radius:var(--radius-md); background:#d5ddee; }
  .fc-bar-done{ position:absolute; left:0; top:0; height:100%; border-radius:var(--radius-md); background:var(--primary); }
  .fc-bar-done.lv-risk{ background:#dc2626; } .fc-bar-done.lv-warn{ background:#f59e0b; }
  .fc-bar-done.lv-ok, .fc-bar-done.lv-done{ background:#16a34a; }
  .fc-sp-k{ display:inline-flex; align-items:center; }
  .fc-sp-p{ color:var(--primary); font-weight:800; min-width:38px; text-align:right; }
  .fc-split .sw{ display:inline-block; width:8px; height:8px; border-radius:var(--radius-xs); margin-right:5px; vertical-align:0; }
  .fc-split .sw.new{ background:#6b82be; } .fc-split .sw.renew{ background:#f59e0b; }
  .fc-note{ margin-top:8px; font-size:var(--fs-1); font-weight:700; color:var(--muted); }
  .forecast-band, .stats-strip, .stats-grid{ min-width:0; }
  #statsContent{ overflow-x:hidden; }
  .fc-m-value .bad{ color:#dc2626; } .fc-m-value .good{ color:#16a34a; }
  @media (max-height: 1200px){
    .fc-metric{ padding:7px 11px; }
    .fc-m-value{ font-size:17px; }
    .fc-bar{ height:13px; margin-bottom:12px; }
  }
  /* 상단 3장을 가로로 꽉 채우고 강조 */
  .stats-strip{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); align-items:stretch; gap:var(--sp-4); margin-bottom:12px; flex:none; }
  .strip-item.dim{ background:var(--surface2); }
  .strip-item.total{ border-color:var(--primary); border-width:2px; background:#eef2f9; }
  .strip-share-v{ font-size:20px; font-weight:800; color:var(--primary); line-height:1.1; font-variant-numeric:tabular-nums; }
  .strip-share-l{ font-size:var(--fs-1); font-weight:700; color:var(--muted); margin-top:1px; }
  .strip-item.total .strip-value{ color:var(--primary); }
  .sub-period{ display:inline-block; margin-left:6px; padding:1.5px 9px; border-radius:var(--radius-full);
    background:var(--primary); color:#fff; font-size:var(--fs-2); font-weight:800; vertical-align:1px; }
  .strip-note{ grid-column:1 / -1; align-self:center; font-size:var(--fs-3); color:var(--muted); line-height:1.5; }
  @media (max-height: 1200px){
    .strip-item{ padding:11px 16px; border-radius:var(--radius-lg); }
    .strip-value{ font-size:28px; }
  }
  .strip-tag.alt{ background:#ecfdf5; color:#047857; }
  .strip-tag.warn{ background:#fef3c7; color:#b45309; }
  .strip-note{ align-self:center; font-size:var(--fs-3); color:var(--muted); line-height:1.5; }
  .strip-period{ align-self:center; font-size:var(--fs-3); font-weight:800; color:var(--muted); padding-right:3px; }
  /* 등장 애니메이션 — 카드/스트립이 순차적으로 떠오른다 */
  @keyframes statIn{ from{ opacity:0; transform:translateY(9px); } to{ opacity:1; transform:none; } }
  #statsContent .stats-card, #statsContent .strip-item{ animation:statIn .42s cubic-bezier(.22,.61,.36,1) both; }
  #statsContent .strip-item:nth-child(2){ animation-delay:.04s; }
  #statsContent .strip-item:nth-child(3){ animation-delay:.08s; }
  #statsContent .strip-item:nth-child(4){ animation-delay:.12s; }
  .stats-grid > .stats-card:nth-child(2){ animation-delay:.05s; }
  .stats-grid > .stats-card:nth-child(3){ animation-delay:.10s; }
  .stats-grid > .stats-card:nth-child(4){ animation-delay:.15s; }
  .stats-grid > .stats-card:nth-child(5){ animation-delay:.20s; }
  .stats-grid > .stats-card:nth-child(n+6){ animation-delay:.25s; }
  html.no-motion #statsContent .stats-card, html.no-motion #statsContent .strip-item{ animation:none; }
  @media (prefers-reduced-motion: reduce){
    #statsContent .stats-card, #statsContent .strip-item{ animation:none; }
  }
  .pill-group.locked{ opacity:.45; pointer-events:none; }
  .gubun-lock-note{ font-size:var(--fs-1); color:var(--muted); margin-top:5px; line-height:1.45; }
  table.stat-table tr.peak-row td{ background:#eef2f9; }
  .prod-pill{ font-family:inherit; cursor:pointer; border:1.5px solid var(--border); background:var(--card); color:var(--text);
    border-radius:var(--radius-full); padding:7px 16px; font-size:var(--fs-5); font-weight:700; line-height:1.2; transition:.12s; }
  .prod-pill:hover{ border-color:var(--pc); color:var(--pc); }
  .prod-pill.active{ background:var(--pc); border-color:var(--pc); color:#fff; box-shadow:0 1px 4px rgba(15,23,42,.14); }
  .rank-no{ display:inline-block; min-width:19px; height:19px; line-height:19px; text-align:center; border-radius:var(--radius-sm);
    background:var(--surface2); color:var(--muted); font-size:var(--fs-1); font-weight:800; margin-right:7px; }
  .yoy{ font-weight:800; }
  .yoy.up{ color:#dc2626; }
  .yoy.down{ color:#6b82be; }
  .muted-cell{ color:var(--muted); font-weight:700; }
  .stats-card{ margin-bottom:0; display:flex; flex-direction:column; }
  .stats-card.wide{ grid-column:1 / -1; }
  .stats-body{ display:grid; grid-template-columns:minmax(0,240px) minmax(0,1fr); gap:var(--sp-5); align-items:start; }
  table.stat-table tr.row-zero td{ color:var(--muted); }
  .stats-card.wide .stats-body{ grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); }
  .stats-body .chart-wrap{ height:230px; }
  .stats-body .chart-wrap.pie{ height:215px; }
  .stats-table-wrap{ overflow-x:auto; max-height:260px; overflow-y:auto; }
  table.stat-table{ width:100%; border-collapse:collapse; font-size:var(--fs-5); font-variant-numeric:tabular-nums; }
  table.stat-table th{ text-align:left; font-size:var(--fs-4); color:var(--muted); font-weight:700; border-bottom:1px solid var(--border);
    padding:7px 8px; position:sticky; top:0; background:var(--card); white-space:nowrap; }
  table.stat-table td{ padding:7px 8px; border-bottom:1px solid var(--border-soft); white-space:nowrap; }
  table.stat-table td.num, table.stat-table th.num{ text-align:right; }
  table.stat-table tr:hover td{ background:var(--row-hover); }
  table.stat-table td.big{ font-weight:800; font-size:var(--fs-6); }
  table.stat-table td.pct{ font-weight:800; color:var(--primary); }
  table.stat-table tr.total-row td{ border-top:2px solid var(--border); border-bottom:none; font-weight:800; background:var(--surface2); }
  .stat-bar{ display:inline-block; height:8px; border-radius:var(--radius-sm); background:var(--primary); vertical-align:middle; margin-right:6px; }
  .stat-empty{ color:var(--muted); text-align:center; padding:26px 0; font-size:var(--fs-5); }
  @media (max-height: 1200px){
    /* FHD: 글자는 유지하고 차트 높이만 줄여 표가 잘리지 않게 한다 */
    .stats-body{ gap:var(--sp-4); grid-template-columns:minmax(0,215px) minmax(0,1fr); }
    .stats-body .chart-wrap{ height:196px; }
    .stats-body .chart-wrap.pie{ height:186px; }
    .stats-table-wrap{ max-height:220px; }
    .stats-card{ padding:12px 14px; }
    table.stat-table th{ padding:6px 7px; }
    table.stat-table td{ padding:6px 7px; }
  }

  /* 자동 메모 — 단계 역행/금액 변경 기록 */
  .auto-memo{ font-size:var(--fs-3); color:var(--muted); line-height:1.6; margin-bottom:6px; padding-left:2px; }
  .auto-memo div{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .has-auto-memo{ position:relative; }
  .has-auto-memo::after{ content:'변경'; display:inline-block; margin-left:6px; padding:1px 7px; border-radius:var(--radius-sm);
    background:#f59e0b; color:#fff; font-size:var(--fs-2); font-weight:800; vertical-align:1px; letter-spacing:-.02em; }
  .sales-cat-sel{ width:100%; max-width:96px; padding:2px 4px; border:1px solid transparent; border-radius:var(--radius-sm); background:transparent; font:inherit; font-size:var(--fs-4); color:var(--text); cursor:pointer; }
  .sales-cat-sel:hover{ border-color:var(--border); background:#fff; }
  .sales-cat-sel:focus{ outline:none; border-color:var(--primary); background:#fff; }
  .rt-annual, .rt-month, .tt-cell{ width:64px; border:1px solid var(--border); border-radius:var(--radius-sm); padding:4px 5px; font:inherit; font-size:var(--fs-4); text-align:right; background:#fff; }
  .rt-annual:focus, .rt-month:focus, .tt-cell:focus{ outline:none; border-color:var(--primary); }
  /* 월별 매출(완료 기준) 가시성 개선 — 지브라 제거, 선택월 컬럼 하이라이트, 달성률 색 구분, 0값 흐림, 그룹 구분선 */
  table.cross-table{ font-size:var(--fs-5); }
  table.cross-table td, table.cross-table th{ padding:9px 8px; font-variant-numeric:tabular-nums; }
  table.cross-table tbody tr:nth-child(even) td{ background:transparent; }
  table.cross-table tbody tr:hover td{ background:#eef2f9; }
  table.cross-table td.zero{ color:var(--faint); }
  table.cross-table td.cur-month, table.cross-table th.cur-month{ box-shadow:inset 0 0 0 999px rgba(76,100,166,.08); }
  table.cross-table tr.sep-top td{ border-top:2px solid var(--border); }
  /* 월별 달성률 배지도 같은 신호등 규칙 */
  table.cross-table td.pct-good{ background:#e6f3ef; color:var(--rate-100); font-weight:700; }
  table.cross-table td.pct-mid{ background:#fdf5e2; color:var(--rate-60); font-weight:700; }
  table.cross-table td.pct-bad{ background:#fdece6; color:var(--rate-0); font-weight:700; }
  /* 주간보고 카드 내부 탭 패널(당월 완료 예정/확인·정리, 완료/실주) 높이 채움 */
  .weekly-card .pipeline-tab-header{ flex:none; margin-bottom:10px; }
  .weekly-card .pipeline-tab-panel{ flex:1; min-height:0; display:flex; flex-direction:column; }
  .weekly-card .pipeline-tab-panel table{ flex:1; min-height:0; }
  .weekly-card .pipeline-tab-panel .note{ flex:none; }
  /* 보고서 미리보기·복사 모달 */
  .report-modal{ position:fixed; inset:0; z-index:600; background:rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; }
  .report-modal-box{ background:#fff; border-radius:var(--radius-lg); width:min(880px, 92vw); height:min(86vh, 900px); display:flex; flex-direction:column; box-shadow:var(--shadow-md); overflow:hidden; }
  .report-modal-head{ display:flex; align-items:center; justify-content:space-between; gap:var(--sp-4); padding:14px 18px; border-bottom:1px solid var(--border); flex:none; }
  .report-modal-head h3{ margin:0; font-size:17px; font-weight:700; }
  .report-modal-actions{ display:flex; align-items:center; gap:var(--sp-3); }
  .report-copy-status{ font-size:var(--fs-4); color:var(--positive); font-weight:700; margin-right:4px; }
  #reportText{ flex:1; min-height:0; overflow-y:auto; margin:0; padding:16px 18px; font-family:inherit; font-size:var(--fs-6); line-height:1.7; white-space:pre-wrap; outline:none; }
  .report-modal-note{ padding:8px 18px 14px; font-size:var(--fs-4); color:var(--muted); flex:none; border-top:1px solid var(--border-soft); }

  /* 주간보고(발표 모드) 탭 */
  /* 주간보고 탭은 무스크롤을 포기하고 세로 스크롤형으로 전환 — 표 하나당 최소 8행이 보이도록 고정 높이 */
  #weeklyContent{ overflow-y:auto; }
  .weekly-grid{ flex:none; display:grid; grid-template-columns:1fr; grid-template-rows:auto auto auto auto; grid-template-areas:"wtop" "wreg" "worder" "wbottom"; gap:var(--sp-4); align-content:start; }
  .weekly-top{ grid-area:wtop; display:grid; grid-template-columns:1fr 2.1fr; gap:var(--sp-4); align-items:stretch; min-width:0; }
  .weekly-grid table.review-table > tbody.scroll-y,
  .weekly-grid table.pipeline-table > tbody.scroll-y{
    flex:none;
    height:225px;
    min-height:225px;
    max-height:225px;
    overflow-y:auto;
  }
  .presenter-list{ grid-area:plist; position:sticky; top:0; align-self:start; max-height:calc(100vh - 128px); background:var(--card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:12px 10px; overflow-y:auto; display:flex; flex-direction:column; }
  .pl-title{ font-size:var(--fs-3); font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; margin:0 0 8px 4px; }
  .presenter-btns{ display:flex; flex-direction:column; gap:var(--sp-1); }
  .presenter-btn{ display:flex; align-items:center; gap:var(--sp-3); width:100%; text-align:left; background:none; border:none; border-radius:var(--radius-md); padding:9px 10px; font-size:var(--fs-6); font-weight:700; color:var(--text-secondary); cursor:pointer; }
  .presenter-btn:hover{ background:var(--surface2); }
  .presenter-btn.active{ background:var(--primary); color:#fff; }
  .presenter-btn .pl-check{ margin-left:auto; font-size:var(--fs-3); color:var(--positive); }
  .presenter-btn.active .pl-check{ color:#fff; }
  .pl-nav{ margin-top:auto; display:flex; gap:var(--sp-2); padding-top:10px; border-top:1px solid var(--border); }
  .pl-nav button{ flex:1; background:#fff; border:1px solid var(--border); border-radius:var(--radius-md); padding:8px 0; font-size:var(--fs-4); font-weight:700; color:var(--text); cursor:pointer; white-space:nowrap; }
  .pl-nav button:hover{ background:var(--surface2); }
  .pl-hint{ font-size:var(--fs-1); color:var(--faint); text-align:center; margin-top:6px; }
  .presenter-head{ background:var(--secondary); border-radius:var(--radius-xl); padding:16px 20px; display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:var(--sp-4); color:#fff; box-shadow:var(--shadow-sm); min-width:0; }
  .presenter-head .ph-name{ font-size:22px; font-weight:800; letter-spacing:-0.3px; }
  .presenter-head .ph-sub{ font-size:var(--fs-4); color:var(--secondary-light); }
  .presenter-head .ph-top{ display:flex; align-items:baseline; justify-content:space-between; gap:var(--sp-4); flex-wrap:wrap; }
  .presenter-head .ph-achieve-num{ display:flex; align-items:baseline; gap:var(--sp-4); font-size:42px; font-weight:800; letter-spacing:-1.5px; line-height:1; color:#fff; }
  .presenter-head .ph-achieve-num span{ font-size:var(--fs-4); font-weight:700; letter-spacing:0; color:var(--secondary-light); }
  .presenter-head .ph-achieve .progress-bar{ margin-top:10px; height:10px; background:rgba(255,255,255,.18); }
  .presenter-head .ph-achieve .progress-bar .fill.expected{ background:#ffffff; }
  .presenter-head .ph-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-3); }
  .presenter-head .ph-cell{ background:rgba(255,255,255,.08); border-radius:var(--radius-md); padding:9px 12px; min-width:0; }
  .presenter-head .ph-cell-label{ font-size:var(--fs-3); color:var(--secondary-light); margin-bottom:3px; white-space:nowrap; }
  .presenter-head .ph-cell-value{ font-size:18px; font-weight:800; color:#fff; white-space:nowrap; }
  .presenter-head .ph-counts{ display:flex; gap:var(--sp-3); flex-wrap:wrap; }
  .presenter-head .ph-counts span{ background:rgba(255,255,255,.08); border-radius:var(--radius-full); padding:4px 12px; font-size:var(--fs-3); color:var(--secondary-light); white-space:nowrap; }
  .presenter-head .ph-counts b{ color:#fff; font-weight:800; }
  .weekly-card{ margin-bottom:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
  .weekly-card h3{ flex:none; margin-bottom:10px; }
  .weekly-card table.review-table, .weekly-card table.pipeline-table{ flex:1; min-height:0; }
  #weeklyRegCard{ grid-area:wreg; }
  #weeklyOrderCard{ grid-area:worder; }
  .weekly-bottom{ grid-area:wbottom; display:grid; grid-template-columns:1fr; gap:var(--sp-4); }
