/*
 * View3 OPS 관리자 디자인 시스템
 *
 * 방향: 애플의 여백·타이포·부드러운 곡률 + 머티리얼의 명확한 상태 표현(엘리베이션·피드백).
 * 외부 CDN 을 쓰지 않는다(폐쇄망·오프라인에서도 동일하게 뜨도록 자체 호스팅 폰트 + 인라인 SVG).
 *
 * 토큰 → 레이아웃 → 컴포넌트 순으로 정리했다. 새 화면은 여기 있는 클래스를 조합해서 만든다.
 */

/*
 * 폰트 — Pretendard(가변, SIL OFL 1.1)를 **우리 서버에서** 보낸다(2026-09-15).
 *
 * 예전에는 `--font` 에 이름만 적혀 있고 파일이 없어서, Pretendard 가 설치된 기기에서만 그 글꼴로 보였다.
 * 파일은 npm `pretendard@1.3.9` 의 `dist/web/variable` 을 그대로 옮긴 것이고 라이선스 원문을 같은 폴더에 둔다.
 * 동적 서브셋(글자 묶음 92개)이라 화면에 쓰인 글자가 든 묶음만 받는다 — 전체를 한 번에 받지 않는다.
 * `@import` 는 이 파일의 **첫 규칙**이어야 한다(주석은 앞에 와도 된다). ops.css 를 읽는 모든 화면(관리자·점주)에 걸린다.
 */
@import url("../fonts/pretendard/pretendardvariable-dynamic-subset.css");

/* ─────────────────────────────  토큰  ───────────────────────────── */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --border: #e5e5ea;
  --border-strong: #d2d2d7;

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: #e8f2fe;

  --success: #34c759;
  --success-soft: #e7f8ec;
  --warning: #ff9f0a;
  --warning-soft: #fff4e5;
  --danger: #ff3b30;
  --danger-soft: #ffecea;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-full: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, .06), 0 2px 4px rgba(0, 0, 0, .04);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .04);

  --sidebar-w: 248px;
  --topbar-h: 60px;

  --ease: cubic-bezier(.4, 0, .2, 1);

  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'SF Pro KR', 'SF Pro Display',
          'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  /*
   * 간격 스케일.
   *
   * 여기 없던 동안 화면마다 `padding: 32px 24px` · `gap: 10px/14px/16px` 를 손으로 적었고,
   * 그래서 화면끼리 리듬이 조금씩 어긋났다. 새 화면은 이 계단만 쓴다.
   * 이름을 `--space-*` 로 둔 이유: `.sp` 스코프 변수(`--sp-*`)와 헷갈리지 않게.
   */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /*
   * 타이포 스케일과 굵기.
   *
   * 550/650 은 Pretendard 의 가변 굵기다 — 폰트가 설치돼 있지 않으면 600/700 으로
   * 반올림된다(저장소에 웹폰트 파일이 없어 지금은 그 상태다).
   * 자간은 크기와 무관하게 한국어 본문에 -2%, 큰 제목에 -3% 가 맞았다.
   */
  --fs-cap: 11.5px;
  --fs-sm: 13px;
  --fs-body: 14.5px;
  --fs-lg: 17px;
  --fs-title: 22px;
  --fs-display: 28px;
  --fw-mid: 550;
  --fw-semi: 650;
  --fw-bold: 700;
  --tr-tight: -.02em;
  --tr-tighter: -.03em;

  /* 모션. --ease 하나로는 "빠른 반응"과 "튕겨 들어오는 것"을 못 가른다. */
  --dur-fast: 140ms;
  --dur: 220ms;
  --spring: cubic-bezier(.34, 1.36, .64, 1);

  /*
   * accent 파생색.
   *
   * `--accent-soft` 는 **상수라 테넌트 포인트 컬러를 따라가지 않는다**(점주 포털은
   * <html> 인라인으로 --accent 를 덮어쓴다). 접수 화면(.of)이 그 한계를 color-mix 로
   * 우회하고 있었는데, 같은 우회를 화면마다 복사하지 않도록 토큰으로 올렸다.
   * 앞줄은 color-mix 를 모르는 브라우저용 폴백이다.
   */
  --accent-tint: var(--accent-soft);
  --accent-tint: color-mix(in srgb, var(--accent) 7%, var(--surface));
  /* 워시의 진한 쪽. tint 와 짝으로 위→아래 그라디언트를 만든다. */
  --accent-tint-2: var(--accent-soft);
  --accent-tint-2: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --accent-edge: rgba(0, 113, 227, .28);
  --accent-edge: color-mix(in srgb, var(--accent) 28%, var(--surface));

  /* 홈(.hm)과 주문 상세(.od)가 각자 같은 값을 적어 두고 있던 것을 올렸다. */
  --line-soft: #ededf1;
  --text-dim: #92959d;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --border: #38383a;
    --border-strong: #48484a;
    --text: #f5f5f7;
    --text-2: #aeaeb2;
    --text-3: #8e8e93;
    --accent: #0a84ff;
    --accent-hover: #409cff;
    --accent-soft: #0a273f;
    --success-soft: #10301a;
    --warning-soft: #3a2a0a;
    --danger-soft: #3a1512;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, .5);
    --shadow-3: 0 12px 32px rgba(0, 0, 0, .6);

    /* 어두운 면 위에서는 섞는 비율을 올려야 같은 정도로 읽힌다. */
    --accent-tint: var(--accent-soft);
    --accent-tint: color-mix(in srgb, var(--accent) 16%, var(--surface));
    --accent-tint-2: var(--accent-soft);
    --accent-tint-2: color-mix(in srgb, var(--accent) 32%, var(--surface));
    --accent-edge: rgba(10, 132, 255, .4);
    --accent-edge: color-mix(in srgb, var(--accent) 40%, var(--surface));
    --line-soft: #38383a;
    --text-dim: #8e8e93;
  }
}

/* ─────────────────────────────  기본  ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }

svg.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.7; }

/* ─────────────────────────────  레이아웃  ───────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .28s var(--ease);
}

.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.02em;
}

.sidebar__logo {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5856d6);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 12px 24px; }

.sidebar__section {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 500;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.sidebar__link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar__link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar__link.active svg { stroke: var(--accent); }

.sidebar__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 30;
}

.topbar__title { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.topbar__spacer { flex: 1; }

.topbar__user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
}
.topbar__avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #5856d6, var(--accent));
  color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); cursor: pointer;
}

.content { padding: 28px; max-width: 1440px; }

.page-head { margin-bottom: 22px; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.03em; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; }

/* ─────────────────────────────  카드 · 그리드  ───────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.card + .card { margin-top: 18px; }

.card__head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card__head h2 { font-size: 15px; }
.card__head .spacer { flex: 1; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 지표 타일 */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.stat__label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.stat__value { font-size: 28px; font-weight: 680; letter-spacing: -.03em; margin-top: 6px; }
.stat__meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat--accent .stat__value { color: var(--accent); }
.stat--warning .stat__value { color: var(--warning); }
.stat--danger .stat__value { color: var(--danger); }
.stat--success .stat__value { color: var(--success); }

/* ─────────────────────────────  버튼  ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-full);
  background: var(--accent); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #ff5147; }
.btn--sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn--icon { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.btn--block { width: 100%; }

/* ─────────────────────────────  폼  ───────────────────────────── */
.field { margin-bottom: 16px; }
.field__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

.input, .select, .textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit; font-size: 13.5px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; font-family: var(--font-mono); font-size: 13px; }
/*
 * 산문용. 기본 `.textarea` 는 알림톡 본문·CSV 처럼 **글자 자리가 중요한** 것들을 위해
 * 모노에 120px 인데, 상품 설명 같은 짧은 문장에는 과하다. 입력칸 모양은 `.input` 과 맞추고
 * 줄바꿈만 할 수 있게 한다.
 */
.textarea--prose { min-height: 72px; font-family: inherit; font-size: 13.5px; }
.input:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-3); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238e8e93' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-row, .form-row--3 { grid-template-columns: 1fr; } }

/* 폼 안 구분선 — 성격이 다른 묶음 사이에만 쓴다(자주 쓰면 줄만 많아진다). */
hr.divider { margin: 20px 0; border: 0; border-top: 1px solid var(--border); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
  width: 42px; height: 25px; border-radius: var(--radius-full);
  background: var(--border-strong); position: relative;
  transition: background .22s var(--ease);
}
.switch__track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease);
}
.switch input:checked + .switch__track { background: var(--success); }
.switch input:checked + .switch__track::after { transform: translateX(17px); }

/* 검색 바 */
.toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; height: 34px; }

/* ─────────────────────────────  테이블  ───────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th, table.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.table th {
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2); white-space: nowrap;
}
table.table tbody tr { transition: background .15s var(--ease); }
table.table tbody tr:hover { background: var(--surface-2); }
table.table td.num,
table.table th.num { text-align: right; }
table.table td.num { font-variant-numeric: tabular-nums; }
table.table td.actions { text-align: right; white-space: nowrap; }
.table__empty { padding: 56px 20px; text-align: center; color: var(--text-3); }

.mono { font-family: var(--font-mono); font-size: 12.5px; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─────────────────────────────  뱃지 · 알림  ───────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
}
.badge--success { background: var(--success-soft); color: #1d8a3a; }
.badge--warning { background: var(--warning-soft); color: #a76500; }
.badge--danger { background: var(--danger-soft); color: #c9241a; }
.badge--accent { background: var(--accent-soft); color: var(--accent); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--warning-soft); color: #8a5400;
  font-size: 13px; line-height: 1.6;
}
.notice--danger { background: var(--danger-soft); color: #c9241a; }
.notice--success { background: var(--success-soft); color: #1c7c3a; }
.notice--info { background: var(--accent-soft); color: var(--accent); }
.notice + .notice { margin-top: 10px; }

/* ─────────────────────────────  페이지네이션  ───────────────────────────── */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.pagination a, .pagination span {
  min-width: 32px; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2);
}
.pagination a:hover { background: var(--surface-2); text-decoration: none; }
.pagination .is-current { background: var(--accent); color: #fff; font-weight: 600; }

/* ─────────────────────────────  모달  ───────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; animation: fade .18s var(--ease); }
.modal__dialog {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  animation: pop .22s var(--ease);
}
.modal__dialog--wide { max-width: 820px; }
.modal__head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__head h2 { font-size: 16px; flex: 1; }
.modal__body { padding: 22px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--border); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ─────────────────────────────  토스트  ───────────────────────────── */
.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 400px;
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  font-size: 13px; font-weight: 500;
  animation: slide-in .24s var(--ease);
}
.toast--success { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--info { border-left: 3px solid var(--accent); }
.toast.is-leaving { animation: slide-out .2s var(--ease) forwards; }

@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes slide-out { to { opacity: 0; transform: translateX(24px); } }

/* ─────────────────────────────  로그인  ───────────────────────────── */
.login {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), var(--bg) 60%);
}
.login__card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-3);
  padding: 36px 32px 30px;
}
.login__logo {
  width: 46px; height: 46px; margin: 0 auto 18px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #5856d6);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 16px;
}
.login h1 { font-size: 20px; text-align: center; letter-spacing: -.02em; }
.login__sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 6px 0 26px; }
.login__error { display: none; margin-bottom: 14px; }

/* ─────────────────────────────  유틸  ───────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }

.copy-field { display: flex; gap: 6px; }
.copy-field .input { font-family: var(--font-mono); font-size: 12.5px; }

/* ─────────────────────────────  반응형  ───────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-3); }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; place-items: center; }
  .content { padding: 18px; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.3); display: none; }
  .sidebar-scrim.is-open { display: block; }
}

/* ── 테넌트 로고 업로더 (A-01) ──────────────────────
 * 미리보기는 **점주 헤더에서 보일 크기 그대로** 둔다(28px 높이).
 * 크게 키워 보여 주면 실제 헤더에서 너무 작다는 걸 저장한 뒤에야 알게 된다.
 */
/*
 * `[hidden]` 을 실제로 숨긴다.
 *
 * UA 기본 `[hidden]{display:none}` 은 **클래스 규칙에 진다.** 아래 미리보기의 `img` 가
 * `display:block`, 글자 마크가 `display:inline-flex` 라 이 줄이 없으면 둘 다 늘 보인다 —
 * 로고를 골라도 옆에 글자 마크가 그대로 남아 "업로드가 안 됐나" 로 읽힌다.
 * (점주 화면 `.hm [hidden]` 이 같은 이유로 이미 걸려 있다)
 */
.tn-logo [hidden] { display: none !important; }

/* ── 추가 사진 칸 (테넌트) ───────────────────────── */
/* 한 줄 = 칸 이름 · 권장 장수 · 안내 문구 · 빼기. 폭이 좁으면 안내 문구가 아래 줄로 내려간다. */
.tn-extra { display: grid; gap: 8px; }
.tn-extra:empty { display: none; }
.tn-extra__row {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: minmax(120px, 1fr) 96px minmax(160px, 2fr) auto;
}
@media (max-width: 640px) {
  .tn-extra__row { grid-template-columns: 1fr 80px auto; }
  .tn-extra__row [data-role="hint"] { grid-column: 1 / -1; grid-row: 2; }
}

/* ── 매장 사진 예시 가이드 (테넌트) ───────────────────────── */
/*
 * 칸(매장 외부·내부)마다 타일 격자 하나. 접수 화면의 사진 격자와 **같은 크기 감각**으로
 * 두되(작은 정사각), 여기는 관리 화면이라 개수와 지우기가 더 중요해 머리줄에 `n / 10` 을 단다.
 */
.tn-guide { display: grid; gap: 14px; }
.tn-guide__group {
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.tn-guide__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.tn-guide__count { color: var(--text-2); font-size: 12px; }
.tn-guide__empty { color: var(--text-3); font-size: 12px; }
.tn-guide__empty[hidden] { display: none !important; }
.tn-guide__list {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}
.tn-guide__list:empty { display: none; }
/* 지우기 배지가 모서리 밖으로 나오므로 타일을 자르지 않고 이미지만 둥글게 깎는다. */
.tn-guide__tile { position: relative; aspect-ratio: 1 / 1; }
.tn-guide__tile img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius-sm);
  background: var(--surface);
}
.tn-guide__del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1; color: #fff;
  background: var(--text-2);
  border: 0; border-radius: 50%; cursor: pointer;
}
.tn-guide__del:hover { background: var(--danger); }

.tn-logo { display: flex; align-items: flex-start; gap: 14px; }
.tn-logo__preview {
  flex-shrink: 0;
  width: 116px; height: 56px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2);
}
.tn-logo__preview img { max-width: 100%; max-height: 28px; object-fit: contain; display: block; }
/* 로고가 없을 때 점주 헤더에 서는 것과 같은 사각 마크. */
.tn-logo__mark {
  width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}
.tn-logo__side { min-width: 0; }
.tn-logo__buttons { display: flex; gap: 6px; margin-bottom: 6px; }

/* ── 서식 편집기 (cms/assets/js/editor.js) ────────────
 * 입력칸(.input)과 같은 테두리·라운드를 쓴다 — 폼 안에서 이질적으로 보이지 않게.
 */
.ed { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.ed__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 6px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.ed__btn {
  min-width: 28px; height: 28px; padding: 0 8px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 12.5px; line-height: 1; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.ed__btn:hover { background: var(--surface); color: var(--text); }
.ed__sep { width: 1px; height: 16px; margin: 0 4px; background: var(--border); }

/* 쓰는 칸. 본문이 길어지면 늘어나되 화면을 다 먹지는 않게 상한을 둔다. */
.ed__area {
  min-height: 180px; max-height: 420px; overflow-y: auto;
  padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--text);
}
.ed__area:focus { outline: none; }
.ed__area p { margin: 0 0 10px; }
.ed__area h3 { margin: 16px 0 8px; font-size: 16px; font-weight: 700; }
.ed__area ul, .ed__area ol { margin: 0 0 10px; padding-left: 22px; }
.ed__area li { margin-bottom: 4px; }
.ed__area blockquote {
  margin: 0 0 10px; padding: 8px 14px;
  border-left: 3px solid var(--border); color: var(--text-2);
}
.ed__area a { color: var(--accent); }

/* ── 이용안내 파일 칸 (A-05) ────────────────────────
 * 테넌트 로고와 같은 이유로 `[hidden]` 을 못 박는다 —
 * 미리보기에 display 를 준 클래스 규칙이 UA 기본값을 이기기 때문이다.
 */
.gd-file [hidden] { display: none !important; }

.gd-file { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.gd-file__video { display: block; width: 100%; max-height: 200px; border-radius: 6px; background: #000; }
.gd-file__thumb { display: block; width: 100%; max-height: 200px; object-fit: contain; border-radius: 6px; }
.gd-file__empty {
  display: flex; align-items: center; justify-content: center;
  height: 84px; border-radius: 6px; background: var(--surface);
  font-size: 13px; color: var(--text-3);
}
.gd-file__buttons { display: flex; gap: 6px; margin: 10px 0 6px; }

/* 본문 이미지 목록(A-05). 여러 장을 격자로 늘어놓고 각 장에 지우기 단추를 얹는다. */
.gd-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gd-imgs__cell {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
}
.gd-imgs__cell img { display: block; width: 100%; height: 84px; object-fit: cover; }
/* 그림 위에 얹히므로 어두운 원으로 둔다 — 밝은 사진에서도 보여야 한다. */
.gd-imgs__del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.gd-imgs__del:hover { background: rgba(0, 0, 0, .78); }
.gd-imgs:not(:empty) + .gd-file__empty { display: none; }

/* ─────────────────────────  브랜드 담당자 · 운영 메모  ───────────────────────── */

/*
 * 담당자 한 줄(이름 · 직책 · 연락처 · 지우기).
 * `.form-row` 를 쓰지 않는 이유는 마지막 칸이 입력칸이 아니라 아이콘 단추라서다 —
 * 균등 3분할에 넣으면 단추만 덩그러니 넓어진다.
 */
.bc-row {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  margin-bottom: 8px;
}
@media (max-width: 760px) {
  .bc-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* 운영 메모(댓글). 시간순 카드가 아니라 얇은 줄로 쌓는다 — 한 화면에 많이 보여야 한다. */
.bm-list { display: flex; flex-direction: column; gap: 10px; }
.bm-item {
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.bm-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bm-item__body { font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

/* ── 쿠폰 (/cms/coupon) ───────────────────────── */
.cp-thumb {
  width: 56px; height: 56px; display: block;
  object-fit: cover; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.cp-thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.cp-thumb--empty svg { width: 20px; height: 20px; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
/* 적용 테넌트·매장 체크 — 이름이 길어도 줄이 맞게 격자로 둔다. */
.cp-check-grid {
  display: grid; gap: 6px 12px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.cp-image { display: flex; align-items: center; gap: 14px; }
.cp-image__preview {
  width: 96px; height: 96px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.cp-image__preview img { width: 100%; height: 100%; object-fit: cover; }
.cp-image [hidden] { display: none !important; }
.cp-store-list {
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.cp-store {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer;
}
.cp-store:last-child { border-bottom: 0; }
.cp-store.is-done { cursor: default; color: var(--text-3); }
.cp-store__name { font-weight: 550; }

/* ── 점주 이용 통계 (/cms/owner-stats) ───────────────────────── */
/* 가로 막대 — 폭이 곧 비율. 흐름·이탈 표가 같이 쓴다. */
.os-bar {
  display: block; height: 8px; min-width: 60px;
  background: var(--surface-2); border-radius: var(--radius-full); overflow: hidden;
}
.os-bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.os-funnel { display: grid; gap: 10px; }
.os-funnel__row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: minmax(110px, 150px) 1fr 110px 110px;
  font-size: 13px;
}
.os-funnel__label { font-weight: 550; }
.os-funnel__num { text-align: right; font-variant-numeric: tabular-nums; }
.os-funnel__step { text-align: right; color: var(--text-2); font-size: 12px; }
/* 앞 단계의 절반도 못 넘어온 줄 — 가장 많이 빠지는 곳. */
.os-funnel__step.is-weak { color: #c9241a; font-weight: 600; }
.os-drop { color: #c9241a; font-weight: 600; }
/* 날짜별 세로 막대. 칸이 많아도(90일) 가로로 넘치지 않게 칸이 줄어든다. */
.os-daily { display: flex; align-items: flex-end; gap: 2px; height: 180px; }
.os-daily__col {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.os-daily__track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.os-daily__bar { width: 100%; max-width: 28px; min-height: 1px; background: var(--accent); border-radius: 4px 4px 0 0; }
.os-daily__num { font-size: 10px; color: var(--text-2); }
.os-daily__day {
  margin-top: 4px; font-size: 10px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; max-width: 100%;
}
@media (max-width: 640px) {
  .os-funnel__row { grid-template-columns: 1fr 90px; }
  .os-funnel__row .os-bar { grid-column: 1 / -1; grid-row: 2; }
  .os-funnel__step { display: none; }
}
