/* 로컬 번들 폰트 - 외부 CDN 미참조(오프라인·프라이버시). public/fonts/ 에 동봉. */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

/* ═══════════════════════════════════════════════════════════════════
   AX페이 콘솔 디자인 시스템 v1 (M5) - 본사(/admin)·가맹점(/bo) 공용.
   기조: 밝은 톤(라이트 단일), 한국 금융 실무 백오피스. PC 전용.
   원칙: 이모지·그라데이션·과한 라운드 금지, 정보 밀도 우선, 숫자는
   tabular-nums, 구매/입금=파랑·판매/출금=적색(국내 금융 관례).
   ═══════════════════════════════════════════════════════════════════ */

/* 팔레트 - 콘솔 셸(.adm-root)과 로그인 화면(.adm-login-page) 공통 주입.
   ★로그인 화면은 .adm-root 밖에서 렌더되므로 반드시 이 선택자에 함께 묶는다.
   (누락 시 var() 의존 공용 부품(.adm-btn 등)이 투명해짐 - 2026-07-24 실측 버그) */
.adm-root, .adm-login-page {
  --bg: #f5f6f8;            /* 지면 - 옅은 쿨그레이 */
  --panel: #ffffff;
  --line: #e7e9ee;          /* 기본 헤어라인 */
  --line-strong: #d6dae1;
  --field-border: #8a93a1;  /* v3 검수: 폼 컨트롤 테두리(3:1) - 장식선과 분리 */
  --ink: #1a212b;           /* 본문 잉크 */
  --ink-2: #4b5563;
  --muted: #5b6472;          /* v3 검수: AA 6.0:1 */
  --faint: #6f7887;          /* v3 검수: AA 4.5:1 */
  --brand: #1b5bd7;         /* 딥블루 - 유일한 포인트 컬러 */
  --brand-ink: #103f9e;
  --brand-soft: #eef4ff;
  --buy: #1266d8;           /* 구매/입금/충전 */
  --sell: #c62d37;          /* 판매/출금/환전 */
  --ok: #0f7a47; --ok-bg: #e9f6ef;
  --warn: #7d5c04; --warn-bg: #fbf3dd;
  --danger: #b8322a; --danger-bg: #fcedeb;
}

.adm-root {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.adm-root ::selection { background: #d7e5ff; }
.adm-root :focus-visible { outline: 2px solid rgba(27, 91, 215, 0.45); outline-offset: 1px; }

/* ── 사이드바 (밝은 톤) ─────────────────────────────────────────── */
.adm-sidebar {
  width: 212px;
  flex: 0 0 212px;
  background: #fbfcfe;
  border-right: 1px solid var(--line);
  min-height: 100vh;
  padding: 0 0 28px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.adm-brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.adm-wordmark {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.2;
}
.adm-wordmark em { font-style: normal; color: var(--brand); }
.adm-scope { font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: 0.02em; }
.adm-navgroup { margin: 2px 0 0; }
/* 그룹 헤더(접힘 토글) - 대분류: 소분류와 확실히 구분(진한 잉크·볼드·셰브론) */
.adm-navgroup-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  font: inherit; font-size: 14px; font-weight: 750; color: var(--ink);
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 9px 14px 9px 16px; letter-spacing: 0.01em;
  transition: background 0.12s;
}
.adm-navgroup-head:hover { background: #f1f4f9; }
.adm-navgroup-head svg { color: var(--faint); flex: none; }
.adm-navgroup.open > .adm-navgroup-head svg { color: var(--ink-2); }
.adm-navgroup-head .here {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-left: auto; flex: none;
}
.adm-navgroup ul { list-style: none; margin: 0 0 6px; padding: 0; }
.adm-navlink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 15px 6px 35px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.adm-navlink:hover { background: #f1f4f9; color: var(--ink); }
.adm-navlink.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 700;
}
.adm-navlink.soon { color: var(--faint); }
.adm-navlink .soon-tag {
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1.6;
}
/* 새 내역 뱃지(메뉴 옆 (N)) - 미읽음 알림이 있는 메뉴에만 붙는다 */
.adm-navlink .nav-badge {
  margin-left: 4px; font-size: 12px; font-weight: 800; color: var(--danger);
  font-variant-numeric: tabular-nums;
}
.adm-navlink.active .nav-badge { color: var(--danger); }

/* 외부 링크(새 창) 표시 - API 연동 문서 등 */
.adm-navlink .ext-tag { font-size: 11px; color: var(--faint); margin-left: auto; }

/* ── 메인 골격 ──────────────────────────────────────────────────── */
.adm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.adm-header {
  height: 50px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.adm-header .adm-title { font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.adm-header .adm-user { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); }
.adm-header .adm-user b { color: var(--ink); font-weight: 700; }
.adm-header .adm-rolechip {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px;
  background: var(--brand-soft); color: var(--brand);
  letter-spacing: 0.02em;
}
.adm-logout {
  font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  padding: 5px 12px; border-radius: 7px;
  transition: background 0.12s;
}
.adm-logout:hover { background: #f1f3f6; }
.adm-content { padding: 22px 24px 48px; max-width: 1480px; }
.adm-pagetitle { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.adm-pagesub { font-size: 13px; color: var(--muted); margin: 0 0 16px; max-width: 820px; word-break: keep-all; overflow-wrap: anywhere; }

/* ── 요약 카드 ──────────────────────────────────────────────────── */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0 0 20px; }
.adm-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-card .adm-card-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.adm-card .adm-card-value {
  font-size: 26px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.adm-card .adm-card-sub { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.adm-card.tone-danger .adm-card-value { color: var(--danger); }
.adm-card.tone-warn .adm-card-value { color: var(--warn); }
.adm-card.tone-ok .adm-card-value { color: var(--ok); }

/* ── 필터바 ─────────────────────────────────────────────────────── */
.adm-filter {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; margin: 0 0 14px;
}
.adm-filter label { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.adm-filter select, .adm-filter input {
  font: inherit; font-size: 13.5px; padding: 5px 9px; height: 34px;
  border: 1px solid var(--field-border); border-radius: 7px; background: #fff; color: var(--ink);
}
.adm-filter select:focus, .adm-filter input:focus { border-color: var(--brand); outline: none; }
.adm-filter input[type="text"] { width: 220px; }
.adm-filter .adm-btn { margin-left: auto; }

/* ── 버튼 ──────────────────────────────────────────────────────── */
.adm-btn {
  font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  height: 34px; padding: 0 17px; border-radius: 7px;
  transition: background 0.12s, border-color 0.12s;
}
.adm-btn:hover { background: #1449b0; border-color: #1449b0; }
.adm-btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.adm-btn.ghost:hover { background: #f1f3f6; }
.adm-btn.danger { background: var(--danger); border-color: var(--danger); }
.adm-btn:disabled { opacity: 1; background: #eef0f4; border-color: #dcdfe6; color: #6b7483; cursor: not-allowed; }

/* ── 테이블 ─────────────────────────────────────────────────────── */
.adm-tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.adm-tablescroll { overflow: auto; max-height: calc(100vh - 280px); }
.adm-table th { box-shadow: 0 1px 0 var(--line); }
.adm-table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.45; }
.adm-table th, .adm-table td {
  padding: 7px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid #e9ecf1;
}
.adm-table th {
  background: #f8f9fb; color: var(--ink-2); font-weight: 700; font-size: 12px;
  letter-spacing: 0.01em; position: sticky; top: 0;
  border-bottom: 1px solid var(--line);
}
.adm-table tbody tr { transition: background 0.1s; }
.adm-table tbody tr:hover { background: #f6f9ff; }
.adm-table tbody tr:last-child td { border-bottom: none; }
/* 표 안 소형 복사 버튼(9차 18번 시안 - 계좌번호·입금자명 옆) */
.adm-copy { padding: 1px 7px; font-size: 11px; margin-left: 6px; }
/* 행 아래 펼침(2026-08-01 상담 문의) - 선택한 행 바로 밑 전폭 행. 호버 배경은 끈다(내용 영역). */
.adm-expandrow > td { background: #f8fafc; padding: 12px 14px; border-bottom: 2px solid var(--line); }
.adm-expandrow:hover { background: transparent; }
.adm-expandrow .chat-split { margin-top: 0; }
.adm-table td.num, .adm-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.adm-table td.num { font-weight: 600; }
.adm-table td.center, .adm-table th.center { text-align: center; }
.adm-table td.t-buy { color: var(--buy); font-weight: 650; }
.adm-table td.t-sell { color: var(--sell); font-weight: 650; }
.adm-empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ── 배지 ──────────────────────────────────────────────────────── */
.adm-badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px;
  border-radius: 5px; background: #f0f2f5; color: var(--ink-2); line-height: 1.45;
}
.adm-badge.b-matched { background: var(--brand-soft); color: var(--brand); }
.adm-badge.b-remit { background: var(--warn-bg); color: var(--warn); }
.adm-badge.b-confirm { background: #e5f2fd; color: #0b62b8; }
.adm-badge.b-disputed { background: var(--danger-bg); color: var(--danger); }
.adm-badge.b-completed { background: var(--ok-bg); color: var(--ok); }
.adm-badge.b-cancelled { background: #f0f2f5; color: var(--muted); }
.adm-badge.b-open { background: var(--danger-bg); color: var(--danger); }
.adm-badge.b-resolved { background: var(--ok-bg); color: var(--ok); }
.adm-kind {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px;
  border-radius: 4px; background: #f0f2f5; color: var(--ink-2); letter-spacing: 0.02em; line-height: 1.45;
}
.adm-kind.k-x { background: var(--brand-soft); color: var(--brand); }
.adm-kind.k-g { background: var(--warn-bg); color: var(--warn); }
.adm-kind.k-z { background: #f1eafb; color: #6d3fb8; }
/* D = 총판 공급 레그(2026-07-30 ④) - Z와 헷갈리지 않게 같은 보라 계열에서 한 칸 더 진한 남보라 */
.adm-kind.k-d { background: #e7e6fb; color: #4a39be; }
/* 표 안에서 눈에 띄어야 하는 경고 문구(예: 본사 송금 기록 있음 - N16) */
.adm-warn-text { color: var(--warn); font-weight: 700; }

/* ── 회원 등급 칩(6종 - 시안 3-1) ─────────────────────────────────── */
.adm-grade {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px;
  border-radius: 5px; background: #f0f2f5; color: var(--ink-2); line-height: 1.45;
}
.adm-grade.g-new { background: #e8f4fb; color: #0b6fa8; }     /* 신규 - 하늘 */
.adm-grade.g-normal { background: #f0f2f5; color: var(--ink-2); } /* 일반 - 중립 */
.adm-grade.g-safe { background: var(--ok-bg); color: var(--ok); } /* 안전 - 녹색 */
.adm-grade.g-vip { background: #fdf3dc; color: #8a6408; }     /* VIP - 골드 */
.adm-grade.g-vvip { background: #f6e8cf; color: #6d4a04; border: 1px solid #ecd9b0; } /* VVIP - 진한 골드 */
.adm-grade.g-risk { background: var(--danger-bg); color: var(--danger); } /* 위험(구) - 적색 */
.adm-grade.g-caution { background: var(--danger-bg); color: var(--danger); } /* 주의 - 적색(2026-07-30 5단계) */

/* ── 기간 달력 칩 + 범위 모달 (정본: admin-date-range-calendar-reference) ── */
.adm-daterange { display: inline-flex; align-items: center; gap: 4px; }
.adm-datechip {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  height: 34px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.adm-datechip:hover { background: #f1f3f6; }
.adm-datechip.set { border-color: #b9cffa; background: var(--brand-soft); color: var(--brand); }
.adm-datechip-clear {
  font: inherit; font-size: 14px; cursor: pointer; line-height: 1;
  width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: var(--faint);
}
.adm-datechip-clear:hover { background: #eef0f4; color: var(--ink-2); }
.adm-cal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(23, 31, 45, 0.32);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.adm-cal {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 16px 14px; width: 316px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08), 0 20px 48px rgba(16, 24, 40, 0.14);
  font-size: 12.5px;
}
.adm-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.adm-cal-title { font-size: 13.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.adm-cal-nav {
  font: inherit; font-size: 16px; cursor: pointer; line-height: 1;
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.adm-cal-nav:hover { background: #f1f3f6; }
.adm-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.adm-cal-dowrow { margin: 0 0 2px; }
.adm-cal-dow { text-align: center; padding: 3px 0; font-size: 11px; font-weight: 700; color: var(--faint); }
.adm-cal-dow.sun { color: var(--sell); }
.adm-cal-dow.sat { color: var(--buy); }
.adm-cal-day {
  font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
  width: 36px; height: 34px; margin: 0 auto; border-radius: 8px; border: none;
  background: transparent; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: background 0.1s;
}
.adm-cal-day:hover { background: #f1f4f9; }
.adm-cal-day.out { color: var(--faint); }
.adm-cal-day.disabled { color: #c9ced7; cursor: not-allowed; background: transparent; }
.adm-cal-day.range { background: var(--brand-soft); color: var(--brand); }
.adm-cal-day.sel { background: var(--brand); color: #fff; font-weight: 750; }
.adm-cal-day.today:not(.sel) { box-shadow: inset 0 0 0 1px rgba(27, 91, 215, 0.45); }
.adm-cal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px;
}
.adm-cal-sum { font-size: 12px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-cal-actions { display: inline-flex; gap: 6px; }

/* ── 미니 막대(통계 표 내 상대 비교 - 차트 라이브러리 불용) ───────── */
.adm-meter { display: inline-flex; align-items: center; gap: 8px; min-width: 160px; }
.adm-meter .track {
  flex: 1 1 auto; height: 6px; border-radius: 3px; background: #eef0f4; overflow: hidden;
}
.adm-meter .fill { height: 100%; border-radius: 3px; background: var(--brand); }

/* ── 페이지네이션 ──────────────────────────────────────────────── */
.adm-pagination { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 14px 0 0; font-size: 13px; }
.adm-pagination a, .adm-pagination span {
  min-width: 32px; text-align: center; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); background: #fff;
  font-variant-numeric: tabular-nums;
  transition: background 0.12s;
}
.adm-pagination a:hover { background: #f1f3f6; }
.adm-pagination .cur { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.adm-pagination .disabled { color: #8e97a5; pointer-events: none; opacity: 1; }
.adm-pagesummary { font-size: 12.5px; color: var(--ink-2); margin: 10px 2px 0; font-variant-numeric: tabular-nums; }

/* ── 배너 ──────────────────────────────────────────────────────── */
.adm-banner { padding: 10px 14px; border-radius: 8px; font-size: 12.5px; margin: 0 0 14px; line-height: 1.55; }
.adm-banner.ok { background: var(--ok-bg); border: 1px solid #b9dfc8; color: #0c5c36; }
.adm-banner.err { background: var(--danger-bg); border: 1px solid #f2c1bc; color: #7f2620; }
.adm-banner.info { background: var(--brand-soft); border: 1px solid #c4d8fb; color: #12439e; }
.adm-banner code { background: rgba(15, 30, 60, 0.06); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* ── 위젯(현황판 2열) ──────────────────────────────────────────── */
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .adm-grid2 { grid-template-columns: 1fr; } }
.adm-widget { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.adm-widget-title {
  font-size: 14px; font-weight: 700; padding: 11px 15px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}

/* ── 준비 중 ───────────────────────────────────────────────────── */
.adm-soon {
  background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 10px;
  padding: 56px 24px; text-align: center;
}
.adm-soon h2 { font-size: 15px; margin: 0 0 6px; font-weight: 700; }
.adm-soon p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.7; }

/* ── 로그인 (밝은 톤) ──────────────────────────────────────────── */
.adm-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #f5f6f8;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
}
.adm-login-card {
  background: #fff;
  border: 1px solid var(--line, #e7e9ee);
  border-top: 3px solid #1b5bd7;
  border-radius: 12px;
  padding: 34px 32px 30px;
  width: 100%;
  max-width: 392px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 14px 36px rgba(16, 24, 40, 0.05);
}
.adm-login-mark { font-size: 20px; font-weight: 800; letter-spacing: 0.04em; color: #1a212b; margin: 0 0 18px; }
.adm-login-mark em { font-style: normal; color: #1b5bd7; }
.adm-login-card h1 { font-size: 16px; margin: 0 0 3px; color: #1a212b; font-weight: 700; letter-spacing: -0.01em; }
.adm-login-card .sub { font-size: 12.5px; color: #6d7684; margin: 0 0 20px; }
.adm-login-card label { display: block; font-size: 12px; color: #4b5563; margin: 0 0 5px; font-weight: 650; }
.adm-login-card .fld { margin: 0 0 14px; }
.adm-login-card input {
  width: 100%; font: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid #8a93a1; border-radius: 8px; background: #fff; color: #1a212b;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.adm-login-card input:focus {
  outline: none; border-color: #1b5bd7; box-shadow: 0 0 0 3px rgba(27, 91, 215, 0.12);
}
.adm-login-card .adm-btn { width: 100%; height: 42px; font-size: 14px; margin-top: 6px; border-radius: 8px; }
.adm-login-card .adm-banner { margin-bottom: 16px; }
.adm-login-card .hint { font-size: 11.5px; color: #9aa3b0; margin: 16px 0 0; text-align: center; }

/* ── 로그인 2단계(OTP) 보조 링크 ───────────────────────────────────── */
.adm-otp-alt { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.adm-linkbtn {
  font: inherit; font-size: 12px; cursor: pointer; background: none; border: none;
  color: var(--brand, #1b5bd7); text-decoration: none; padding: 0;
}
.adm-linkbtn:hover { text-decoration: underline; }

/* ═══ 계정 보안(2FA/비밀번호) - B0.5. ★디자인 패스 요망(최소 기능 스타일) ═══ */
.adm-sec { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.adm-sec-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.adm-sec-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.adm-note { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.6; }
.adm-form-col { display: flex; flex-direction: column; gap: 6px; }
.adm-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-flabel { font-size: 13px; font-weight: 650; color: var(--ink-2); margin-top: 6px; }
.adm-code-input {
  font: inherit; font-size: 18px; letter-spacing: 0.32em; font-variant-numeric: tabular-nums;
  width: 168px; text-align: center; padding: 8px 10px;
  border: 1px solid var(--field-border); border-radius: 8px; background: #fff; color: var(--ink);
}
.adm-code-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,91,215,0.12); }
.adm-text-input {
  font: inherit; font-size: 14px; padding: 9px 11px; max-width: 340px;
  border: 1px solid var(--field-border); border-radius: 8px; background: #fff; color: var(--ink);
}
.adm-text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,91,215,0.12); }
.adm-secret-box { background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.adm-secret-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; flex-wrap: wrap; }
.adm-secret-label { font-size: 12px; font-weight: 700; color: var(--muted); width: 58px; flex: 0 0 58px; }
.adm-secret-val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: 0.04em; color: var(--ink); word-break: break-all; user-select: all; }
.adm-secret-val.small { font-size: 11px; letter-spacing: 0; }
.adm-backup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 4px 0 8px; }
.adm-backup-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 0.12em;
  padding: 5px 8px; background: #f8f9fb; border: 1px solid var(--line); border-radius: 6px; text-align: center;
  user-select: all;
}
.adm-gate { margin: 4px 0; }
.adm-hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* 배지를 그대로 버튼처럼 쓰는 셀(회원 상태 클릭 변경 - 시각적으로는 배지, 동작은 버튼) */
.adm-btn-plain {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit;
}
.adm-btn-plain:hover { filter: brightness(0.94); }
.adm-btn-plain:disabled { cursor: default; opacity: 0.6; }

/* ── 돈 액션 셀(표 내 컨트롤 박스 - B3 디자인 패스) ──────────────── */
/* ★2026-07-31 관리자 지적(전 콘솔 공통): 대기 상태(버튼 하나뿐)의 확인 박스가 min-width 220px
   박스로 그려져 사용중지·확정·블랙리스트 등 위험 버튼만 기형적으로 넓게 보였다.
   기본은 "자연폭 버튼만", 확인 문구·입력·배너가 나타나는 단계에서만 박스를 씌운다(:has). */
.adm-actbox {
  gap: 7px; align-items: center;
  white-space: normal; word-break: keep-all; overflow-wrap: anywhere;
}
.adm-actbox:has(.adm-note, .adm-banner, .adm-text-input, .adm-code-input, .adm-flabel) {
  background: #f8f9fb; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; max-width: 340px; min-width: 220px;
  align-items: stretch;
}
.adm-actbox .adm-btn { height: 30px; padding: 0 13px; font-size: 13px; border-radius: 6px; width: auto; }
.adm-actbox .adm-code-input { width: 118px; font-size: 14px; letter-spacing: 0.24em; padding: 5px 8px; }
.adm-actbox .adm-text-input { max-width: 100%; font-size: 12.5px; padding: 6px 9px; }
.adm-actbox .adm-note { margin: 0; font-size: 11.5px; }
.adm-actbox .adm-banner { margin: 0; padding: 7px 10px; font-size: 12px; }
.adm-actbox .adm-flabel { margin: 0; font-size: 11px; color: var(--muted); }
.adm-seg { gap: 4px; }
.adm-seg label {
  display: inline-flex; align-items: center; cursor: pointer;
  font-size: 11.5px; font-weight: 650; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 6px; background: #fff;
  padding: 3px 9px; transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.adm-seg label:hover { background: #f1f4f9; }
.adm-seg label:has(input:checked) { background: var(--brand-soft); border-color: #b9cffa; color: var(--brand); }
.adm-seg input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

/* ── 공용 모달(오버레이 + 패널) ───────────────────────────────────── */
.adm-modal-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(23, 31, 45, 0.38);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.adm-modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08), 0 20px 48px rgba(16, 24, 40, 0.16);
  width: min(900px, 100%); max-height: 92vh; margin: auto;
  display: flex; flex-direction: column; overflow: hidden;
}
.adm-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); flex: none;
}
.adm-modal-title { font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.adm-modal-close {
  font: inherit; font-size: 17px; line-height: 1; cursor: pointer;
  width: 28px; height: 28px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.adm-modal-close:hover { background: #f1f3f6; }
.adm-modal-close:disabled { opacity: 0.5; cursor: not-allowed; }
.adm-modal-body {
  padding: 16px 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; min-height: 0;
}
.adm-modal-foot {
  padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfc;
  display: flex; flex-direction: column; gap: 10px; flex: none;
}

/* ── 수동 매칭 화면(2-4) + 공용 소품 ──────────────────────────────── */
.adm-mm-tight { gap: 6px; }
.adm-mm-side { font-weight: 750; }
.adm-mm-side.t-buy { color: var(--buy); }
.adm-mm-side.t-sell { color: var(--sell); }
.adm-mm-num { font-variant-numeric: tabular-nums; font-weight: 650; }
.adm-mm-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
/* 컬럼 헤더 안 ▼ 필터 - 공용 select 규칙(.adm-root select)보다 특정성이 높아야 크기가 먹는다 */
.adm-mm-th { display: inline-flex; align-items: center; gap: 6px; }
.adm-root select.adm-mm-thsel {
  font-size: 11.5px; font-weight: 650; color: var(--ink-2);
  height: 23px; border-radius: 6px;
  padding-left: 7px; padding-right: 22px !important;
  background-position: right 5px center; background-size: 11px;
}
/* 모달 상단 요약 카드 */
.adm-mm-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.adm-mm-card {
  background: #fafbfc; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.adm-mm-clabel { font-size: 11px; font-weight: 700; color: var(--muted); }
.adm-mm-cval {
  font-size: 13px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 후보 목록(모달 안 스크롤 영역) */
.adm-mm-listscroll { overflow: auto; max-height: 264px; }
.adm-mm-row { cursor: pointer; }
.adm-mm-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.adm-mm-row.on:hover { background: #e4eeff; }
/* 특수 매칭(G·Z) */
.adm-mm-special { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-mm-specbtn {
  font: inherit; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--ink);
  transition: background 0.1s, border-color 0.1s;
}
.adm-mm-specbtn:hover:not(:disabled) { background: #f6f9ff; border-color: #b9cffa; }
.adm-mm-specbtn.on { background: var(--brand-soft); border-color: var(--brand); }
.adm-mm-specbtn.on .adm-mm-specname { color: var(--brand); }
.adm-mm-specbtn:disabled { background: #f4f5f7; border-color: var(--line); color: #8e97a5; cursor: not-allowed; }
.adm-mm-specname { font-size: 14px; font-weight: 800; }
.adm-mm-specdesc { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.adm-mm-specbtn:disabled .adm-mm-specdesc { color: #8e97a5; }
/* 하단 합계 */
.adm-mm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.adm-mm-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.adm-mm-stat.tone-blue { background: var(--brand-soft); border-color: #c4d8fb; }
.adm-mm-stat.tone-green { background: var(--ok-bg); border-color: #b9dfc8; }
.adm-mm-sval { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.adm-mm-stat.tone-blue .adm-mm-sval { color: var(--brand-ink); }
.adm-mm-stat.tone-green .adm-mm-sval { color: var(--ok); }
/* 2단 확인 */
.adm-mm-confirm { border: 1px solid var(--line-strong); border-radius: 10px; padding: 13px 15px; background: #fff; }
.adm-mm-ctitle { font-size: 13.5px; font-weight: 750; margin: 0 0 4px; }
.adm-mm-crows { display: flex; flex-direction: column; gap: 5px; }
.adm-mm-crow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: var(--muted);
}
.adm-mm-crow b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-mm-crow b.tone-blue { color: var(--brand-ink); }
.adm-mm-crow b.tone-green { color: var(--ok); }
.adm-mm-crow.last { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 7px; }
.adm-amount-input {
  font: inherit; font-size: 12.5px; width: 128px; text-align: right;
  padding: 5px 8px; border: 1px solid var(--field-border); border-radius: 7px;
  font-variant-numeric: tabular-nums; background: #fff; color: var(--ink);
}
.adm-amount-input:focus { outline: none; border-color: var(--brand); }
.adm-checkrow {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.adm-checkrow input[type="checkbox"] { accent-color: var(--brand); width: 14px; height: 14px; }

/* ── 간격 유틸(B6 디자인 패스 - 인라인 스타일 승격) ───────────────── */
.adm-stack { gap: 16px; }
.adm-mt8 { margin-top: 8px; }
.adm-mt14 { margin-top: 14px; }
.adm-m0 { margin: 0; }
.adm-mb8 { margin: 0 0 8px; }
.adm-mb12 { margin: 0 0 12px; }
.adm-mb18 { margin: 0 0 18px; }
.adm-secgap { margin: 8px 0 16px; }
.adm-ml6 { margin-left: 6px; }

/* ── 금액 변동 부호(B2 - 정산가능/보증금 변동 기록. 시안 관례: 감소 적색·증가 강조) ── */
.adm-delta-neg { color: var(--danger); font-variant-numeric: tabular-nums; }
.adm-delta-pos { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ── 알림 벨 + 드롭다운 + 미확인 업무 스택 (B3 - 정본 §7) ─────────── */
.adm-bellwrap { position: relative; display: flex; align-items: center; }
.adm-bellbtn {
  position: relative; width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.adm-bellbtn:hover { background: #f1f3f6; color: var(--ink); }
.adm-bellbadge {
  position: absolute; top: -6px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700;
  line-height: 17px; text-align: center; border: 2px solid var(--panel);
  animation: adm-bellblink 1.6s ease-in-out infinite;
}
@keyframes adm-bellblink { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.adm-bellbackdrop { position: fixed; inset: 0; z-index: 60; background: none; border: none; cursor: default; }
.adm-belldrop {
  position: absolute; top: 40px; right: 0; z-index: 61; width: 360px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.07), 0 18px 44px rgba(16, 24, 40, 0.11);
}
.adm-belldrop-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.adm-belldrop-count { color: var(--danger); font-size: 12px; font-weight: 650; }
.adm-belldrop-tools { margin-left: auto; display: flex; gap: 10px; }
.adm-belldrop-list { max-height: 420px; overflow-y: auto; }
.adm-bellempty { padding: 26px 0; text-align: center; color: var(--faint); font-size: 12.5px; }
.adm-bellitem {
  display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; cursor: pointer;
  background: none; border: none; border-bottom: 1px solid var(--line); font: inherit; color: var(--ink);
  align-items: flex-start;
}
.adm-bellitem:last-child { border-bottom: none; }
.adm-bellitem:hover { background: #f7f8fa; }
.adm-bellitem.unread { background: var(--brand-soft); }
.adm-bellitem.unread:hover { background: #e4eeff; }
.adm-bellicon {
  flex: none; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px;
}
.adm-bellicon.g-high { background: var(--danger); }
.adm-bellicon.g-medium { background: #8a5a12; }
.adm-bellicon.g-low { background: var(--brand); }
.adm-bellitem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-bellitem-title { display: flex; gap: 8px; align-items: baseline; }
.adm-bellitem-title .t {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-bellitem-title .ago { flex: none; font-size: 11px; color: var(--faint); }
.adm-bellitem-body {
  font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-belldot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 6px; }

.adm-notifstack { position: fixed; top: 58px; right: 16px; z-index: 55; width: 320px; display: flex; flex-direction: column; gap: 6px; }
.adm-notifstack-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--danger); color: #fff; border-radius: 9px; padding: 8px 12px; font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(199, 58, 49, 0.28);
}
.adm-notifstack-head button {
  font: inherit; font-size: 11.5px; color: #fff; background: rgba(255, 255, 255, 0.16);
  border: none; border-radius: 6px; padding: 3px 8px; cursor: pointer; margin-left: 6px;
}
.adm-notifstack-head button:hover { background: rgba(255, 255, 255, 0.28); }
.adm-notifstack-card {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; cursor: pointer; font: inherit;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; padding: 10px 12px;
  box-shadow: 0 3px 8px rgba(16, 24, 40, 0.06), 0 12px 28px rgba(16, 24, 40, 0.09); color: var(--ink);
}
.adm-notifstack-card:hover { border-color: var(--brand); }
.adm-notifstack-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-notifstack-text .t { font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-notifstack-text .b { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-notifstack-more {
  font: inherit; font-size: 12px; color: var(--brand); background: var(--panel);
  border: 1px dashed var(--line-strong); border-radius: 9px; padding: 7px 0; cursor: pointer;
}
.adm-notifstack-more:hover { border-color: var(--brand); }
.adm-sec-sub { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.adm-sec-sub > summary { font-size: 12.5px; font-weight: 650; cursor: pointer; color: var(--ink-2); }
.adm-sec-sub > summary:hover { color: var(--brand); }
.adm-sec-subbody { padding: 12px 2px 6px; }

/* ═══════════════════════════════════════════════════════════════════
   콘솔 디자인 시스템 v2 (M8 전면 개편) - 네이티브 폼 컨트롤 전면 제거 + 깊이 정돈.
   원칙 유지: 라이트 단일·그라데이션/이모지 금지·정보 밀도 우선.
   v2 추가: ①select/checkbox/radio 커스텀(브라우저 기본 모양 금지) ②카드·표 미세 그림자
   ③스크롤바 정돈 ④버튼 포커스 링. 마크업 무변경 - 공용 계층에서만 올린다.
   ═══════════════════════════════════════════════════════════════════ */

/* ── select 커스텀(기본 화살표 제거 + 셰브론) ─────────────────────── */
.adm-root select, .adm-login-page select {
  appearance: none; -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6472' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 13px;
  padding-right: 27px !important;
  border: 1px solid var(--field-border); border-radius: 7px;
  font: inherit; font-size: 13.5px; color: var(--ink);
  height: 34px; padding-left: 9px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s;
}
.adm-root select:hover { background-color: #fafbfc; }
.adm-root select:focus, .adm-login-page select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 91, 215, 0.1);
}
.adm-root select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── checkbox 커스텀 ──────────────────────────────────────────────── */
.adm-root input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; flex: none; margin: 0;
  border: 1.5px solid var(--field-border); border-radius: 4px; background: #fff;
  cursor: pointer; display: inline-grid; place-content: center;
  transition: background 0.1s, border-color 0.1s;
  vertical-align: -2px;
}
.adm-root input[type="checkbox"]:hover { border-color: var(--brand); }
.adm-root input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.adm-root input[type="checkbox"]:checked::before {
  content: "";
  width: 9px; height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5 10-11'/%3E%3C/svg%3E") center / contain no-repeat;
}
.adm-root input[type="checkbox"]:focus-visible { outline: 2px solid rgba(27, 91, 215, 0.45); outline-offset: 1px; }
.adm-root input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── radio 커스텀(.adm-seg 내부 숨김 라디오는 제외 - 칩 UI가 상태 표현) ── */
.adm-root input[type="radio"]:not(.adm-seg *) {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; flex: none; margin: 0;
  border: 1.5px solid var(--field-border); border-radius: 50%; background: #fff;
  cursor: pointer; display: inline-grid; place-content: center;
  transition: border-color 0.1s;
  vertical-align: -2px;
}
.adm-root input[type="radio"]:not(.adm-seg *):hover { border-color: var(--brand); }
.adm-root input[type="radio"]:not(.adm-seg *):checked { border-color: var(--brand); border-width: 1.5px; }
.adm-root input[type="radio"]:not(.adm-seg *):checked::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}
.adm-root input[type="radio"]:not(.adm-seg *):focus-visible { outline: 2px solid rgba(27, 91, 215, 0.45); outline-offset: 1px; }

/* ── textarea 정돈 ────────────────────────────────────────────────── */
.adm-root textarea { font: inherit; resize: vertical; min-height: 60px; }
.adm-root textarea.adm-text-input { line-height: 1.6; }

/* ── 깊이(미세 그림자 - 평면 유지·떠 있는 느낌만) ─────────────────── */
.adm-card, .adm-tablewrap, .adm-widget, .adm-sec-card, .adm-filter {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.adm-login-card { box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.07); }

/* ── 버튼 포커스·프레스 ───────────────────────────────────────────── */
.adm-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(27, 91, 215, 0.28); }
.adm-btn:active:not(:disabled) { filter: brightness(0.96); }
.adm-btn.danger:hover { background: #b02f27; border-color: #b02f27; }

/* ── 스크롤바 정돈(webkit - 콘솔은 PC 크롬 계열 전제) ─────────────── */
.adm-root ::-webkit-scrollbar { width: 10px; height: 10px; }
.adm-root ::-webkit-scrollbar-thumb { background: #d3d8df; border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
.adm-root ::-webkit-scrollbar-thumb:hover { background: #b9c0ca; border: 2px solid transparent; background-clip: padding-box; }
.adm-root ::-webkit-scrollbar-track { background: transparent; }

/* ── 표 내 숫자 열 가독(행 간 미세 줄무늬 없이 hover만 - v1 유지) ──── */
.adm-table td { font-variant-numeric: tabular-nums; }

/* ── 차트(통계 - 서버 렌더 SVG. 외부 라이브러리 불용) ─────────────── */
.adm-chartcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  padding: 14px 16px 10px; margin: 0 0 14px;
}
.adm-chartcard .adm-chart-title { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.adm-chartcard .adm-chart-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.adm-chart-svg { display: block; width: 100%; height: auto; }
.adm-chart-legend { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin: 6px 2px 2px; flex-wrap: wrap; }
.adm-chart-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ── 알림 설정(B3 이월) ── */
.adm-notif-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.adm-soundgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 4px; }
.adm-soundbtn {
  font: inherit; font-size: 12px; padding: 6px 4px; border: 1px solid var(--line-strong);
  border-radius: 7px; background: #fff; color: var(--ink-2); cursor: pointer;
}
.adm-soundbtn:hover { border-color: var(--brand); }
.adm-soundbtn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.adm-soundbtn:disabled { opacity: 0.45; cursor: not-allowed; }
.adm-slider { width: 100%; accent-color: var(--brand); margin: 2px 0; }
.adm-notif-kinds { display: flex; flex-direction: column; gap: 9px; }
.adm-notif-kind { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.adm-notif-kind input { accent-color: var(--brand); }
.adm-notif-kind .g { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ── v3(검수 반영): 플레이스홀더 대비 명시 ── */
.adm-root ::placeholder, .adm-login-page ::placeholder { color: #6a7381; opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════
   라이브챗 - 상담 문의(F4-⑤). 콘솔 축(고정 높이 + 내부 스크롤).
   회원 웹(m.css)에도 같은 클래스 이름의 회원 축 규칙이 따로 있다(두 파일은 함께 로드되지 않는다).
   ═══════════════════════════════════════════════════════════════════ */

/* 상태 탭(열림/종료/전체) */
.chat-tabs { display: flex; gap: 6px; align-items: center; margin: 0 0 14px; }
.chat-tab {
  font-size: 13px; font-weight: 650; padding: 6px 15px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chat-tab:hover { background: #f1f3f6; }
.chat-tab.on { background: var(--brand-soft); border-color: #b9cffa; color: var(--brand); font-weight: 700; }

/* 스레드 상세(목록 아래) */
.chat-detail {
  margin: 18px 0 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.chat-detail-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 15px; border-bottom: 1px solid var(--line);
}
.chat-detail-title { font-size: 14px; font-weight: 750; }
.chat-detail-meta { font-size: 12.5px; color: var(--muted); }
.chat-detail-meta b { color: var(--ink); font-weight: 700; }
.chat-detail-close { margin-left: auto; display: inline-flex; align-items: center; text-decoration: none; }

/* 패널 골격 */
.chat-panel { display: flex; flex-direction: column; min-height: 0; }
.chat-panel.chat-console { height: 520px; }
.chat-bar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 7px 15px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.chat-conn { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.chat-conn.on { color: var(--ok); }
.chat-conn.off { color: var(--warn); }
.chat-conn.done { color: var(--faint); }
.chat-closebtn {
  margin-left: auto; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer;
  height: 28px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  transition: background 0.12s, border-color 0.12s;
}
.chat-closebtn:hover:not(:disabled) { background: #f1f3f6; border-color: var(--danger); color: var(--danger); }
.chat-closebtn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 대화 영역 */
.chat-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; background: #fff;
  padding: 14px 15px; display: flex; flex-direction: column; gap: 8px;
}
.chat-empty { margin: auto; font-size: 12.5px; color: var(--faint); }
.chat-row { display: flex; align-items: flex-end; gap: 6px; max-width: 72%; }
.chat-row.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-row.you { align-self: flex-start; }
.chat-bubble {
  padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-row.me .chat-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.chat-row.you .chat-bubble { background: #f1f5f9; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-time { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chat-sys {
  align-self: center; max-width: 80%; text-align: center;
  font-size: 12px; color: var(--muted); background: #f6f7f9;
  border-radius: 999px; padding: 3px 12px;
}
.chat-err {
  flex: none; padding: 8px 15px; font-size: 12.5px;
  background: var(--danger-bg); border-top: 1px solid #f2c1bc; color: #7f2620;
}

/* 입력줄 */
.chat-compose {
  flex: none; border-top: 1px solid var(--line); background: #fafbfc;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.chat-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-preset {
  font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.chat-preset:hover:not(:disabled) { background: var(--brand-soft); border-color: #b9cffa; color: var(--brand); }
.chat-preset:disabled { opacity: 0.55; cursor: not-allowed; }
.chat-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.chat-preset-group {
  font: inherit; font-size: 12.5px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid #d6dae1; background: #fff; color: var(--ink-2); max-width: 100%;
}
.chat-macroonly-note { font-size: 12px; color: var(--ink-3, #8a93a3); padding: 4px 2px; }

/* 상용구 2축 선택 + 상황 태그(2026-07-31 UI 개편 v2 - 층위별 문법 분리:
   역할=슬레이트 세그먼트 / 상황=밑줄 탭 / 상용구=pill 버튼 / 태그=무배경 메타 텍스트) */
.chat-preset-axes { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-bottom: 4px; }
.chat-role-seg { display: flex; border: 1px solid #cbd5e1; border-radius: 9px; overflow: hidden; width: fit-content; }
.chat-role-btn {
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 14px;
  border: none; background: #fff; color: #7c8798;
}
.chat-role-btn + .chat-role-btn { border-left: 1px solid #cbd5e1; }
.chat-role-btn.on { background: #334155; color: #fff; }
.chat-sit-chips {
  display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid #e7ecf3;
}
.chat-sit-chips::-webkit-scrollbar { display: none; }
.chat-sit-chip {
  font: inherit; font-size: 12.5px; cursor: pointer; padding: 8px 10px 7px; white-space: nowrap;
  border: none; background: none; color: #8a93a3;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.chat-sit-chip.on { color: #0f172a; font-weight: 800; border-bottom-color: #0f172a; }
.chat-bubblecol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-row.me .chat-bubblecol { align-items: flex-end; }
.chat-row.you .chat-bubblecol { align-items: flex-start; }
.chat-preset-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; color: #93a1b5;
  padding: 0 4px; background: none; border: none;
}

/* 상용구 인라인 관리 v2(2026-07-31 관리자 - 본사 상담 채팅 톱니. 목록/추가 섹션 분리, 버튼 소형 고정) */
.chat-preset-gear { color: var(--ink-3, #8a93a3); border-style: dashed; }
.chat-preset-settings {
  border: 1px solid #dbe3ee; border-radius: 12px; background: #fff;
  padding: 12px 14px; margin-bottom: 6px; max-height: 340px; overflow-y: auto;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.chat-ps-head {
  display: flex; align-items: baseline; gap: 8px; font-size: 13px;
  padding-bottom: 8px; border-bottom: 1px solid #eef1f5; margin-bottom: 4px;
}
.chat-ps-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid #f2f4f8;
}
.chat-ps-row.off .chat-ps-text { opacity: 0.5; }
.chat-ps-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-ps-text b { font-size: 13px; }
.chat-ps-body {
  font-size: 12px; color: var(--ink-3, #8a93a3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-ps-acts { flex: none; display: flex; align-items: center; gap: 4px; }
.chat-ps-acts .adm-btn, .chat-ps-btn {
  font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid #cbd5e1; background: #fff; color: var(--ink-2); white-space: nowrap;
}
.chat-ps-acts .adm-btn.danger { background: #fff; color: #c02626; border-color: #e5b9b9; }
.chat-ps-acts .adm-actbox { flex-direction: row; align-items: center; gap: 4px; }
.chat-ps-btn.add { border-style: dashed; color: var(--brand, #2563eb); border-color: #b9cffa; }
.chat-ps-addwrap { padding-top: 10px; }
.chat-preset-editform { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; width: 100%; }

/* 채팅 표시 언어 전환(한/EN - 회원 매크로 문구 표시만 전환, 저장은 한국어) */
.chat-lang-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.chat-lang-btn {
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 10px;
  border: none; background: #fff; color: #8a93a3;
}
.chat-lang-btn + .chat-lang-btn { border-left: 1px solid #cbd5e1; }
.chat-lang-btn.on { background: #334155; color: #fff; }

/* 지급 확인 대기 방향색(2026-07-31 6차 7번): 충전=연한 파랑, 환전 부분완료(환불)=연한 빨강 */
.adm-table tr.row-charge td { background: #eef5ff; }
.adm-table tr.row-refund td { background: #fdeeee; }
/* 챗 사진 첨부(2026-07-29 R2) */
.chat-cam {
  flex: 0 0 auto; border: 1px solid var(--line, #d6dbe4); background: #fff;
  border-radius: 10px; padding: 8px 10px; font-size: 16px; line-height: 1; cursor: pointer;
}
.chat-cam:disabled { opacity: 0.5; cursor: default; }
/* 사진 전송 전 확인 + 모달 뷰어(2026-07-29 관리자 지시) */
.chat-imgconfirm {
  display: flex; gap: 10px; align-items: center; margin-bottom: 8px;
  padding: 8px; border: 1px solid var(--line, #d6dbe4); border-radius: 10px; background: #f8fafc;
}
.chat-imgconfirm img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #e2e8f0; flex: 0 0 auto;
}
.chat-imgconfirm-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chat-imgconfirm-q { font-size: 13px; color: #334155; }
.chat-imgconfirm-btns { display: flex; gap: 6px; }
.chat-img { cursor: zoom-in; }
.chat-viewer {
  position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.82);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.chat-viewer img {
  max-width: min(92vw, 1100px); max-height: 86vh; border-radius: 10px; background: #fff;
  cursor: default; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.chat-viewer-close {
  position: absolute; top: 16px; right: 16px; border: 0; border-radius: 999px;
  padding: 8px 14px; background: rgba(255, 255, 255, 0.92); font-size: 13px; cursor: pointer;
}

.chat-img {
  display: block; max-width: 220px; max-height: 260px; border-radius: 8px;
  margin: 2px 0 4px; object-fit: cover; background: #f1f5f9;
}

.adm-root textarea.chat-input {
  flex: 1 1 auto; font: inherit; font-size: 13.5px; line-height: 1.5;
  padding: 8px 11px; border: 1px solid var(--field-border); border-radius: 8px;
  background: #fff; color: var(--ink); resize: none; min-height: 44px; max-height: 120px;
}
.adm-root textarea.chat-input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 91, 215, 0.1);
}
.chat-send {
  flex: none; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  height: 44px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff;
  transition: background 0.12s, border-color 0.12s;
}
.chat-send:hover:not(:disabled) { background: #1449b0; border-color: #1449b0; }
.chat-send:disabled { background: #eef0f4; border-color: #dcdfe6; color: #6b7483; cursor: not-allowed; }
.chat-locked {
  flex: none; border-top: 1px solid var(--line); background: #fafbfc;
  padding: 12px 15px; text-align: center; font-size: 12.5px; color: var(--muted);
}

/* ── 상담 개입(F4-⑤b): 발신 콘솔 구분 · 협의 채널 2분할 · 잠금 ──────────
   회원 화면에는 아무것도 적용되지 않는다(구분 자체가 회원에게 존재하지 않는다). */

/* 다른 콘솔이 보낸 말풍선 - 진한 녹색 + 발신처 라벨(파랑=내 것, 회색=회원과 구분) */
.chat-row.other .chat-bubble { background: #166534; color: #fff; }
.chat-scope {
  display: block; font-size: 11px; font-weight: 700; line-height: 1.4;
  color: rgba(255, 255, 255, 0.82); margin-bottom: 2px; letter-spacing: 0.01em;
}

/* 개입 잠금 배너(가맹점의 회원 상담 패널) */
.chat-lockbar {
  flex: none; padding: 9px 15px; font-size: 12.5px; font-weight: 650;
  background: var(--danger-bg); border-top: 1px solid #f2c1bc; color: #7f2620;
}

/* 개입 배지(목록·헤더 공용) */
.adm-badge.b-intervene { background: var(--danger-bg); color: var(--danger); }

/* 헤더의 개입 조작부(2단 확인) */
.chat-intervene { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-intervene .adm-btn { height: 30px; padding: 0 13px; font-size: 13px; border-radius: 6px; }
.chat-intervene-err { font-size: 12px; color: var(--danger); }

/* 목록의 협의 신호 */
.chat-titlecell { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chat-staffmark { font-size: 12px; font-weight: 700; color: #166534; }

/* 회원 상담 + 협의 채널 2분할(좁으면 세로 스택) */
.chat-split { margin: 18px 0 0; display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.chat-split.two { grid-template-columns: 1fr 1fr; }
.chat-split .chat-detail { margin: 0; }
@media (max-width: 1279px) {
  .chat-split.two { grid-template-columns: 1fr; }
}
/* 협의 패널 - 연녹 머리띠로 회원 상담과 헷갈리지 않게 */
.chat-staff { border-color: #bfe0c8; }
.chat-detail-head.staff { background: #eef7f0; border-bottom-color: #bfe0c8; }
.chat-detail-head.staff .chat-detail-title { color: #14532d; }
.chat-detail-head.staff .chat-detail-meta { color: #3f6b4c; }

/* ── 주문 기준 누적 내역: 행 펼침 + 매칭자 카드 (7차 1·2·3번, 시안 2-1) ──
   본사 [실시간 내역]·가맹점 [입금/출금 관리] 공용. 표 자체는 .adm-table 그대로 쓰고
   펼침 줄(.ord-detail)에서만 줄바꿈·여백을 푼다. */
.adm-table tr.ord-row { cursor: pointer; }
.ord-togglebtn {
  border: 0; background: none; color: var(--brand); cursor: pointer;
  font-size: 12px; line-height: 1; padding: 2px 4px;
}
.adm-table tr.ord-detail > td {
  background: #f7f9fc; white-space: normal; padding: 12px 14px;
}
.ord-nodetail { color: var(--muted); font-size: 12.5px; }
.ord-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.ord-card {
  flex: 0 1 300px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
}
.ord-card-head {
  background: #eef1f6; color: var(--ink-2); font-size: 12px; font-weight: 700;
  padding: 6px 11px; border-bottom: 1px solid var(--line);
}
.ord-card-body { padding: 9px 11px; font-size: 12.5px; line-height: 1.6; }
.ord-card-peer { margin-bottom: 3px; }
.ord-card-amt { margin-bottom: 7px; font-weight: 650; }
.ord-card-log {
  list-style: none; margin: 0; padding: 7px 0 0;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.ord-card-log li { padding: 1px 0; }
/* 금액 범위 입력: 검색어 칸(220px)보다 좁게 + 최소·최대가 줄바꿈으로 갈라지지 않게 한 묶음 */
.adm-filter input[type="text"].ord-amt { width: 96px; }
.adm-filter .ord-amtrange { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); }

/* 총판 리스트 압축(2026-07-31 관리자 - 가로 스크롤 없이 한 줄) */
.dist-table { font-size: 13px; }
.dist-table th, .dist-table td { padding: 7px 8px; }
.dist-table td { vertical-align: top; }
.dist-sub { font-size: 11.5px; margin-top: 2px; }
.dist-usdt {
  display: inline-block; max-width: 100px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; font-size: 12px;
}
.dist-acts { display: flex; gap: 4px; justify-content: center; align-items: flex-start; }
.dist-acts .adm-btn { width: auto; padding: 4px 10px; font-size: 12px; white-space: nowrap; height: auto; }
/* 확인 단계 박스도 총판 표 안에서는 폭 제한(전역 규칙은 admin 공통 .adm-actbox 참조) */
.dist-acts .adm-actbox:has(.adm-note, .adm-banner) { min-width: 0; max-width: 240px; padding: 8px 9px; }

/* ── 총판 포털 전용(dp-*, 2026-07-31 8차 7-2) - /d 탭 셸·자동 갱신 줄·거래 구분 칩.
   기존 adm-* 클래스는 그대로 재사용하고, 여기 없는 것만 추가한다(기존 규칙 수정 금지). */
.dp-tabbar {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 0 24px; display: flex; position: sticky; top: 50px; z-index: 4;
}
.dp-tabs { display: flex; gap: 2px; }
.dp-tab {
  padding: 10px 18px; font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  text-decoration: none; line-height: 1.4;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: 7px 7px 0 0; transition: background 0.12s, color 0.12s;
}
.dp-tab:hover { background: #f1f4f9; color: var(--ink); }
.dp-tab.active { color: var(--brand); background: var(--brand-soft); border-bottom-color: var(--brand); font-weight: 750; }
/* 자동 갱신 줄 - [새로고침] 버튼 + 안내 문구 */
.dp-live { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.dp-live .adm-btn { width: auto; }
.dp-live-note { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
/* 거래 구분 칩(충전=파랑·환전=적색 - 국내 금융 관례. 기존 .adm-kind 팔레트에는 방향색이 없다) */
.dp-kind {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px;
  border-radius: 4px; line-height: 1.45; letter-spacing: 0.02em;
}
.dp-kind.buy { background: #e8f1fd; color: var(--buy); }
.dp-kind.sell { background: var(--danger-bg); color: var(--sell); }

/* ── 계정 권한 트리(acct-tree-*, 2026-08-01 관리자 확정 - 그룹 카드형)
   [본사 계정 설정] 직원 권한을 사이드바 그룹(nav.ts 정본)별 카드로 펼쳐 체크한다.
   기존 adm-* 는 그대로 재사용하고 여기 없는 것만 추가한다(기존 규칙 수정 금지). */
.acct-tree { display: flex; flex-direction: column; gap: 9px; }
.acct-tree-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-tree-bar .adm-btn { height: 28px; padding: 0 12px; font-size: 12.5px; }
.acct-tree-count {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; margin-right: auto;
}
/* 2열(좁으면 1열). 카드 높이가 제각각이라 grid 대신 컬럼 흐름으로 채운다(빈 칸 없이 위로 붙는다). */
.acct-tree-grid { column-count: 2; column-gap: 10px; }
@media (max-width: 1180px) { .acct-tree-grid { column-count: 1; } }
.acct-tree-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
  break-inside: avoid; width: 100%; margin: 0 0 10px;
}
.acct-tree-ghead {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  background: #f8f9fb; border-bottom: 1px solid var(--line);
}
.acct-tree-ghead:hover { background: #f1f4f9; }
.acct-tree-gname { font-size: 13px; font-weight: 750; color: var(--ink); }
.acct-tree-gcount {
  margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
/* 하위가 일부만 부여된 상태 - 체크 표시 대신 가로줄(부분 선택) */
.acct-tree-ghead input[type="checkbox"]:indeterminate { background: var(--brand); border-color: var(--brand); }
.acct-tree-ghead input[type="checkbox"]:indeterminate::before {
  content: ""; width: 9px; height: 2px; border-radius: 1px; background: #fff;
}
.acct-tree-items { list-style: none; margin: 0; padding: 3px 0 5px; }
/* min-height 는 [조회|편집] 세그가 붙은 줄 높이에 맞춘다 - 체크할 때 줄이 밀리지 않게. */
.acct-tree-item { display: flex; align-items: center; gap: 8px; padding: 3px 12px; min-height: 31px; }
.acct-tree-item:hover { background: #f7f9fc; }
.acct-tree-iname {
  display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
}
.acct-tree-item.on .acct-tree-iname { color: var(--ink); font-weight: 650; }
.acct-tree-seg {
  margin-left: auto; flex: none; display: inline-flex;
  border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden;
}
.acct-tree-segbtn {
  appearance: none; border: none; background: #fff; color: var(--muted);
  font: inherit; font-size: 11.5px; font-weight: 650; line-height: 1.6;
  padding: 2px 10px; cursor: pointer; transition: background 0.1s, color 0.1s;
}
.acct-tree-segbtn + .acct-tree-segbtn { border-left: 1px solid var(--line-strong); }
.acct-tree-segbtn:hover:not(:disabled) { background: #f1f4f9; color: var(--ink-2); }
.acct-tree-segbtn.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 750; }
.acct-tree-segbtn:disabled { cursor: not-allowed; color: #9aa3b0; background: #f4f5f7; }
