/* 매장 매출 관리 — PC(왼쪽 메뉴) / 휴대폰(☰ 메뉴 + 아래 탭) 겸용 */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --sub: #64748b;
  --line: #e8ecf3;
  --line-2: #f1f4f9;
  --brand: #4f46e5;          /* 인디고 */
  --brand-2: #2563eb;        /* 파랑 */
  --brand-soft: #eef2ff;
  --side: #0b1220;
  --side-2: #111a2e;
  --side-ink: #a5b0c6;
  --up: #e11d48;             /* 늘었다 (빨강) */
  --up-soft: #fff1f3;
  --down: #2563eb;           /* 줄었다 (파랑) */
  --down-soft: #eff5ff;
  --ok: #059669; --ok-soft: #ecfdf5;
  --warn: #b45309; --warn-soft: #fffbeb;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-lg: 0 10px 30px rgba(79, 70, 229, .25);
  --radius: 16px;
  --side-w: 248px;
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; letter-spacing: -.01em;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .85em; color: var(--ink-2);
  background: var(--line-2); padding: 2px 6px; border-radius: 6px; }
svg.i { flex: none; vertical-align: middle; }
.num, .n { font-variant-numeric: tabular-nums; }

/* ---------- 왼쪽 메뉴 ---------- */
.side {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 30;
  background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink);
  display: flex; flex-direction: column;
}
.side .brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; color: #fff; }
.side .brand .mark { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 6px 14px rgba(47, 160, 210, .35)); }
.side nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; scrollbar-width: thin; scrollbar-color: #253048 transparent; }
.side nav a {
  display: flex; gap: 11px; align-items: center; padding: 9px 12px; margin: 1px 0; border-radius: 10px;
  text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--side-ink); transition: background .15s, color .15s;
}
.side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side nav a.on { background: linear-gradient(90deg, rgba(99, 102, 241, .95), rgba(59, 130, 246, .9)); color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }
.side-back { margin: 2px 0 10px; padding: 10px; border-radius: 12px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3); }
.side-back button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border: 0; border-radius: 9px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6); color: #fff; font-family: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.side-back button:hover { filter: brightness(1.08); }
.side-viewing { margin-top: 7px; font-size: .78rem; color: #8fd8ea; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side nav .group { font-size: .72rem; color: #5d6a85; padding: 18px 12px 6px; font-weight: 700; letter-spacing: .06em; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid rgba(255, 255, 255, .06); }
.side .me .name { color: #fff; font-size: .9rem; font-weight: 600; }
.side .me .role { font-size: .78rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #818cf8, #60a5fa); color: #fff; font-weight: 800; font-size: .9rem; }

.wm { display: block; font-weight: 900; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1.05; }
.wm .r { color: #fff; }
.wm .p { background: linear-gradient(90deg, #38b6e0, #6ee7c8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side .brand .ko, .lg-logo .ko { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: #8ea2c8; margin-top: 3px; }
.lg-logo .wm { font-size: 1.4rem; }
.lg-logo .ko { font-size: .8rem; }

/* ---------- 위쪽 줄 ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: 60px; margin-left: var(--side-w); padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(244, 246, 251, .82); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(232, 236, 243, .7);
}
.top .title { font-weight: 700; font-size: 1rem; color: var(--ink-2); }
.top .right { display: flex; align-items: center; gap: 12px; }
.top .who { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-2); font-weight: 600; }
.top .who .avatar { width: 30px; height: 30px; font-size: .8rem; }
.top .burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--ink); }
main { margin-left: var(--side-w); padding: 24px 28px 48px; max-width: 1480px; }
.tabs, .scrim { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
h1.page { font-size: 1.6rem; font-weight: 800; margin: 4px 0 18px; letter-spacing: -.03em; }
.page-head h1.page { margin: 0; }
.page-head .sub { color: var(--sub); font-size: .92rem; margin-top: 2px; }

/* ---------- 카드 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
  border: 1px solid rgba(232, 236, 243, .6); }
.card h2 { font-size: 1rem; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.card h2 .i { color: var(--brand); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

/* 숫자 칸 */
.kpi { position: relative; overflow: hidden; }
.kpi .k { color: var(--sub); font-size: .86rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .v { font-size: 1.85rem; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .95rem; font-weight: 600; color: var(--sub); margin-left: 2px; }
.kpi .s { font-size: .86rem; margin-top: 6px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.chip { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.chip.indigo { background: var(--brand-soft); color: var(--brand); }
.chip.green { background: var(--ok-soft); color: var(--ok); }
.chip.amber { background: var(--warn-soft); color: var(--warn); }
.chip.rose { background: var(--up-soft); color: var(--up); }
.chip.sky { background: var(--down-soft); color: var(--down); }
.kpi .chip { position: absolute; right: 18px; top: 18px; }

.hero { background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 60%, #06b6d4 130%); color: #fff; box-shadow: var(--shadow-lg); border: 0; }
.hero .k, .hero .s, .hero .v small { color: rgba(255, 255, 255, .82); }
.hero .v { font-size: 2.4rem; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pill.up { background: var(--up-soft); color: var(--up); }
.pill.down { background: var(--down-soft); color: var(--down); }
.pill.same { background: var(--line-2); color: var(--sub); }
.hero .pill { background: rgba(255, 255, 255, .2); color: #fff; }
.up { color: var(--up); font-weight: 700; } .down { color: var(--down); font-weight: 700; }
.muted { color: var(--sub); font-size: .88rem; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: .88rem; font-weight: 600;
  text-decoration: none; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.btn:hover { background: #f8fafc; border-color: #d7deea; }
.btn.primary { background: linear-gradient(135deg, #4f46e5, #3b82f6); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .3); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--up); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.big { width: 100%; padding: 14px; font-size: 1.05rem; border-radius: 12px; }

/* 알림 */
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--ok-soft); color: #065f46; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px; word-break: keep-all; font-size: .92rem; border: 1px solid #d1fae5; }
.notice.warn, .alert { background: var(--warn-soft); color: #92400e; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: .92rem; }

/* 바로가기 */
.quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; border-radius: 14px;
  text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--ink-2); background: #fafbff; border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.quick a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.quick a .chip { width: 42px; height: 42px; border-radius: 12px; }

/* ---------- 조회 조건 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; }
.filters select, .filters input[type=date], .filters input[type=text] {
  font-size: .9rem; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit;
  color: var(--ink); height: 38px; }
.filters select:focus, .filters input:focus, .form input:focus, .form select:focus, .field input:focus {
  outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.seg { display: inline-flex; background: var(--line-2); padding: 3px; border-radius: 11px; gap: 2px; flex-wrap: wrap; }
.seg a { padding: 6px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--sub); text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.filters .range { display: inline-flex; align-items: center; gap: 6px; }
.filters .sp { flex: 1; }
.search { position: relative; }
.search .i { position: absolute; left: 10px; top: 10px; color: var(--sub); }
.search input { padding-left: 32px !important; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.t th { text-align: left; font-weight: 600; color: var(--sub); font-size: .8rem; padding: 10px 12px;
  background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th:first-child { border-top-left-radius: 10px; } table.t th:last-child { border-top-right-radius: 10px; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
table.t td b { color: var(--ink); }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.total td { font-weight: 800; color: var(--ink); background: #f8fafc; border-top: 1px solid var(--line); }
table.t tr.weekend td:first-child, table.t tr.weekend td:nth-child(2) { color: var(--up); }
table.t tr.click { cursor: pointer; }
table.t tbody tr:hover td, table.t tr.click:hover td { background: #fafbff; }
table.t td.neg { color: var(--up); }
.rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--line-2);
  font-size: .75rem; font-weight: 800; color: var(--sub); margin-right: 8px; }
.rank.hi { background: var(--brand-soft); color: var(--brand); }
.cellbar { display: flex; align-items: center; min-width: 120px; }
.cellbar .track { flex: 1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.cellbar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #818cf8, #3b82f6); }

/* 가로 막대 (시간대 등) */
.bars .row { display: grid; grid-template-columns: 3.4em 1fr 7.5em; align-items: center; gap: 10px; padding: 4px 0; font-size: .86rem; color: var(--sub); }
.bars .track { background: var(--line-2); border-radius: 99px; height: 12px; overflow: hidden; }
.bars .fill { background: linear-gradient(90deg, #818cf8, #3b82f6); height: 100%; border-radius: 99px; }
.bars .row.peak .fill { background: linear-gradient(90deg, #6366f1, #06b6d4); }
.bars .amt { text-align: right; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 결제수단 비율 띠 */
.stack { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin: 4px 0 16px; }
.stack span { height: 100%; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 1px; }
.c1 { background: #6366f1; } .c2 { background: #10b981; } .c3 { background: #f59e0b; } .c4 { background: #94a3b8; } .c5 { background: #e11d48; }

/* ---------- 가맹점 조회 ---------- */
.search-box { background: linear-gradient(180deg, #fbfcff, #f6f8ff); border-color: #e0e7ff; }
.sgrid { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr; gap: 10px 14px; align-items: center; }
.sgrid label { font-size: .84rem; font-weight: 700; color: #4f46e5; white-space: nowrap; }
.sgrid input, .sgrid select { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: .9rem; font-family: inherit; color: var(--ink); }
.sgrid > * { min-width: 0; }
.sgrid .range { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sgrid .range input { flex: 1; min-width: 9.6em; padding: 0 8px; }
.sgrid input:focus, .sgrid select:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.btn.xls { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.btn.xls:hover { background: #d1fae5; }
.store-table th { font-size: .76rem; line-height: 1.25; }
.store-table th, .store-table td { padding: 10px 8px; }
.store-table td { font-size: .86rem; white-space: nowrap; }
.store-table td.wrap { white-space: normal; word-break: keep-all; min-width: 8.5em; max-width: 11em; }
.store-table td.addr { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.store-table tr.dim td { color: #94a3b8; }
.code-link { color: var(--brand); font-weight: 800; text-decoration: none; }
.code-link:hover { text-decoration: underline; }
.name-link { color: var(--ink); font-weight: 800; text-decoration: none; border-bottom: 1px dashed #a5b4fc; }
.name-link:hover { color: var(--brand); border-bottom-style: solid; }
select.status { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); font-family: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
select.status.st-정상 { color: var(--ok); background: var(--ok-soft); border-color: #a7f3d0; }
select.status.st-정지 { color: var(--warn); background: var(--warn-soft); border-color: #fde68a; }
select.status.st-해지 { color: var(--up); background: var(--up-soft); border-color: #fecdd3; }
.login-btn { color: var(--brand); border-color: #c7d2fe; background: #eef2ff; padding: 6px 12px; }
.login-btn:hover { background: #e0e7ff; }
.login-btn[disabled] { opacity: .4; cursor: not-allowed; }
.copy-btn { color: #fff; background: linear-gradient(135deg, #4f46e5, #2563eb); border: 0; padding: 10px 16px; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.pager a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hidden-form { display: none; }
code.bc { font-size: .88rem; font-weight: 700; color: var(--ink); background: #eef2ff; }
.nowrap { white-space: nowrap; }
.show-m { display: none !important; }
.viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px;
  border-radius: 14px; color: #fff; background: linear-gradient(135deg, #1e1b4b, #1e3a8a 60%, #0e7490); box-shadow: 0 8px 22px rgba(30, 58, 138, .25); }
.viewbar > span { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.viewbar .vb-code { font-size: .78rem; background: rgba(255, 255, 255, .16); padding: 2px 8px; border-radius: 99px; }
.viewbar form { margin: 0; }

/* 등록 화면 */
.store-form { max-width: 880px; }
.req { color: var(--up); font-weight: 800; }
.field-err { color: var(--up); font-size: .8rem; font-weight: 600; margin-top: 5px; }
.form .bad input, .form .bad select { border-color: #fda4af; background: #fff7f8; }
.form-actions { margin: 4px 0 0; }
.btn.big-w { padding: 11px 28px; font-size: .98rem; }

/* 유형별로 보이는 칸 (본사 = 프렌차이즈) */
.store-form .t-hq, .store-form .t-hq-block, .store-form .only-member { display: none; }
.store-form[data-kind="프렌차이즈"] .t-hq { display: inline; }
.store-form[data-kind="프렌차이즈"] .t-hq-block { display: block; }
.store-form[data-kind="프렌차이즈"] .t-store, .store-form[data-kind="프렌차이즈"] .t-store-block, .store-form[data-kind="프렌차이즈"] .only-store { display: none; }
.store-form[data-kind="프렌차이즈가맹점"] .only-member { display: block; }
.kind-sub { display: block; font-size: .75rem; color: var(--sub); margin-top: 2px; }

/* ---------- 매장 고르기 (변경 창) ---------- */
.store-pick { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.store-pick .sp-label { font-size: .82rem; font-weight: 700; color: var(--sub); }
.store-pick .sp-name { font-size: 1.05rem; font-weight: 900; max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #0b1220; background: #c6ff1a; padding: 4px 12px; border-radius: 8px; box-shadow: 0 0 0 2px #a3e600 inset, 0 4px 14px rgba(163, 230, 0, .45); }
.store-pick .sp-btn { padding: 5px 12px; font-size: .84rem; color: var(--brand); border-color: #c7d2fe; background: #eef2ff; }
dialog.picker { width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 64px)); border: 0; border-radius: 18px; padding: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .3); display: none; flex-direction: column; gap: 12px; }
dialog.picker[open] { display: flex; }
dialog.picker::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.pk-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.search input#storePickerQ, .search input#storeQ { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px 0 34px;
  font-size: .95rem; font-family: inherit; }
.search input#storePickerQ:focus, .search input#storeQ:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.search .i { top: 14px; }
.pk-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 60px; }
.pk-list.inline { max-height: 260px; max-width: 460px; margin-top: 6px; min-height: 0; }
.pk-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: 10px; background: #fff; cursor: pointer; font-family: inherit; }
.pk-item b { font-size: .95rem; color: var(--ink); }
.pk-item span { font-size: .78rem; color: var(--sub); }
.pk-item:hover { background: var(--brand-soft); border-color: #c7d2fe; }
.pk-item.on { border-color: var(--brand); background: var(--brand-soft); }
.pk-foot { font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand); font-weight: 700; font-size: .86rem; }
.chip-tag button { border: 0; background: rgba(79, 70, 229, .12); color: var(--brand); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: .7rem; }
.chip-tag button:hover { background: var(--brand); color: #fff; }

/* ---------- 사용자 관리 ---------- */
.user-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.user-filter .search { flex: 0 1 340px; }
.user-filter .search input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px 0 34px; font-size: .93rem; font-family: inherit; background: #fff; }
.user-filter select { height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; font-size: .93rem; font-family: inherit; background: #fff; min-width: 170px; }
.user-filter .search .i { top: 13px; }
.user-page { max-width: 820px; }
dl.info { display: grid; grid-template-columns: 8em 1fr; gap: 12px 16px; margin: 0; font-size: .95rem; }
dl.info dt { color: var(--sub); }
dl.info dd { margin: 0; color: var(--ink); }
.op-list { display: flex; flex-direction: column; gap: 6px; }
.op-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbff; }
.acc-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line-2); }
.acc-row:first-of-type { border-top: 0; padding-top: 4px; }
.acc-row .muted { font-size: .84rem; }
.acc-pw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acc-pw input[type=password] { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-family: inherit; font-size: .9rem; width: 15em; }
.acc-pw .check { font-size: .84rem; }
.btn.red { background: #ef4444; border-color: #ef4444; color: #fff; }
.btn.red:hover { background: #dc2626; }
.chip-tag.fixed { background: #ecfdf5; color: #047857; }
.chip-tag small { font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, .7); }
.sc .search input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px 0 34px; font-size: .95rem; font-family: inherit; }
.sc .search .i { top: 14px; }
.sc .pk-list.inline { max-width: 520px; }

/* ---------- 상품 관리 ---------- */
.prod-filter { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.prod-filter .pf { display: flex; flex-direction: column; gap: 6px; }
.prod-filter .pf.grow { flex: 1 1 260px; }
.prod-filter .pf > label { font-size: .8rem; font-weight: 700; color: var(--sub); }
.prod-filter select, .prod-filter .search input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff;
  font-size: .92rem; font-family: inherit; min-width: 120px; }
.prod-filter select:disabled { background: var(--line-2); color: #a0a8b8; }
.prod-filter .search input { width: 100%; padding-left: 32px; }
.prod-filter .search .i { top: 12px; }
.prod-filter .pf-row { flex-basis: 100%; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 12px; }
.prod-filter .store-pick { padding: 2px 4px 2px 4px; }
.prod-filter .store-pick .sp-label { display: none; }
.prod-table th a.sort { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.prod-table th a.sort span { font-size: .75rem; color: #b6bfce; }
.prod-table th a.sort.on { color: var(--brand); }
.prod-table th a.sort.on span { color: var(--brand); }
.prod-table th { padding: 13px 14px; }
.prod-table td { padding: 12px 14px; }
.btn.sm { padding: 5px 12px; font-size: .82rem; }
dialog.form-dlg { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; }
dialog.form-dlg form { display: flex; flex-direction: column; gap: 14px; }
.dlg-form { grid-template-columns: repeat(6, 1fr) !important; gap: 12px 14px; }
.dlg-form > div { grid-column: span 3; }
.dlg-form > div.full { grid-column: 1 / -1; }
.dlg-form > div.third { grid-column: span 2; }
.dlg-form select:disabled { background: var(--line-2); color: #a0a8b8; }
.dlg-form .calc { display: flex; gap: 22px; flex-wrap: wrap; background: #f8fafc; border-radius: 10px; padding: 10px 14px; font-size: .88rem; color: var(--sub); }
.dlg-form .calc b { color: var(--ink); }

/* ---------- 분류 관리 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cat-col { display: flex; flex-direction: column; gap: 10px; min-height: 520px; margin: 0; }
.cat-title { align-self: flex-start; background: #475569; color: #fff; font-weight: 800; font-size: .9rem; padding: 7px 18px; border-radius: 8px; }
.cat-parents { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.cat-parent { display: grid; grid-template-columns: 3.4em 1fr; gap: 4px; }
.cat-parent b, .cat-parent span { background: #e2e8f0; border-radius: 6px; padding: 7px 10px; font-size: .9rem; }
.cat-parent b { text-align: center; }
.cat-parent span { font-weight: 700; }
.cat-form { display: grid; grid-template-columns: 4.4em 1fr; gap: 6px; }
.cat-form input[type=text] { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-size: .95rem; font-family: inherit; }
.cat-form .cat-code { text-align: center; font-weight: 800; }
.cat-form input[readonly] { background: var(--line-2); color: var(--sub); }
.cat-form input:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.cat-form .cat-all { grid-column: 1 / -1; font-size: .82rem; }
.cat-list { flex: 1; max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.cat-list table.t th { position: sticky; top: 0; z-index: 1; }
.cat-list table.t td, .cat-list table.t th { padding: 8px 10px; }
.cat-list tr.sel td { background: #d9fbe0 !important; font-weight: 700; }
.cat-btns { display: flex; justify-content: space-between; align-items: center; }
.icon-btn { width: 40px; height: 40px; padding: 0; font-size: 1.4rem; font-weight: 900; line-height: 1; }
.icon-btn.del { color: #ef4444; }
.icon-btn.add { color: #ef4444; }
.icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.cat-empty { flex: 1; display: grid; place-items: center; color: var(--sub); background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; min-height: 300px; font-size: .9rem; }

.cat-grid.big-only { grid-template-columns: minmax(0, 520px); }
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbff; }
.kiosk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; font-size: 1.05rem; }
.kiosk-row .btn { min-width: 96px; }
.k-on { display: block; color: #16a34a; font-size: .9rem; font-weight: 700; margin-top: 2px; }
.k-off { display: block; color: #9ca3af; font-size: .9rem; font-weight: 600; margin-top: 2px; }
.k-완료 { color: #16a34a; font-weight: 700; } .k-만료 { color: var(--up); } .k-재부팅중, .k-대기 { color: #d97706; font-weight: 700; }
.kiosk-setup { margin-top: 14px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; }
.ks-codes { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 6px; }
.ks-codes > div { display: flex; align-items: baseline; gap: 10px; }
.ks-code { font-size: 1.5rem; letter-spacing: .12em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kiosk-setup ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.9; }
.kiosk-log-h { margin: 18px 0 6px; font-size: .95rem; }
.coin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.coin-row .btn { min-width: 96px; }
.coin-in { display: flex; align-items: center; gap: 6px; color: #d97706; font-weight: 600; }
.coin-in input { width: 130px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 1.05rem; text-align: right; background: #fff; }
.coin-in input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.kiosk-box + .kiosk-box { margin-top: 0; }
.kiosk-log-h + .t td:nth-child(2) { white-space: nowrap; }
.coin-in span { color: var(--ink); }
.k-보내는중 { color: #d97706; font-weight: 700; } .k-실패 { color: var(--up); font-weight: 700; }
.reprint { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.reprint .btn { flex: 1; justify-content: center; min-height: 48px; font-size: 1.05rem; }
.reprint small { font-weight: 500; opacity: .85; }
[hidden] { display: none !important; }

.bc-msg { font-size: .8rem; margin-top: 5px; min-height: 1em; color: var(--sub); }
.bc-msg.ok { color: #047857; font-weight: 700; }
.bc-msg.new { color: var(--brand); font-weight: 700; }
.bc-msg.bad { color: var(--up); font-weight: 700; }

/* 한/영 버튼 */
.hk-wrap { display: flex; gap: 6px; }
.hk-wrap input { flex: 1; min-width: 0; }
.hk-btn { flex: none; width: 40px; border: 1px solid var(--line); border-radius: 10px; background: #f1f5f9; color: var(--sub);
  font-weight: 900; font-size: .95rem; cursor: pointer; font-family: inherit; }
.hk-btn.on { background: #eef2ff; color: var(--brand); border-color: #c7d2fe; }

/* ---------- 캘린더 ---------- */
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; margin: -6px; width: calc(100% + 12px); }
.cal th { padding: 4px; color: var(--sub); font-weight: 600; font-size: .82rem; }
.cal td { background: #fafbfd; border-radius: 12px; height: 92px; vertical-align: top; padding: 0; transition: background .15s; }
.cal td:empty { background: transparent; }
.cal td a { display: block; height: 100%; padding: 8px 10px; text-decoration: none; border-radius: 12px; }
.cal td a:hover { background: var(--brand-soft); }
.cal td .d { font-size: .82rem; font-weight: 600; color: var(--sub); }
.cal td.sat .d { color: var(--down); } .cal td.sun .d { color: var(--up); }
.cal td .amt { font-weight: 800; font-size: .98rem; margin-top: 10px; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal td .amt .short { display: none; }
.cal td .cnt { font-size: .76rem; color: var(--sub); text-align: right; }
.cal td.lv1 { background: #f5f7ff; } .cal td.lv2 { background: #eef1ff; } .cal td.lv3 { background: #e3e8ff; } .cal td.lv4 { background: #d4dcff; }
.cal td.best { background: linear-gradient(135deg, #6366f1, #3b82f6); }
.cal td.best .d, .cal td.best .amt, .cal td.best .cnt { color: #fff; }
.cal td.today { box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- 입력 폼 ---------- */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; }
.form label, .field label { display: block; font-size: .8rem; color: var(--sub); font-weight: 600; margin-bottom: 6px; }
.form input[type=text], .form input[type=number], .form input[type=password], .form select,
.field input[type=text], .field input[type=password], .field input[type=tel] {
  width: 100%; font-size: .93rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-family: inherit; color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-2) !important; font-weight: 500 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--sub); }
.badge.on { background: var(--ok-soft); color: var(--ok); } .badge.off { background: var(--up-soft); color: var(--up); }
details summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }

/* ---------- 로그인 ---------- */
.lg-bg { position: relative; min-height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
  background-color: #eef2f9;
  background-image: radial-gradient(rgba(79, 70, 229, .13) 1px, transparent 1px);
  background-size: 22px 22px; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.bl1 { width: 460px; height: 460px; left: -120px; top: -140px; background: rgba(99, 102, 241, .35); }
.bl2 { width: 420px; height: 420px; right: -120px; bottom: -160px; background: rgba(6, 182, 212, .3); }
.bl3 { width: 260px; height: 260px; right: 18%; top: 8%; background: rgba(244, 114, 182, .18); }
.lg-wrap { position: relative; z-index: 1; width: 100%; max-width: 980px; }
.lg-card { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 560px; border-radius: 28px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 80px rgba(30, 41, 99, .18), 0 2px 6px rgba(30, 41, 99, .06); }
.lg-left { position: relative; overflow: hidden; padding: 40px 44px; color: #fff; display: flex; flex-direction: column; gap: 28px;
  background: radial-gradient(circle at 85% 15%, rgba(56, 189, 248, .35), transparent 40%),
              radial-gradient(circle at 10% 90%, rgba(129, 140, 248, .45), transparent 45%),
              linear-gradient(160deg, #1e1b4b 0%, #172554 55%, #0c4a6e 100%); }
.lg-left::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 32px 32px; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); }
.lg-logo { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; }
.lg-logo .mark { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 8px 18px rgba(47, 160, 210, .4)); }
.lg-logo.dark .wm .r { color: #1b4fb5; }
.lg-logo.dark .ko { color: var(--sub); }
.lg-copyhead { position: relative; z-index: 1; }
.lg-copyhead h2 { font-size: 2.05rem; font-weight: 500; line-height: 1.32; margin: 0 0 12px; letter-spacing: -.035em; }
.lg-copyhead h2 b { font-weight: 800; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-copyhead p { margin: 0; color: rgba(226, 232, 255, .75); font-size: .95rem; }
.lg-preview { position: relative; z-index: 1; flex: 1; min-height: 210px; }
.pv-card { position: absolute; border-radius: 16px; padding: 14px 16px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(2, 6, 23, .35); }
.pv-k { font-size: .75rem; color: rgba(226, 232, 255, .7); font-weight: 600; }
.pv-v { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.pv-v small { font-size: .8rem; font-weight: 600; margin-left: 2px; color: rgba(226, 232, 255, .75); }
.pv-s { font-size: 1.1rem; font-weight: 800; }
.pv-pill { position: absolute; right: 14px; top: 14px; font-size: .72rem; font-weight: 800; color: #fecdd3; background: rgba(244, 63, 94, .25); padding: 2px 8px; border-radius: 99px; }
.pv-main { left: 0; top: 6px; width: 64%; }
.pv-spark { display: block; width: 100%; height: 34px; margin-top: 8px; }
.pv-bars { right: 0; top: 70px; width: 40%; }
.bars-v { display: flex; align-items: flex-end; gap: 5px; height: 70px; margin-top: 10px; }
.bars-v i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #a5b4fc, #6366f1); }
.bars-v i:last-child, .bars-v i:nth-last-child(2) { background: linear-gradient(180deg, #67e8f9, #0ea5e9); }
.pv-donut { left: 12%; top: 136px; display: flex; align-items: center; gap: 12px; }
.pv-donut svg { width: 46px; height: 46px; }
.lg-right { display: flex; align-items: center; justify-content: center; padding: 48px 56px; background: #fff; }
.lg-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; }
.lg-form h1 { font-size: 1.85rem; font-weight: 800; margin: 0; letter-spacing: -.04em; color: var(--ink); }
.lg-hint { color: var(--sub); margin: 6px 0 28px; font-size: .93rem; }
.lg-field { position: relative; display: flex; align-items: center; margin-bottom: 12px; color: #94a3b8; }
.lg-field > svg { position: absolute; left: 16px; pointer-events: none; }
.lg-field input { width: 100%; height: 54px; padding: 0 46px; border: 1.5px solid #e2e8f0; border-radius: 14px; background: #f8fafc;
  font-size: 1rem; font-family: inherit; color: var(--ink); transition: border-color .15s, background .15s, box-shadow .15s; }
.lg-field input::placeholder { color: #94a3b8; }
.lg-field input:focus { outline: none; background: #fff; border-color: #818cf8; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14); }
.lg-field:focus-within { color: var(--brand); }
.lg-eye { position: absolute; right: 10px; width: 36px; height: 36px; border: 0; background: none; color: #94a3b8; cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.lg-eye:hover { background: #eef2ff; color: var(--brand); }
.lg-save { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .9rem; margin: 4px 0 22px; cursor: pointer; }
.lg-save input { width: 17px; height: 17px; accent-color: var(--brand); }
.lg-btn { height: 54px; border: 0; border-radius: 14px; color: #fff; font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, #4f46e5, #2563eb 55%, #0891b2); box-shadow: 0 12px 26px rgba(79, 70, 229, .32); transition: transform .15s, box-shadow .15s; }
.lg-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(79, 70, 229, .4); }
.lg-links { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.lg-links a { color: var(--sub); font-size: .88rem; text-decoration: none; font-weight: 500; }
.lg-links a:hover { color: var(--brand); text-decoration: underline; }
.lg-links span { width: 1px; height: 12px; background: #cbd5e1; }
.lg-error { display: flex; gap: 8px; align-items: flex-start; background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; border-radius: 12px;
  padding: 11px 14px; font-size: .88rem; margin-bottom: 14px; }
.lg-foot { text-align: center; color: #94a3b8; font-size: .8rem; margin-top: 28px; letter-spacing: .01em; }

/* ---------- 좁은 PC (노트북) ---------- */
@media (max-width: 1500px) {
  .hide-lg { display: none !important; }
  .sgrid { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
}

/* ---------- 휴대폰 ---------- */
@media (max-width: 960px) {
  html { font-size: 17px; }
  .side { transform: translateX(-100%); transition: transform .25s ease; width: 280px; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 25; backdrop-filter: blur(2px); }
  .top { margin-left: 0; padding: 0 12px; height: 56px; }
  .top .burger { display: block; }
  .top .who span { display: none; }
  main { margin-left: 0; padding: 14px 14px 96px; }
  .tabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tabs a, .tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 10px;
    text-decoration: none; font-size: .72rem; font-weight: 600; color: var(--sub); background: none; border: 0; font-family: inherit; }
  .tabs .on { color: var(--brand); }
  .grid.k4, .grid.k3 { grid-template-columns: 1fr 1fr; }
  .grid.k2 { grid-template-columns: 1fr; }
  .grid { gap: 12px; }
  .grid.k3 > .kpi:first-child:nth-last-child(odd), .span2 { grid-column: span 2; }
  .card { padding: 16px; margin-bottom: 12px; border-radius: 14px; }
  .kpi .v { font-size: 1.45rem; }
  .kpi .chip { width: 28px; height: 28px; right: 12px; top: 12px; }
  .kpi .chip svg { width: 15px; height: 15px; }
  .hero .v { font-size: 2.1rem; }
  .quick { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .quick a { padding: 14px 4px; font-size: .8rem; }
  h1.page { font-size: 1.35rem; }
  .page-head { margin-bottom: 12px; }
  .filters { gap: 8px; padding: 12px; }
  .filters select { width: 100%; }
  .filters .sp { display: none; }
  .filters .range { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }   /* 큰 글씨 휴대폰에서 날짜가 잘리지 않게 한 줄에 하나씩 */
  .filters .range > span { display: none; }
  .filters .range input[type=date] { width: 100%; min-width: 0; }
  .seg { width: 100%; }
  .seg a { flex: 1; text-align: center; padding: 7px 4px; }
  .sgrid { grid-template-columns: 5.6em minmax(0, 1fr); gap: 8px 10px; }
  .sgrid .range input { min-width: 0; }
  .store-table th, .store-table td { padding: 9px 6px; }
  .login-btn { padding: 6px 8px; font-size: .8rem; }
  .show-m { display: block !important; font-size: .78rem; }
  code.bc.show-m { display: table !important; margin-bottom: 4px; }
  select.status { padding: 0 4px; }
  .search-box, .card { min-width: 0; overflow: hidden; }
  dl.info { grid-template-columns: 6.5em 1fr; }
  .acc-pw input[type=password] { width: 100%; }
  .prod-filter .pf { flex: 1 1 45%; }
  .prod-filter .pf.grow { flex-basis: 100%; }
  .prod-filter select { width: 100%; min-width: 0; }
  .dlg-form > div, .dlg-form > div.third { grid-column: 1 / -1; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-col { min-height: 0; }
  .cat-empty { min-height: 80px; }
  .cal { border-spacing: 3px; margin: -3px; width: calc(100% + 6px); }
  .cal td { height: 58px; border-radius: 8px; }
  .cal td a { padding: 4px 5px; border-radius: 8px; }
  .cal td .amt { font-size: .7rem; margin-top: 8px; white-space: nowrap; letter-spacing: -.04em; text-align: center; }
  .cal td .amt .full { display: none; } .cal td .amt .short { display: inline; }
  .cal td .cnt { display: none; }
  table.t { font-size: .88rem; }
  table.t th, table.t td { padding: 9px 6px; }
  table.t { font-size: .85rem; }
  table.t .hide-m { display: none; }
  .lg-bg { padding: 0; align-items: stretch; }
  .lg-wrap { max-width: none; display: flex; flex-direction: column; }
  .lg-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; border-radius: 0; box-shadow: none; }
  .lg-left { padding: 28px 24px 34px; gap: 16px; border-radius: 0 0 28px 28px; }
  .lg-copyhead h2 { font-size: 1.55rem; }
  .lg-copyhead p, .lg-preview { display: none; }
  .lg-right { padding: 30px 22px 40px; align-items: flex-start; }
  .lg-form { max-width: none; }
  .lg-foot { margin: 0; padding: 0 0 24px; background: #fff; }
  .hide-m { display: none !important; }
}

/* 영수증 조회: 카드·현금 구분 */
.badge.pay-카드 { background: var(--brand-soft); color: var(--brand); }
.badge.pay-현금 { background: var(--warn-soft); color: var(--warn); }
.badge.pay-복합 { background: var(--down-soft); color: var(--down); }
.pay-cell { white-space: nowrap; }
a.pay-kpi { color: inherit; text-decoration: none; transition: box-shadow .15s, outline-color .15s; outline: 2px solid transparent; }
a.pay-kpi:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }
a.pay-kpi.sel { outline-color: var(--brand); }

/* 상품 추가: 카메라 바코드 찍기 */
.scan-btn { width: 48px; display: inline-flex; align-items: center; justify-content: center; background: #eef2ff; color: var(--brand); border-color: #c7d2fe; }
.scan-dlg { border: 0; border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 24px)); background: #0b1220; color: #fff; overflow: hidden; }
.scan-dlg::backdrop { background: rgba(2, 6, 23, .7); }
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; font-size: 1rem; }
.scan-head .btn { color: #fff; }
#scanView { width: 100%; min-height: 240px; background: #000; }
#scanView video { width: 100% !important; display: block; }
.scan-msg { padding: 12px 16px 16px; font-size: .92rem; color: #cbd5e1; text-align: center; }
/* 사원 관리 */
.grade-pick { display: flex; gap: 8px; }
.grade-pick label { flex: 1; margin: 0; cursor: pointer; }
.grade-pick input { position: absolute; opacity: 0; pointer-events: none; }
.grade-pick span { display: block; text-align: center; padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; color: var(--sub); background: #fff; }
.grade-pick input:checked + span { border-color: var(--brand); color: var(--brand); background: #eef2ff; box-shadow: 0 0 0 2px rgba(79, 70, 229, .15); }
.grade-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.badge.emp-admin { background: #eef2ff; color: #4338ca; } .badge.emp-staff { background: var(--line-2); color: var(--sub); }
/* 입력 창(dialog) 안 스크롤이 '당겨서 새로고침'·뒤 화면 스크롤로 넘어가지 않게 (휴대폰에서 창이 사라지던 문제) */
dialog.form-dlg, dialog.picker { overscroll-behavior: contain; }
@supports (height: 100dvh) {
  dialog.form-dlg { max-height: calc(100dvh - 32px); }
  dialog.picker { max-height: min(640px, calc(100dvh - 64px)); }
}
html:has(dialog[open]) { overscroll-behavior-y: none; }

/* 상품별 매출: 검색 + 재고 입력 창 */
.filters .sales-q input { width: 200px; }
@media (max-width: 760px) { .filters .sales-q { flex: 1 1 100%; } .filters .sales-q input { width: 100%; } }
.stock-now { font-size: 15px; color: var(--sub); margin: 2px 0 8px; }
.stock-now b { font-size: 22px; color: var(--ink); margin-left: 6px; }
.stock-in { width: 100% !important; max-width: none !important; box-sizing: border-box; font-size: 20px !important; font-weight: 700; text-align: right; }
.stock-shop { font-weight: 700; margin-top: 4px; }

/* 대리점 가입 문의: 메일 주소 */
.help-mail { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin: 0 0 24px; border: 1px solid #c7d2fe;
  border-radius: 12px; background: #eef2ff; color: var(--brand); font-weight: 600; font-size: .92rem; text-decoration: none; word-break: break-all; }
.help-mail .i { flex: none; }
