:root {
  --bg: #f5f6fa; --panel: #fff; --line: #e6e8ef; --text: #1d2233; --muted: #8a90a2;
  --accent: #6d5ce8; --fw: #8b7cf0; --fw-soft: #efecfe; --es: #4aa8d8; --es-soft: #e9f5fb;
  --bad: #e5484d; --warn: #e8890c; --ok: #2f9e6e; --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Segoe UI', sans-serif;
  color: var(--text); background: var(--bg); font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.loading { padding: 80px; text-align: center; color: var(--muted); }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 12px 24px 0; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; }
.top h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.top h1 span { font-size: 12px; font-weight: 700; color: #fff; background: #e6a100; border-radius: 6px; padding: 2px 7px; vertical-align: 3px; }
.top h1 .brand { cursor: default; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cutoff { margin: 3px 0 10px; color: var(--muted); font-size: 12px; }
.warn-text { color: var(--warn); }
.tabs { display: flex; gap: 2px; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--accent); border-color: var(--accent); }
main { padding: 16px 24px 60px; max-width: 1600px; margin: 0 auto; }

/* 필터 */
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 11px; color: var(--muted); font-weight: 600; }
.field.grow { flex: 1; min-width: 180px; }
select, input[type=search] { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; height: 32px; }
input[type=search] { width: 100%; }
.seg { display: inline-flex; background: #f0f1f6; border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; cursor: pointer; color: #555b6e; font-size: 13px; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--accent); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:hover:not(.on) { color: var(--text); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 4px 0 2px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); }
.kpi.bad .kpi-value { color: var(--bad); }
.kpi.warn .kpi-value { color: var(--warn); }

/* 패널 */
.view { display: flex; flex-direction: column; gap: 14px; }
.view.narrow { max-width: 760px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel h3, .drawer h3 { margin: 0 0 8px; font-size: 14px; }
.desc { margin: -4px 0 10px; color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); }

/* 차트 */
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #eef0f5; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .axis.sub { font-size: 9.5px; }
.chart .val { fill: var(--text); font-size: 11px; font-weight: 700; }
.chart .line { fill: none; stroke: #f0a35e; stroke-width: 2; }
.chart .dot { fill: #fff; stroke: #f0a35e; stroke-width: 2; }
.chart .line-axis { fill: #f0a35e; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #555b6e; margin-top: 4px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend i.line-key { height: 3px; background: #f0a35e; vertical-align: 3px; }
.stack { margin: 6px 0 10px; }
.stack-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #f0f1f6; }
.stack-bar span { min-width: 2px; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 7px; color: #555b6e; }
.stack-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.stack-legend em { color: var(--muted); font-style: normal; }

/* 순위 목록 */
.rank { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rank li { counter-increment: r; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 4px; border-top: 1px solid #f1f2f6; cursor: pointer; border-radius: 6px; }
.rank li:hover { background: #f7f7fb; }
.rank li::before { content: counter(r); width: 20px; color: var(--muted); font-size: 12px; font-weight: 700; }
.rank .name { flex: 1; font-weight: 600; }
.rank .name small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 11px; }
.rank .val { font-weight: 700; font-size: 13px; white-space: nowrap; }
.val.bad, .lv.bad { color: var(--bad); }
.val.warn, .lv.warn { color: var(--warn); }
.lv.ok { color: var(--ok); }

/* 표 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; }
.btn.primary { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 230px); }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.data th { position: sticky; top: 0; background: #f8f9fc; z-index: 2; font-size: 12px; color: #4a5064; font-weight: 700;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
table.data .group-row th { text-align: center; font-size: 12.5px; border-bottom: 1px solid var(--line); }
table.data .group-row + tr th { top: 33px; }
table.data .group-row th small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
table.data th.g-fw, table.data th.fw { background: var(--fw-soft); }
table.data th.g-es, table.data th.es { background: var(--es-soft); }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th .arrow { color: #b8bccb; margin-left: 4px; font-size: 10px; }
table.data th.active .arrow { color: var(--accent); }
table.data td { padding: 7px 10px; border-bottom: 1px solid #f0f1f5; white-space: nowrap; }
table.data tr.clickable { cursor: pointer; }
table.data tbody tr:hover td { background: #fafaff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.strong { font-weight: 700; }
.small { font-size: 12px; }
.sticky { position: sticky; left: 0; background: #fff; z-index: 1; }
th.sticky { z-index: 3; background: #f8f9fc; }
.store { display: flex; flex-direction: column; font-weight: 700; }
.store small { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.badge.branded { background: #e8f0fe; color: #3563c9; margin: 0; }
.badge.unbranded { background: #eaf7ef; color: #2b8a55; margin: 0; }
.badge.new { background: #e5484d; color: #fff; font-size: 9.5px; vertical-align: 2px; }
.badge.lob { background: #f0f1f6; color: #555b6e; margin: 0 3px 0 0; }
.barcell { position: relative; min-width: 110px; height: 22px; border-radius: 5px; background: #f3f4f8; overflow: hidden; }
.barcell .bar { position: absolute; inset: 0 auto 0 0; background: #c9c1fa; border-radius: 5px; }
.barcell.es .bar { background: #b8e0f2; }
.barcell.es.bad .bar { background: #f7c4c5; }
.barcell.es.warn .bar { background: #f8dcb0; }
.barcell b { position: relative; display: block; text-align: right; padding: 0 8px; line-height: 22px; font-variant-numeric: tabular-nums; }
.trend { font-weight: 700; font-size: 12px; }
.trend.up { color: var(--ok); } .trend.down { color: var(--warn); } .trend.down.big { color: var(--bad); } .trend.flat { color: var(--muted); }

/* 주차별 히트맵 */
.week-totals { display: flex; gap: 8px; flex-wrap: wrap; }
.week-totals div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; display: flex; flex-direction: column; min-width: 70px; }
.week-totals small { color: var(--muted); font-size: 11px; }
.week-totals b { font-size: 17px; }
td.heatcol { padding: 3px 4px; }
.heat { display: block; min-width: 46px; text-align: center; border-radius: 6px; padding: 5px 0; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(74, 168, 216, var(--a, 0)); }
.heat.off { background: repeating-linear-gradient(45deg, #f6f6f9, #f6f6f9 4px, #fff 4px, #fff 8px); color: #ccc; }
.heat.hit { background: #d5f2e3; color: #1f7a4d; }
.heat.mid { background: #fdefd3; color: #a86400; }
.heat.low { background: #fde0e0; color: #c03036; }
.heat.partial { background: #f0f1f6; color: #555b6e; }
.heat.zero { background: #fff3f3; color: #e5a0a2; }

/* 매장 상세 창 */
.drawer-bg { position: fixed; inset: 0; background: rgba(20, 22, 35, .35); z-index: 50; display: flex; justify-content: flex-end; }
.drawer { width: min(720px, 100%); height: 100%; background: var(--bg); overflow: auto; padding: 18px 20px 40px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: -8px 0 30px rgba(0,0,0,.12); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: .5; } }
.drawer header { display: flex; justify-content: space-between; gap: 12px; }
.drawer h2 { margin: 0; font-size: 20px; }
.drawer header p { margin: 4px 0 0; font-size: 12px; }
.drawer section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.close { border: 0; background: #e9eaf0; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; flex: none; }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.mini small { color: var(--muted); font-size: 11px; }
.mini b { font-size: 17px; }
.mini.bad b { color: var(--bad); } .mini.warn b { color: var(--warn); } .mini.ok b { color: var(--ok); }
table.log { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.log th { text-align: left; color: var(--muted); font-weight: 600; padding: 5px 6px; border-bottom: 1px solid var(--line); }
table.log td { padding: 6px; border-bottom: 1px solid #f1f2f6; }

/* 업로드 */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 16px; border: 2px dashed #cfd2de; border-radius: 12px; cursor: pointer; text-align: center; color: #555b6e; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: #f6f4ff; }
.dropzone span { font-size: 12px; color: var(--muted); }
.upload-status { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.help { color: #555b6e; font-size: 12.5px; padding-left: 18px; line-height: 1.8; }
code { background: #f0f1f6; padding: 1px 6px; border-radius: 5px; font-size: 12px; }

@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(3, 1fr); } .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) {
  .top, main { padding-left: 12px; padding-right: 12px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .tabs { width: 100%; overflow-x: auto; }
  .mini-kpis { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { max-height: none; }
}

/* Corporate reporting theme */
:root { --bg:#f3f5f7; --panel:#fff; --text:#192b40; --muted:#68788a; --line:#dfe5eb; --accent:#233f60; --es:#274c70; --es-soft:#edf3f8; --fw:#358b95; --fw-soft:#eaf5f4; --bad:#bb4853; --warn:#a8731f; --ok:#287d66; --radius:10px; }
body { line-height:1.5; }
button { transition:background .15s,color .15s; }
button:focus-visible, input:focus-visible, select:focus-visible { outline:3px solid #dcad35; outline-offset:3px; }
.top { position:relative; background:#172b43; color:white; padding:26px max(28px, calc((100vw - 1440px)/2)) 0; border:0; align-items:end; gap:12px 30px; }
.brandline { display:flex; gap:14px; align-items:center; margin-bottom:16px; }
.brand { border:0; border-radius:4px; background:#f6bd20; color:#1d2b3b; padding:3px 11px 5px; font-size:21px; font-weight:900; letter-spacing:-1.5px; line-height:1.2; cursor:pointer; touch-action:manipulation; user-select:none; }
.brand-caption { font-size:10px; letter-spacing:2.3px; color:#b6c5d5; font-weight:600; }
.top h1 { font-size:29px; font-weight:650; letter-spacing:-.8px; }
.top h1 .title-suffix { background:none; padding:0; margin-left:12px; font-size:19px; font-weight:400; color:#d4dfe9; vertical-align:2px; letter-spacing:-.5px; }
.cutoff { color:#a8bacd; margin:8px 0 22px; font-size:12px; }
.tabs { gap:6px; }
.tabs button { color:#acbdcf; padding:16px 19px; font-size:13px; border-bottom:3px solid transparent; }
.tabs button:hover { color:white; background:#ffffff08; }
.tabs button.on { color:#ffce49; border-color:#ffce49; }
main { max-width:1496px; padding:30px 28px 36px; }
.report-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:24px; }
.eyebrow { margin:0 0 7px; font-size:10px; font-weight:750; letter-spacing:1.8px; color:#697c90; }
.report-heading h2 { font-size:25px; letter-spacing:-.8px; margin:0; }
.report-description { color:var(--muted); font-size:12px; margin:7px 0 0; }
.report-period { padding-left:22px; border-left:2px solid #ddb23f; display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
.report-period span { font-size:11px; color:var(--muted); }
.report-period strong { font-size:15px; }
.filters { gap:14px 20px; padding:18px 20px; margin-bottom:22px; border-radius:8px; box-shadow:0 2px 4px #172b4303; }
.field { gap:6px; }
.field > span { color:#526579; font-size:11px; }
select, input[type=search] { height:36px; border-radius:5px; font-size:12px; }
.seg { background:#f0f3f6; border-radius:5px; padding:3px; }
.seg button { font-size:12px; padding:5px 10px; border-radius:3px; }
.seg button.on { color:#fff; background:#263f5c; box-shadow:none; }
.view { gap:18px; }
.insight-strip { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center; padding:16px 20px; background:#eaf0f5; border-left:3px solid #2d5273; border-radius:0 7px 7px 0; }
.insight-tag { color:#3e5b76; font-weight:800; letter-spacing:1.2px; font-size:10px; }
.insight-strip p { margin:0; font-weight:650; font-size:13px; }
.insight-note { font-size:12px; color:#617487; margin-left:auto; }
.section-label { display:flex; align-items:center; gap:10px; color:#2a415a; font-size:13px; font-weight:750; margin-top:9px; }
.section-label span { font-size:10px; letter-spacing:.6px; color:#8292a3; }
.kpis { gap:12px; margin-bottom:0; }
.kpi { padding:20px 18px 17px; border-top:3px solid #c1cedb; border-radius:7px; box-shadow:0 3px 10px #172b4303; }
.kpi:nth-child(4) { border-top-color:var(--fw); }
.kpi:nth-child(5) { border-top-color:var(--es); }
.kpi.bad { border-top-color:#bb4853; }
.kpi.warn { border-top-color:#d0a34d; }
.kpi-label { font-size:12px; color:#5c6e80; }
.kpi-value { font-size:34px; line-height:1.25; letter-spacing:-1.2px; font-weight:700; font-variant-numeric:tabular-nums; margin:12px 0 9px; }
.kpi-sub { font-size:11px; line-height:1.65; }
.grid2,.grid3 { gap:18px; }
.panel { padding:23px 24px; box-shadow:0 3px 10px #172b4303; }
.panel h3 { font-size:14px; margin-bottom:19px; letter-spacing:-.2px; }
.desc { line-height:1.7; }
.chart .grid { stroke:#e9eef2; stroke-dasharray:3 4; }
.chart .line,.chart .dot { stroke:#c99b39; }
.chart .line-axis { fill:#a97d22; }
.legend { border-top:1px solid #edf0f3; padding-top:12px; margin-top:12px; font-size:11px; }
.legend i.line-key { background:#c99b39; }
.stack-bar { height:19px; border-radius:4px; gap:2px; }
.stack-legend { gap:10px 22px; margin:16px 0; }
.stack-legend > span { display:flex; align-items:center; gap:5px; }
.stack-legend em { margin-left:3px; }
.rank li { border-radius:0; padding:11px 0; border-color:#edf1f4; }
.rank .name { font-size:12px; }
.rank .name small { display:block; margin-left:0; margin-top:2px; font-size:10px; }
.rank .val { font-size:12px; }
.rank li:hover { background:#f2f6f9; }
.toolbar { padding:4px 0 8px; }
.btn { border-radius:5px; padding:9px 15px; font-size:12px; }
.btn.primary { background:#263f5c; border-color:#263f5c; }
table.data th { background:#edf2f6; padding:10px; }
table.data .group-row + tr th { top:56px; }
table.data td { padding:10px; }
table.data tbody tr:nth-child(even) td { background-color:#f8fafc; }
table.data tbody tr:hover td { background:#eef4f8; }
.barcell .bar { background:#b6d9dc; }
.barcell.es .bar { background:#c1d4e5; }
.week-totals { gap:10px; }
.week-totals div { flex:1; padding:12px 16px; border-radius:6px; }
.week-totals b { font-size:23px; margin-top:4px; }
.report-footer { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:36px; padding-top:18px; border-top:1px solid #dce3ea; color:#78899b; font-size:10px; letter-spacing:.8px; }
.report-footer span { letter-spacing:0; }
@media(min-width:1201px) { .kpis { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:1200px) { .kpis { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:800px) { .top { padding:22px 20px 0; } main { padding:24px 18px; } .top h1 { font-size:26px; } .cutoff { margin-bottom:8px; } .tabs { margin-top:6px; } .tabs button { padding:13px 15px; } .report-heading h2 { font-size:22px; } .report-period { padding-left:12px; } .report-period strong { font-size:12px; } .kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .kpi-value { font-size:30px; } .panel { padding:20px; } .insight-note { margin-left:0; width:100%; } .filters { gap:12px; padding:16px; } .grid2,.grid3 { grid-template-columns:1fr; } }
@media(max-width:480px) { .brand-caption { font-size:9px; letter-spacing:1.4px; } .report-heading { align-items:flex-start; flex-direction:column; gap:13px; } .report-period { flex-direction:row; align-items:center; gap:10px; } .report-description { font-size:11px; } .kpi { padding:16px 13px; } .kpi-label { font-size:11px; } .kpi-sub { font-size:10px; } .field { max-width:100%; } .seg { max-width:100%; flex-wrap:wrap; } .seg button { padding:5px 8px; } .top h1 .title-suffix { font-size:17px; } }
@media print { :root { --bg:white; } .top { background:white; color:#172b43; padding:0 0 14px; border-bottom:2px solid #172b43; } .top h1 .title-suffix,.cutoff,.brand-caption { color:#526579; } .tabs,.filters,.btn,.drawer-bg { display:none!important; } main { padding:20px 0; } .kpis { grid-template-columns:repeat(3,1fr); } .grid2 { grid-template-columns:1fr 1fr; } .grid3 { grid-template-columns:1fr; } .panel,.kpi { break-inside:avoid; box-shadow:none; } .table-wrap { max-height:none; overflow:visible; } body { print-color-adjust:exact; -webkit-print-color-adjust:exact; } }

/* Supplied A STORE logo, preserving the seven-tap data control. */
.brand.brand-image { display:flex; align-items:center; justify-content:center; padding:6px 10px; background:#fff; border-radius:5px; line-height:0; letter-spacing:normal; }
.brand-image img { display:block; width:116px; height:auto; max-width:100%; }
.top .brandline { margin-bottom:14px; }
@media(max-width:480px) { .brand-image img { width:100px; } }

/* White logo artwork directly on the navy header. */
.brand.brand-image { background:transparent; border-radius:0; padding:0; mix-blend-mode:screen; }
.brand-image img { filter:invert(1); }
@media print { .brand.brand-image { mix-blend-mode:normal; } .brand-image img { filter:none; } }

/* 직원·매장 정보 */
dl.info { display:grid; grid-template-columns:110px 1fr; gap:6px 12px; margin:0; font-size:13px; }
dl.info dt { color:var(--muted); }
dl.info dd { margin:0; }
table.log tr.inactive td { color:#a3adb8; }
.badge.on { background:#e5f3ee; color:var(--ok); margin:0; }
.badge.off { background:#f7e9ea; color:var(--bad); margin:0; }
.total-line { margin:12px 0 0; }

/* 매장 정보 열 드래그 */
table.data th.draggable { touch-action: none; cursor: grab; }
table.data th.draggable .grip { color: #b8bccb; font-size: 10px; letter-spacing: -2px; margin-right: 5px; }
table.data th.dragging { opacity: .45; cursor: grabbing; }
table.data th.drop-before { box-shadow: inset 3px 0 0 var(--accent); }
table.data th.drop-after { box-shadow: inset -3px 0 0 var(--accent); }
.toolbar-actions { display: flex; gap: 8px; }

/* 스태프 리스트 */
.staff-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.kpi-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.staff-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.staff-card h3 { margin: 0; }
.staff-card header small { font-size: 11px; }
.staff-count b { font-size: 18px; }
.staff-count small { color: var(--muted); font-size: 12px; }
.staff-meta { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.staff-table { width: 100%; font-size: 13px; }
.staff-table td.email { word-break: break-all; }
@media (max-width: 520px) { .staff-grid { grid-template-columns: 1fr; } }

/* 스태프 리스트: 매장 이름 목록 */
.store-list { display: flex; flex-direction: column; gap: 12px; }
.store-list h3 small { font-weight: 500; font-size: 12px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.store-chip { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: inherit; }
.store-chip:hover { border-color: var(--accent); color: var(--accent); }

/* 스태프 리스트: 직원 목록 바로 수정 */
.cell-input, .cell-select { font: inherit; font-size: 13px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; color: inherit; }
.cell-input { width: 100%; min-width: 120px; }
.cell-input:hover, .cell-select:hover { border-color: var(--line); background: #fff; }
.cell-input:focus, .cell-select:focus { border-color: var(--accent); background: #fff; outline: none; }
.cell-select.on { color: #1f7a4d; font-weight: 700; }
.cell-select.off { color: var(--bad); font-weight: 700; }
.cell-input.saved, .cell-select.saved { animation: saved-flash 1.2s ease; }
.cell-input.failed, .cell-select.failed { border-color: var(--bad); }
@keyframes saved-flash { 0% { background: #d9f2e3; } 100% { background: transparent; } }

/* 스태프 리스트: 삭제 모드 */
.trainer-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.del-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; background: #e5484d; color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; line-height: 24px; padding: 0; }
.del-btn:hover { background: #c73a3f; }
.del-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fdecec; color: #b42318; border: 1px solid #f5c2c0; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.store-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.store-link:hover { color: var(--accent); text-decoration: underline; }
.staff-count { white-space: nowrap; font-size: 13px; }

/* 위쪽 검은 머리글(로고·기준일·탭)은 고정, 아래 내용만 스크롤 */
.top { position: sticky; top: 0; z-index: 30; }
/* 표는 자기 안에서 스크롤 → 표 머리글이 고정 머리글 밑에 가려지지 않게 */
.table-wrap { max-height: calc(100vh - var(--top-h, 200px) - 24px); max-height: calc(100dvh - var(--top-h, 200px) - 24px); }
@media print { .top { position: static; } .table-wrap { max-height: none; } }
