:root {
  /* KEEN 로고 색: 검정 + 주황 */
  --brand: #ff6d00;          /* 로고 주황 */
  --brand-dark: #c24e00;     /* 밝은 배경 위 주황 글자 (읽기 쉽게 한 단계 진하게) */
  --brand-soft: #fff1e6;     /* 연한 주황 배경 */
  --primary: #111111;        /* 기본 버튼 · 강조 (로고 검정) */
  --primary-press: #000000;
  --text: #111111;
  --sub: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --error: #dc2626;
  --radius: 8px;            /* 로고처럼 각진 느낌 */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
.page {
  min-height: 100dvh;
  max-width: 412px;   /* 갤럭시 S26(360px) 기준, S26+/Ultra(412px)까지 */
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 20px);
  display: flex;
  flex-direction: column;
}
.top-bar { height: 44px; display: flex; align-items: center; margin-bottom: 8px; }
.back-btn {
  width: 44px; height: 44px; margin-left: -10px;
  border: none; background: none; font-size: 24px; color: var(--text);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.header { margin: 28px 0 28px; }
.header.center { text-align: center; }
.header.compact { margin: 8px 0 28px; }
.logo {
  width: 56px; height: 56px; border-radius: 10px; background: var(--primary);
  color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.logo-img { display: block; width: 140px; height: auto; margin: 0 auto 28px; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.35; }
.header p { margin-top: 8px; color: var(--sub); font-size: 15px; }

form { display: flex; flex-direction: column; gap: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.input-wrap { position: relative; }
input[type=text], input[type=email], input[type=password], input[type=tel] {
  width: 100%; height: 52px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; /* 16px 미만이면 iOS에서 자동 확대됨 */
  color: var(--text); background: #fff; outline: none;
  transition: border-color .15s;
}
.input-wrap input { padding-right: 56px; }
input:focus { border-color: var(--brand); }
.field.invalid input { border-color: var(--error); }
.error-msg { display: none; color: var(--error); font-size: 13px; margin-top: 6px; }
.field.invalid .error-msg { display: block; }
.required-note { color: var(--error); font-weight: 400; font-size: 13px; }
.optional { color: var(--sub); font-weight: 400; }
.hint { color: var(--sub); font-size: 13px; margin-top: 6px; }
.field.invalid .hint { display: none; }
.toggle-pw {
  position: absolute; right: 4px; top: 4px; height: 44px; padding: 0 12px;
  border: none; background: none; color: var(--sub); font-size: 13px;
}

.row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--sub); min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.link { color: var(--brand-dark); text-decoration: none; font-weight: 600; }

.btn {
  width: 100%; height: 54px; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-press); }
.btn-primary:disabled { background: #c7d2fe; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--line); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--sub); font-size: 13px; margin: 28px 0 18px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: flex; flex-direction: column; gap: 10px; }
.btn-kakao { background: #fee500; color: #191919; }
.btn-naver { background: #03c75a; color: #fff; }

.footer { margin-top: auto; padding-top: 32px; text-align: center; font-size: 14px; color: var(--sub); }

.terms { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; }
.field.invalid .terms { border-color: var(--error); }
.terms .check { font-size: 14px; color: var(--text); }
.terms .all { font-weight: 600; border-bottom: 1px solid var(--line); }

.sticky-bottom { margin-top: auto; padding-top: 24px; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 32px);
  transform: translateX(-50%) translateY(20px); opacity: 0;
  background: rgba(17,24,39,.92); color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; transition: all .25s; pointer-events: none; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 메인 화면 ── */
/* 메인 화면은 한 화면(스크롤 없이)에 모두 표시 */
.main-page {
  gap: 12px;
  height: 100dvh; min-height: 0; overflow: hidden;
  padding-top: calc(env(safe-area-inset-top) + 12px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}
.main-top { justify-content: space-between; margin-bottom: 0; }
.logo-small { height: 32px; width: auto; }
.text-btn { border: none; background: none; color: var(--sub); font-size: 14px; min-height: 44px; padding: 0 4px; }

.user-card { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; flex-shrink: 0; }
.user-card-title { font-size: 13px; font-weight: 600; color: var(--sub); margin-bottom: 8px; }
.user-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.user-grid dt { font-size: 12px; color: var(--sub); }
.user-grid dd { font-size: 15px; font-weight: 600; margin-top: 2px; word-break: break-all; }

.menu-grid {
  flex: 1; min-height: 0;               /* 남은 화면 높이 안에서 6개 버튼을 나눠 배치 */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 480px;                    /* 큰 화면에서 버튼이 너무 커지지 않게 */
}
.menu-btn {
  border: none; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1.3;
  padding: 8px; word-break: keep-all; cursor: pointer; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-icon { width: clamp(32px, 7dvh, 52px); height: clamp(32px, 7dvh, 52px); flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.menu-btn:active { background: var(--primary-press); }
.menu-btn.empty { background: #f3f4f6; border: 1px dashed var(--line); cursor: default; }

[hidden] { display: none !important; }

/* ── 약관 보기 ── */
.term-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.view-btn { border: none; background: none; color: var(--sub); font-size: 13px; text-decoration: underline; min-height: 44px; padding: 0 4px; flex-shrink: 0; }

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; max-height: 85dvh;
  background: #fff; border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column;
  animation: sheet-up .25s ease-out;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; font-weight: 700; }
.sheet-close { width: 44px; height: 44px; margin-right: -10px; border: none; background: none; font-size: 28px; color: var(--sub); }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 20px; font-size: 14px; line-height: 1.7; color: #374151; }
.sheet-body h3 { font-size: 15px; color: var(--text); margin: 18px 0 6px; }
.sheet-body h3:first-child { margin-top: 0; }
.sheet-body p { margin-bottom: 8px; }
.term-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.term-table th, .term-table td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.term-table th { width: 32%; background: #f9fafb; font-weight: 600; }
.term-date { margin-top: 16px; color: var(--sub); font-size: 13px; }
.sheet-foot { padding: 12px 20px calc(env(safe-area-inset-bottom) + 12px); border-top: 1px solid var(--line); }
body.no-scroll { overflow: hidden; }

/* ── 매출 조회 화면 ── */
.sales-page { gap: 16px; }
.page-title { font-size: 18px; font-weight: 700; margin-left: 4px; }
.filter-card { background: #f9fafb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px; gap: 12px; }
.filter-row { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--sub); }
.date-range { display: flex; align-items: center; gap: 4px; }
.date-range input { padding: 0 8px; font-size: 15px; }
.date-range input, .filter-card select {
  flex: 1; min-width: 0; height: 48px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; color: var(--text); background: #fff; font-family: inherit;
}
.filter-card select { flex: none; width: 100%; -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.filter-card select:disabled { background-color: #f3f4f6; color: var(--text); opacity: 1; -webkit-text-fill-color: var(--text); font-weight: 600; }   /* 매장사용자: 본인 매장을 또렷하게 표시 */
.tilde { color: var(--sub); }
.quick-range { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-range button { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: #fff; font-size: 13px; color: var(--text); }
.quick-range button:active { background: var(--brand-soft); border-color: var(--brand); }
.filter-note { font-size: 12px; color: var(--sub); margin-top: -6px; }

.empty-msg { text-align: center; color: var(--sub); font-size: 14px; padding: 40px 0; }
.summary-card { background: var(--primary); color: #fff; border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.summary-head { font-size: 13px; opacity: .85; margin-bottom: 8px; }
.summary-main { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.25); }
.summary-main strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.summary-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; }
.summary-subs div { display: flex; flex-direction: column; gap: 2px; }
.summary-subs span { font-size: 12px; opacity: .85; }
.summary-subs strong { font-size: 16px; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { background: #f9fafb; font-size: 12px; color: var(--sub); font-weight: 600; position: sticky; top: 0; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tfoot td { font-weight: 700; background: #f9fafb; border-bottom: none; }

.sales-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sales-list li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.sales-name { font-size: 15px; font-weight: 600; margin-bottom: 8px; word-break: break-all; }
.sales-main { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px dashed var(--line); }
.sales-main span { font-size: 13px; color: var(--sub); }
.sales-main strong { font-size: 17px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.sales-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.sales-amounts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sales-amounts span { font-size: 11px; color: var(--sub); }
.sales-amounts strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 비밀번호 찾기: 인증번호 ── */
.code-timer { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--error); font-size: 14px; font-variant-numeric: tabular-nums; }
.code-timer.expired { color: var(--sub); }
.text-link-btn { align-self: flex-start; border: none; background: none; color: var(--sub); font-size: 14px; text-decoration: underline; min-height: 44px; padding: 0; margin-top: -8px; }

/* ── 회원가입: 휴대폰 인증 ── */
.inline-row { display: flex; gap: 8px; align-items: stretch; }
.inline-row > input, .inline-row > .input-wrap { flex: 1; min-width: 0; }
.btn-inline {
  flex-shrink: 0; min-width: 88px; height: 52px; padding: 0 14px;
  border: 1px solid var(--primary); border-radius: var(--radius);
  background: #fff; color: var(--primary); font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-inline:active { background: var(--brand-soft); }
.btn-inline:disabled { border-color: var(--line); color: var(--sub); background: #f9fafb; }
input.locked { background: #f3f4f6; color: var(--sub); }
.verified-msg { color: #059669; font-size: 13px; margin-top: 6px; }
.field.invalid .verified-msg { display: none; }

/* ── 메인 상단 메뉴 ── */
.top-actions { display: flex; align-items: center; gap: 10px; }
a.text-btn { display: inline-flex; align-items: center; text-decoration: none; }
.top-divider { width: 1px; height: 12px; background: var(--line); }

.match-ok { color: #059669; font-size: 13px; margin-top: 6px; }
.field.invalid .match-ok { display: none; }

/* 두 칸을 합친 메뉴 버튼 */
.menu-btn.wide { grid-column: 1 / -1; flex-direction: row; gap: 14px; font-size: 17px; }

/* 지우기 버튼이 있는 입력칸 (품목 검색) */
.input-clear { position: relative; }
.input-clear input {
  width: 100%; height: 48px; padding: 0 44px 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; color: var(--text); background: #fff; outline: none; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.input-clear input:focus { border-color: var(--brand); }
.input-clear input::-webkit-search-cancel-button { display: none; }
.clear-btn { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; border: none; background: none; color: var(--sub); font-size: 22px; }

/* ── 품목 조회 ── */
.result-count { font-size: 13px; color: var(--sub); margin: 0 4px 8px; }
.result-count.warn { color: var(--error); }
.product-codes { font-size: 12px; color: var(--sub); margin: -4px 0 8px; word-break: break-all; }
.product-grid { grid-template-columns: 1fr 1fr; }
.product-grid strong { white-space: normal; word-break: break-all; }
.product-grid .span2 { grid-column: 1 / -1; }

.filter-hint { font-size: 12px; color: var(--sub); margin-top: -4px; }
.filter-hint.error { color: var(--error); }
.input-clear input.invalid { border-color: var(--error); }
.product-store { display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); border-radius: 4px; padding: 2px 8px; margin-bottom: 6px; }

/* ── 바코드 스캔 ── */
.btn-scan {
  flex-shrink: 0; height: 48px; padding: 0 12px; display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--primary); border-radius: var(--radius);
  background: #fff; color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-scan:active { background: var(--brand-soft); }
.inline-row > .input-clear { flex: 1; min-width: 0; }

.scanner { position: fixed; inset: 0; z-index: 200; background: #000; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-guide {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%);
  width: min(80vw, 320px); height: min(40vw, 160px);
  border: 3px solid #fff; border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);   /* 칸 바깥을 어둡게 */
  overflow: hidden;
}
.scan-line { position: absolute; left: 8%; right: 8%; height: 2px; background: #e0520a; top: 50%; animation: scan-move 1.6s ease-in-out infinite alternate; }
@keyframes scan-move { from { top: 15%; } to { top: 85%; } }
.scan-top {
  position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 12px 0;
}
.scan-icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.scan-icon-btn.on { background: #fde047; color: #111; }
.scan-msg {
  position: absolute; left: 0; right: 0; top: calc(45% + min(20vw, 80px) + 24px);
  text-align: center; color: #fff; font-size: 15px; padding: 0 20px;
}


/* ════════ KEEN 테마 ════════ */
/* 기본 버튼: 로고의 검정, 누르면 주황 밑줄 느낌 */
.btn-primary { background: var(--primary); color: #fff; letter-spacing: .02em; }
.btn-primary:active { background: var(--primary-press); box-shadow: inset 0 -4px 0 var(--brand); }
.btn-primary:disabled { background: #bdbdbd; box-shadow: none; }

/* 로그인 화면 제목 아래 로고와 같은 주황 막대 */
.header.center h1 { font-weight: 800; letter-spacing: -.01em; }
.header.center h1::after {
  content: ""; display: block; width: 44px; height: 5px; margin: 12px auto 0;
  background: var(--brand); border-radius: 1px;
}
.header h1 { font-weight: 800; }

/* 하위 화면 제목 왼쪽에 주황 막대 */
.page-title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.page-title::before { content: ""; width: 5px; height: 18px; background: var(--brand); border-radius: 1px; }

/* 로고 크기 (세로형 로고) */
.logo-img { width: 96px; margin-bottom: 20px; }
.logo-small { height: 36px; }

/* 메인 메뉴 버튼: 검정 타일 + 아래 주황 막대 */
.menu-btn { background: var(--primary); position: relative; }
.menu-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: var(--brand); border-radius: 0 0 10px 10px;
}
.menu-btn:active { background: #2a2a2a; }
.menu-btn.empty { background: #f5f5f5; border: 1px dashed #dddddd; }
.menu-btn.empty::after { display: none; }

/* 로그인 정보 카드: 왼쪽 주황 선 */
.user-card { border-left: 4px solid var(--brand); background: #fafafa; }

/* 조회 조건 카드 */
.filter-card { background: #fafafa; }

/* 매출 합계 카드: 검정 바탕 + 주황 숫자 */
.summary-card { background: var(--primary); border-bottom: 5px solid var(--brand); }
.summary-main strong { color: var(--brand); }
.summary-main { border-bottom-color: rgba(255,255,255,.18); }

/* 목록 카드: 왼쪽 주황 선 */
.sales-list li { border-left: 4px solid var(--brand); }

/* 인증요청 · 스캔 버튼: 검정 테두리 */
.btn-inline, .btn-scan { border-color: var(--primary); color: var(--primary); }

/* 빠른 기간 버튼 */
.quick-range button { border-radius: 4px; }

/* 안내창(토스트) */
.toast { background: rgba(17,17,17,.94); border-left: 4px solid var(--brand); border-radius: 6px; }

/* 로그인 화면: 회원가입 안내를 로그인 버튼 바로 아래에 */
.footer.footer-under { margin-top: 20px; padding-top: 0; }

/* 메인 상단: 로고 + 관리자 인증 버튼 */
.top-left { display: flex; align-items: center; gap: 10px; }
.admin-auth-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px;
  border: none; border-radius: 4px; background: var(--brand); color: #111;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.admin-auth-btn:active { background: #e66200; }

/* ── 회원 인증 (관리자) ── */
.refresh-btn { margin-left: auto; }
.approve-box { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.approve-select {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; color: var(--text); background: #fff; font-family: inherit;
}
.approve-select:focus { border-color: var(--brand); outline: none; }
.approve-select.invalid { border-color: var(--error); }
.approve-btn { height: 44px; font-size: 15px; }
.empty-li { border: none !important; padding: 0 !important; }

/* 회원 인증: 사용자 구분 미리 확인 */
.type-check { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.type-check-title { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.type-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.type-chip { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.type-chip.yes { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand); }
.type-chip.no { background: #f5f5f5; color: #9e9e9e; border: 1px solid #eeeeee; }
.type-chip.unknown { background: #fafafa; color: #bdbdbd; border: 1px dashed #dddddd; }
.type-check-note { font-size: 12px; color: var(--brand-dark); margin-top: 6px; }
.approve-select.suggested { border-color: var(--brand); background: var(--brand-soft); }
.approve-box { margin-top: 10px; padding-top: 0; border-top: none; }
.store-note { margin-top: -2px; }
.store-note.ok { color: #059669; }

/* 사업자번호로 찾은 매장 */
.approve-select.found { border-color: #059669; background: #ecfdf5; color: #065f46; font-weight: 700; }
.approve-select .opt-found { color: #059669; font-weight: 700; background: #ecfdf5; }
.approve-select optgroup { color: var(--sub); font-style: normal; }

/* 회원관리 버튼: 인증 버튼과 같은 모양, 검정 테두리로 구분 */
.admin-member-btn { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.admin-member-btn:active { background: #f3f3f3; }
.top-left { gap: 6px; }

/* 메인 상단 줄바꿈 방지 (관리자는 버튼이 많아 좁은 화면에서 아이콘 생략) */
.main-top { gap: 6px; }
.main-top .text-btn, .admin-auth-btn { white-space: nowrap; flex-shrink: 0; }
.top-actions { gap: 8px; flex-shrink: 0; }
.admin-auth-btn { padding: 0 8px; gap: 3px; font-size: 13px; }
@media (max-width: 400px) {
  .admin-auth-btn svg { display: none; }
  .main-top .text-btn { font-size: 13px; }
}

/* ── 회원관리 ── */
.filter-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-input {
  width: 100%; height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 15px; color: var(--text); background: #fff; outline: none; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.filter-input:focus { border-color: var(--brand); }
.filter-2col select { height: 44px; font-size: 15px; }
.member-item { cursor: pointer; }
.member-item:active { background: #fafafa; }
.member-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.member-head .sales-name { margin-bottom: 0; }
.member-badges { display: flex; gap: 4px; flex-shrink: 0; }
.yn-badge { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px; }
.yn-badge.on { background: var(--brand-soft); color: var(--brand-dark); }
.yn-badge.off { background: #f1f1f1; color: #9e9e9e; }
.member-hint { text-align: right; font-size: 12px; color: var(--sub); margin-top: 6px; }

.edit-form { display: flex; flex-direction: column; gap: 12px; }
.edit-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.edit-row label { font-size: 13px; font-weight: 600; color: var(--sub); }
.edit-row input, .edit-row select {
  width: 100%; height: 46px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 16px; color: var(--text); background: #fff; outline: none; font-family: inherit;
}
.edit-row input:focus, .edit-row select:focus { border-color: var(--brand); }
.edit-row input.locked { background: #f3f4f6; color: var(--sub); }
.edit-row select:disabled { background: #f3f4f6; color: var(--sub); }
.edit-row .invalid { border-color: var(--error); }
.edit-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-note { font-size: 12px; color: var(--brand-dark); min-height: 0; }
.edit-note:empty { display: none; }

/* 회원관리: 비밀번호 초기화 */
.pw-reset-box { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); background: #fafafa; }
.pw-reset-box[hidden] { display: none !important; }
.pw-reset-title { font-size: 14px; font-weight: 700; }
.pw-reset-desc { font-size: 12px; color: var(--sub); margin-top: 2px; line-height: 1.5; }
.pw-reset-btn { flex-shrink: 0; height: 40px; padding: 0 14px; border: 1.5px solid var(--error); border-radius: var(--radius); background: #fff; color: var(--error); font-size: 14px; font-weight: 700; }
.pw-reset-btn:active { background: #fef2f2; }
/* 비밀번호 변경: 초기화 안내 */
.reset-banner { background: var(--brand-soft); border-left: 4px solid var(--brand); color: var(--brand-dark); font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 6px; margin: -8px 0 16px; }
