/* 본사 관리자 디자인 (2026-10-22 시안): 남색 사이드바 · 상단 바 · 골드 강조. style.css 위에 덮어씀 — 화면 구조는 js/views/admin.js shell() */
.adm {
  --navy: #c8161d; --navy-line: #a51117; --navy-ink: #fff1f1; --navy-muted: #f7c6c8;
  --gold: #f4b000; --gold-strong: #d99a00; --gold-soft: #fff4d6; --gold-ink: #1a1a1a;
  --bg: #f4f5f7; --surface: #fff; --line: #e5e7eb; --ink: #111827; --muted: #6b7280; --soft: #f9fafb;
  --ok: #16a34a; --ok-soft: #e3f4ea; --warn: #b7791f; --warn-soft: #fdf1d8; --orange: #c2410c; --orange-soft: #fde5d6;
  --danger: #dc2626; --danger-soft: #fde8e8;
  --accent: var(--gold); --accent-active: var(--gold-strong); --accent-soft: var(--gold-soft); --accent-ink: #1a1a1a;
  display: grid; grid-template-columns: 252px minmax(0, 1fr); grid-template-rows: 54px minmax(0, 1fr);
  min-height: 100vh; color: var(--ink); font-size: 14px;
  background: linear-gradient(to right, var(--navy) 252px, var(--bg) 252px); /* 사이드바 색이 페이지 끝까지 */
}
body[data-kind='admin'] { background: #f4f5f7; }

/* 사이드바 */
.adm-side { grid-row: 1 / 3; background: var(--navy); color: var(--navy-ink); display: flex; flex-direction: column; padding: 18px 10px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-logo { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; }
.adm-logo svg { width: 44px; height: 44px; flex: none; }
.adm-logo b { display: block; font-size: 21px; white-space: nowrap; font-weight: 800; color: var(--gold); letter-spacing: -.5px; line-height: 1.1; }
.adm-logo span { display: block; font-size: 13px; color: var(--navy-muted); margin-top: 4px; }
.adm-nav { display: grid; gap: 4px; }
.adm-nav a, .adm-side-foot button { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: 6px; color: var(--navy-ink); font-size: 15px; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.adm-nav a:hover, .adm-side-foot button:hover { background: rgb(255 255 255 / .06); }
.adm-nav a.on { background: var(--gold); color: #1a1a1a; font-weight: 600; }
.adm-nav .ic, .adm-side-foot .ic { width: 22px; height: 22px; flex: none; }
.adm-side-foot { margin-top: auto; border-top: 1px solid var(--navy-line); padding-top: 14px; display: grid; gap: 4px; }

/* 상단 바 */
.adm-top { background: var(--navy); display: flex; align-items: center; justify-content: flex-end; gap: 22px; padding: 0 28px; color: var(--navy-ink); }
.adm-bell { position: relative; color: var(--navy-ink); display: inline-flex; padding: 6px; }
.adm-bell .ic { width: 24px; height: 24px; }
.adm-bell i { position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.adm-me { position: relative; padding-left: 22px; border-left: 1px solid var(--navy-line); }
.adm-me > button { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--navy-ink); font-size: 15px; cursor: pointer; padding: 6px 0; }
.adm-me .avatar { width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; color: #6b7280; display: grid; place-items: center; }
.adm-me .avatar .ic { width: 20px; height: 20px; }
.adm-me .chev { width: 16px; height: 16px; transform: rotate(90deg); }
.adm-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .12); min-width: 160px; padding: 6px; z-index: 20; }
.adm-menu button { width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.adm-menu button:hover { background: var(--soft); }

/* 본문 */
.adm-main { padding: 28px 30px 56px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.adm-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; margin: 0; }
.adm-head p { color: #4b5563; margin: 6px 0 0; font-size: 14px; }
.adm-crumb { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 8px; }
.adm-crumb b { color: var(--ink); font-weight: 500; }
.adm-crumb .ic { width: 14px; height: 14px; }
.adm h2 { font-size: 17px; font-weight: 700; margin: 10px 0 0; }

/* 카드 · 요약 숫자 */
.adm .card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: none; padding: 18px 20px; }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.adm-kpi { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.adm-kpi:hover { border-color: #d1d5db; }
.adm-kpi.on { border-color: var(--gold); }
.adm-kpi .ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-strong); flex: none; }
.adm-kpi .ring.ok { background: var(--ok-soft); color: var(--ok); }
.adm-kpi .ring.no { background: var(--danger-soft); color: var(--danger); }
.adm-kpi .ring .ic { width: 26px; height: 26px; }
.adm-kpi span { display: block; font-size: 13px; color: #374151; }
.adm-kpi b { display: block; font-size: 26px; font-weight: 800; margin-top: 4px; }
.adm-kpi b small { font-size: 18px; font-weight: 700; margin-left: 1px; }
.adm-kpi .go { margin-left: auto; width: 18px; height: 18px; color: #9ca3af; }
.adm .stats { gap: 12px; }
.adm .stat { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.adm .stat b { white-space: nowrap; } /* 금액이 "1,980,000 / 원" 으로 끊기지 않게 */

/* 검색 · 거르기 */
.adm-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 158px 158px 270px; gap: 12px; }
.adm-field { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; height: 40px; }
.adm-field .ic { width: 18px; height: 18px; color: #6b7280; flex: none; }
.adm-field input, .adm-field select { border: 0; outline: 0; background: none; font: inherit; color: var(--ink); width: 100%; min-width: 0; padding: 0; height: 38px; box-shadow: none; }
.adm-field input::placeholder { color: #9ca3af; }
.adm-field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 16px; padding-right: 22px; cursor: pointer; }
.adm-field .dash { color: var(--muted); }
.adm-field input[type=date] { width: auto; flex: 1; }
.adm-field:focus-within { border-color: var(--gold); }

/* 상태 탭 */
.adm-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-tabs button { height: 36px; padding: 0 22px; border-radius: 4px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 600; color: #374151; cursor: pointer; }
.adm-tabs button.on { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }

/* 표 */
.adm .table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.adm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm th { background: var(--soft); color: #374151; font-weight: 500; font-size: 13px; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm th.num { text-align: right; } /* 숫자 칸 머리도 숫자처럼 오른쪽 */
.adm td { padding: 10px 14px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.adm tbody tr:last-child td { border-bottom: 0; }
.adm tr.su-row { cursor: pointer; }
.adm tr.su-row:hover td { background: #fcfaf6; }
.adm tr.su-row.on td { background: #fdf6ea; }
.adm td.strong { font-weight: 700; }
.adm td .ic.chev { width: 18px; height: 18px; transform: rotate(90deg); color: #111827; }
.adm tr.on td .ic.chev { transform: rotate(-90deg); }

/* 뱃지 */
.adm .badge { border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; }
.adm .badge.warn { background: var(--warn-soft); color: var(--warn); }
.adm .badge.orange { background: var(--orange-soft); color: var(--orange); }
.adm .badge.ok { background: var(--ok-soft); color: var(--ok); }
.adm .badge.closed { background: var(--danger-soft); color: var(--danger); }
.adm .badge.muted { background: #f1f2f4; color: var(--muted); }

/* 버튼 */
.adm .btn { min-height: 40px; padding-block: 0; border-radius: 4px; font-weight: 600; font-size: 14px; border-color: #d1d5db; background: #fff; color: var(--ink); }
.adm .btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
.adm .btn.primary:hover { background: var(--gold-strong); filter: none; }
.adm .btn.soft-gray { background: #eef0f3; border-color: #eef0f3; }
.adm .btn.small-btn { min-height: 32px; border-radius: 4px; }
.adm .notice { border-radius: 6px; }
.adm .empty { border: 1px solid var(--line); border-radius: 6px; }

/* 가입 심사 상세 (표 아래) */
.adm-detail { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 22px 20px; }
.adm-detail > section { padding: 0 22px; display: grid; gap: 10px; align-content: start; }
.adm-detail > section + section { border-left: 1px solid var(--line); }
.adm-detail > section:first-child { padding-left: 0; }
.adm-detail h3 { font-size: 16px; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; }
.adm-detail h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.adm-dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); row-gap: 8px; font-size: 14px; margin: 0; }
.adm-dl dt { color: var(--muted); }
.adm-dl dd { margin: 0; overflow-wrap: anywhere; }
.adm-file { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 6px; padding: 10px 14px; }
.adm-file > .ic { width: 22px; height: 22px; color: #6b7280; }
.adm-file span { flex: 1; font-size: 13px; }
.adm-file .btn { min-height: 30px; padding: 2px 12px; font-size: 13px; background: #fff; }
.adm-file .btn .ic { width: 16px; height: 16px; }
.adm-file.none span { color: var(--muted); }
.adm-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.adm-actions .btn { min-height: 40px; }
.adm-detail .ai { grid-column: 1 / -1; padding: 18px 0 0; margin-top: 18px; border-top: 1px solid var(--line); }

/* 로그인 화면 */
body[data-kind='admin'] .auth-art.admin { background: linear-gradient(160deg, #c8161d, #e0353a); }
body[data-kind='admin'] .auth .btn.primary { background: #f4b000; border-color: #f4b000; }

/* 좁은 화면: 사이드바를 위로 */
@media (max-width: 900px) {
  .adm { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; background: var(--bg); }
  .adm-side { grid-row: auto; position: static; height: auto; padding: 14px 10px; }
  .adm-logo { padding-bottom: 12px; }
  .adm-nav { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .adm-nav a { padding: 9px 12px; gap: 10px; font-size: 14px; }
  .adm-side-foot { margin-top: 10px; }
  .adm-top { padding: 0 16px; }
  .adm-main { padding: 20px 16px 48px; }
  .adm-head { flex-direction: column; }
  .adm-filters { grid-template-columns: 1fr 1fr; }
  .adm-filters > :first-child, .adm-filters > :last-child { grid-column: 1 / -1; }
  .adm-detail { grid-template-columns: minmax(0, 1fr); }
  .adm-detail > section { padding: 16px 0 0; }
  .adm-detail > section + section { border-left: 0; border-top: 1px solid var(--line); margin-top: 16px; }
}
.adm .mono { font-family: inherit; font-variant-numeric: tabular-nums; }
.adm-actions .btn { width: 100%; }
.adm-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-dl { grid-template-columns: 108px minmax(0, 1fr); }
.adm-field { min-width: 0; }
.adm-field input[type=date] { min-width: 0; }
@media (max-width: 900px) { .adm-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.adm-main { grid-template-columns: minmax(0, 1fr); }

/* 로그인 (2026-10-22 시안): 왼쪽 남색 소개 + 오른쪽 흰 로그인. 화면 가운데 · 화면 크기에 맞춰 커짐 (최대 1200px) */
body[data-kind='admin']:has(.alog) { background: #f3f4f6; }
#app:has(> .alog) { min-height: 100vh; display: grid; place-items: center; padding: 32px 24px; }
.alog { --s: 1; /* 크기 배율 (아래 화면 폭 구간별) */
  display: grid; grid-template-columns: 54fr 46fr; width: min(calc(860px * var(--s)), 100%); border-radius: calc(16px * var(--s)); overflow: hidden;
  background: #fff; box-shadow: 0 16px 60px rgb(17 24 39 / .10); min-height: calc(476px * var(--s)); font-family: 'Noto Sans KR', sans-serif; }
.alog-art { position: relative; background: radial-gradient(120% 90% at 0% 0%, #d01c22 0%, #b51419 55%, #9a1015 100%); color: #fff; padding: calc(56px * var(--s)) calc(52px * var(--s)); overflow: hidden; }
.alog-brand { display: flex; align-items: center; gap: calc(16px * var(--s)); }
.alog-brand svg { width: calc(58px * var(--s)); height: calc(58px * var(--s)); flex: none; }
.alog-brand b { display: block; color: #f4b000; font-size: calc(28px * var(--s)); font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.alog-brand span { display: block; color: #ffd24d; font-size: calc(9.5px * var(--s)); letter-spacing: 2.6px; margin-top: calc(8px * var(--s)); font-family: Inter, sans-serif; }
.alog-art h1 { font-size: calc(42px * var(--s)); line-height: 1.34; font-weight: 700; letter-spacing: -1px; margin: calc(44px * var(--s)) 0 0; position: relative; z-index: 1; }
.alog-art p { color: #c7ccd6; font-size: calc(14px * var(--s)); margin: calc(18px * var(--s)) 0 0; position: relative; z-index: 1; }
.alog-lines { position: absolute; right: 0; bottom: 0; width: 100%; height: 47%; }
.alog-box { padding: calc(56px * var(--s)) calc(34px * var(--s)) calc(30px * var(--s)) calc(48px * var(--s)); display: grid; align-content: start; }
.alog-box h2 { font-size: calc(25px * var(--s)); font-weight: 800; letter-spacing: -.6px; margin: 0; color: #111827; }
.alog-sub { color: #4b5563; font-size: calc(14px * var(--s)); margin: calc(10px * var(--s)) 0 0; }
.alog-form { display: grid; gap: calc(20px * var(--s)); margin-top: calc(30px * var(--s)); }
.alog-form label { display: grid; gap: calc(10px * var(--s)); font-weight: 700; font-size: calc(14px * var(--s)); color: #111827; }
.alog-form input { height: calc(44px * var(--s)); border: 1px solid #e5e7eb; border-radius: 6px; padding: 0 calc(14px * var(--s)); font: inherit; font-weight: 400; font-size: calc(13.5px * var(--s)); background: #fff; width: 100%; }
.alog-form input::placeholder { color: #9ca3af; }
.alog-form input:focus { outline: none; border-color: #f4b000; box-shadow: 0 0 0 3px rgb(244 176 0 / .15); }
.alog-pw { position: relative; display: block; }
.alog-pw input { padding-right: calc(44px * var(--s)); }
.alog-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; color: #6b7280; cursor: pointer; display: grid; }
.alog-eye .ic { width: calc(18px * var(--s)); height: calc(18px * var(--s)); }
.alog-btn { height: calc(44px * var(--s)); margin-top: 2px; border: 0; border-radius: 6px; background: linear-gradient(180deg, #ffc21a, #f4b000); color: #1a1a1a; font: inherit; font-size: calc(15px * var(--s)); font-weight: 800; cursor: pointer; }
.alog-btn:hover { filter: brightness(.97); }
.alog .form-error { margin: -8px 0 0; color: #dc2626; font-size: calc(13px * var(--s)); }
.alog-note { display: flex; align-items: center; gap: 10px; color: #374151; font-size: calc(13px * var(--s)); margin: calc(22px * var(--s)) 0 0; padding-bottom: calc(22px * var(--s)); border-bottom: 1px solid #e5e7eb; }
.alog-note .ic { width: calc(18px * var(--s)); height: calc(18px * var(--s)); color: #6b7280; flex: none; }
.alog-foot { color: #374151; font-size: calc(12px * var(--s)); text-align: center; margin: calc(16px * var(--s)) 0 0; }
@media (min-width: 1200px) { .alog { --s: 1.15; } }
@media (min-width: 1440px) and (min-height: 760px) { .alog { --s: 1.3; } }
@media (min-width: 1700px) and (min-height: 860px) { .alog { --s: 1.4; } }
@media (max-width: 760px) {
  #app:has(> .alog) { padding: 0; place-items: stretch; }
  .alog { --s: 1; grid-template-columns: 1fr; border-radius: 0; min-height: 100vh; width: 100%; }
  .alog-art { padding: 36px 24px 150px; }
  .alog-art h1 { font-size: 32px; margin-top: 28px; }
  .alog-box { padding: 32px 24px; }
}

/* 모달 · 토스트 (관리자 컨셉): 남색 반투명 배경 · 흰 카드 · 골드 상단 선 · 오른쪽 정렬 버튼 */
body[data-kind='admin'] .modal { background: rgb(23 28 42 / .55); backdrop-filter: blur(2px); place-items: center; padding: 16px; }
body[data-kind='admin'] .sheet { width: min(460px, 100%); border-radius: 10px; padding: 26px 28px 24px; gap: 14px; border-top: 4px solid #f4b000;
  box-shadow: 0 20px 50px rgb(17 24 39 / .25); color: #111827; font-family: 'Noto Sans KR', sans-serif; font-size: 14px; }
body[data-kind='admin'] .sheet h3 { font-size: 19px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
body[data-kind='admin'] .sheet p { margin: 0; color: #4b5563; line-height: 1.6; }
body[data-kind='admin'] .sheet p.muted { color: #6b7280; font-size: 13px; }
body[data-kind='admin'] .sheet .form { display: grid; gap: 14px; }
body[data-kind='admin'] .sheet label { font-weight: 700; font-size: 13.5px; color: #111827; }
body[data-kind='admin'] .sheet :is(input:not([type=checkbox]), textarea, select) { border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 12px; font: inherit; font-weight: 400; width: 100%; background: #fff; }
body[data-kind='admin'] .sheet input:not([type=checkbox]) { height: 42px; }
body[data-kind='admin'] .sheet :is(input, textarea, select):focus { outline: none; border-color: #f4b000; box-shadow: 0 0 0 3px rgb(244 176 0 / .15); }
body[data-kind='admin'] .sheet input[type=checkbox] { accent-color: #f4b000; width: 16px; height: 16px; }
body[data-kind='admin'] .sheet label.row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
body[data-kind='admin'] .sheet :is(.row.end, .btn-row) { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid #eef0f3; }
body[data-kind='admin'] .sheet .btn { min-height: 40px; min-width: 88px; width: auto; padding: 0 18px; border-radius: 4px; font-size: 14px; font-weight: 600; background: #fff; border: 1px solid #d1d5db; color: #111827; }
body[data-kind='admin'] .sheet .btn:hover { background: #f9fafb; filter: none; }
body[data-kind='admin'] .sheet .btn.primary { background: #f4b000; border-color: #f4b000; color: #1a1a1a; }
body[data-kind='admin'] .sheet .btn.primary:hover { background: #d99a00; }
body[data-kind='admin'] .toast { background: #1a1a1a; color: #fff; border-radius: 6px; border-left: 4px solid #f4b000; padding: 12px 18px; bottom: 32px; }
body[data-kind='admin'] .toast.err { background: #1a1a1a; border-left-color: #dc2626; }
body[data-kind='admin'] .sheet label.row > input[type=checkbox] { flex: none; flex-basis: auto; margin: 0; }
body[data-kind='admin'] .sheet:has(.table-wrap) { width: min(860px, 100%); }
body[data-kind='admin'] .sheet .mono { font-family: inherit; font-variant-numeric: tabular-nums; }

/* 가격 설정: 항목을 가로로 여러 칸 */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.price-grid label { padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px; }
.price-grid .num-input { width: 100%; flex: 1; }
.price-grid .row { flex-wrap: nowrap; }

/* 매출 관리 (PC 우선): 검색 + 담당자 두 칸, 긴 표는 칸 안에서 스크롤 (제목 줄 고정) */
.adm-filters.two { grid-template-columns: minmax(220px, 1fr) 280px; }
.sl-range { width: 320px; }
.sl-scroll { max-height: 440px; overflow: auto; }
.sl-scroll thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 900px) { .adm-filters.two { grid-template-columns: minmax(0, 1fr); } .sl-range { width: 100%; } }

/* 매물 관리: 위 지도 (PC 넓게), 아래 검색 + 시도 · 시군구 · 읍면동 */
.ls-map { height: 460px; padding: 0; overflow: hidden; display: grid; }
.ls-map > .empty { align-self: center; }
.ls-filters { grid-template-columns: minmax(260px, 1fr) 180px 200px 200px; }
@media (max-width: 900px) { .ls-map { height: 320px; } .ls-filters { grid-template-columns: minmax(0, 1fr); } }
.w-filters { grid-template-columns: 170px 170px 200px minmax(280px, 340px); }
@media (max-width: 900px) { .w-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* 마케팅 분석: 두 칸 (PC) */
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 900px) { .mk-grid { grid-template-columns: minmax(0, 1fr); } }
/* 마케팅 분석 (GA4 보고서) */
.mk-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mk-stats .stat small { font-size: 12px; font-weight: 600; }
.mk-stats .stat small.up { color: #0a7d3c; }
.mk-stats .stat small.down { color: #c62828; }
.mk-bar { display: inline-block; vertical-align: middle; margin-right: 8px; max-width: 120px; }
.mk-ex-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mk-cohort td[style] { background: rgb(0 82 255 / calc(var(--a) * .55)); }
.mk-cohort td[style] span { color: var(--ink); }
@media (max-width: 900px) { .mk-ex-grid { grid-template-columns: minmax(0, 1fr); } }
.mk-fx-step { display: grid; grid-template-columns: 24px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.mk-funnel { display: grid; gap: 14px; }
.mk-fx-bar { position: relative; height: 34px; background: var(--soft); border-radius: 6px; overflow: hidden; margin: 6px 0 4px; }
.mk-fx-bar span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: #0052ff; opacity: .8; }
.mk-fx-bar em { position: relative; font-style: normal; font-weight: 600; line-height: 34px; padding-left: 10px; }
.mk-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.mk-path-col h3 { margin: 0 0 10px; font-size: 14px; }
.mk-path-item { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; gap: 8px; align-items: center; width: 100%; padding: 6px 4px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 4px; font: inherit; }
.mk-path-item:hover:not(:disabled) { background: var(--soft); }
.mk-path-item:disabled { cursor: default; color: inherit; }
.mk-path-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-path-bar { height: 8px; border-radius: 4px; background: linear-gradient(to right, #0052ff var(--w), transparent var(--w)); }
.mk-path-start { display: flex; flex-direction: column; }
.mk-path-now { display: flex; flex-direction: column; gap: 6px; font-size: 16px; justify-content: center; flex: 1; }
.mk-path-now b { font-size: 24px; }
@media (max-width: 900px) { .mk-paths { grid-template-columns: minmax(0, 1fr); } .mk-fx-step { grid-template-columns: 24px minmax(0, 1fr); } }
.form .mk-check { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.form .mk-check input { width: auto; flex: none; margin: 0; }
/* 입력칸 · 선택칸 = 버튼 높이(40px), 라벨 달린 칸 옆 버튼은 칸 아래쪽에 맞춤 */
.adm .form :is(input:not([type=checkbox]):not([type=radio]), select) { min-height: 40px; padding: 8px 12px; border-radius: 6px; }
.adm .row:has(> .btn):has(> label > :is(input, select)), .adm .row.between:has(> .row > label > :is(input, select)) { align-items: flex-end; }
/* 마케팅 분석 읽기 쉽게: 탭 묶음 · 한눈에 요약 · 숫자 카드 · 그래프 · 구역 간격 */
.mk { display: grid; gap: 18px; }
.mk > * { min-width: 0; margin: 0; }
.mk-nav { display: flex; flex-wrap: wrap; gap: 12px 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px 6px; }
.mk-nav-g { display: grid; gap: 6px; align-content: start; padding: 0 14px; }
.mk-nav-g + .mk-nav-g { border-left: 1px solid var(--line); }
.mk-nav-g > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.mk-nav .adm-tabs { gap: 6px; flex-wrap: nowrap; }
.mk-nav .adm-tabs button { height: 34px; padding: 0 14px; white-space: nowrap; }
.mk-sum { background: #fffaeb; border: 1px solid #fde9b0; border-left: 4px solid var(--gold); border-radius: 6px; padding: 14px 18px; }
.mk-sum > b { display: block; font-size: 13px; color: var(--gold-strong); margin-bottom: 6px; }
.mk-sum ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; line-height: 1.6; }
.mk .mk-stats { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mk .stat { align-content: start; gap: 6px; }
.mk .stat > span { line-height: 1.35; }
.mk .stat b { font-size: 24px; line-height: 1.2; white-space: nowrap; }
.mk .chart-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.mk .chart .bars { height: 120px; }
.mk h2 { margin: 6px 0 10px; font-size: 17px; }
.mk h2 small { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; }
.mk section > h2 { margin-top: 0; }
.mk .mk-grid { gap: 10px 18px; align-items: start; }
.mk .mk-grid > section > h2 { margin: 0; }
.mk .mk-grid > section:nth-child(n+3) > h2 { margin-top: 14px; }
@media (max-width: 900px) { .mk .mk-grid > section + section > h2 { margin-top: 14px; } }
/* 나란히 놓인 구역: 제목(설명 줄 있든 없든) 줄과 본문 박스 줄을 맞춤, 박스 높이도 같게 */
.mk .mk-grid > section { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.mk .mk-grid > section > h2 { align-self: end; }
.mk .mk-sec-b { display: grid; gap: 12px; align-content: start; }
.mk .mk-grid > section > .mk-sec-b:has(> .empty:only-child) { align-content: stretch; } /* '자료가 없어요' 상자끼리는 높이도 같게 */
.mk .mk-grid > section > .mk-sec-b > .empty:only-child { display: grid; place-items: center; }
@media (max-width: 900px) {
  .mk-nav { padding: 10px 4px; }
  .mk-nav-g { padding: 0 10px; }
  .mk-nav-g + .mk-nav-g { border-left: 0; }
  .mk-nav .adm-tabs { flex-wrap: wrap; }
}
.mk #fx-out, .mk #ex-out { display: grid; gap: 18px; }
.mk :is(select, input:not([type=checkbox]):not([type=radio])):not(.adm-field *) { min-height: 40px; padding: 8px 12px; border-radius: 6px; }
.mk label:not(.adm-field) > select { width: auto; max-width: 100%; }
.mk-guide { padding: 14px 18px; }
.mk-guide summary { cursor: pointer; }
.mk-guide ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.6; }
.mk-guide code { background: var(--soft, #f3f4f6); padding: 4px 8px; border-radius: 4px; word-break: break-all; }
.mk-acts { display: grid; gap: 4px; justify-items: stretch; }
@media (max-width: 900px) { .mk-range { width: 100%; flex-wrap: wrap; } }

/* 프로영업팀: 업소 조회 */
.sales-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 10px; }
.sales-filters .btn { min-height: 40px; }
.sales-sum { margin: 0; color: #374151; }
.sales-sum b { color: var(--ink); }
.sales-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.sales-chip:hover { border-color: var(--gold); }
.sales-chip small { color: var(--muted); }
.sales-chip .badge { padding: 1px 8px; font-size: 11px; }
.sales-chip.dim { opacity: .45; }
.sales-memo { white-space: pre-wrap; max-width: 260px; overflow-wrap: anywhere; }
.adm-who { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.adm-who .avatar { width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; color: #6b7280; display: grid; place-items: center; }
.adm-who .avatar .ic { width: 20px; height: 20px; }
.adm .empty { padding: 28px; text-align: center; color: var(--muted); background: #fff; margin: 0; }
.adm .muted { color: var(--muted); }
.adm td.num { text-align: right; font-variant-numeric: tabular-nums; }
body[data-kind='admin'] .sheet h4 { margin: 6px 0 0; font-size: 15px; }
body[data-kind='admin'] .sheet table { width: 100%; border-collapse: collapse; font-size: 13px; }
body[data-kind='admin'] .sheet th, body[data-kind='admin'] .sheet td { padding: 8px 10px; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
body[data-kind='admin'] .sheet th { background: #f9fafb; font-weight: 500; white-space: nowrap; }
body[data-kind='admin'] .sheet .table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 6px; }
body[data-kind='admin'] .sheet .badge { border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; vertical-align: middle; }
@media (max-width: 1200px) { .sales-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sales-filters > :nth-child(4) { grid-column: span 2; } }
@media (max-width: 600px) { .sales-filters { grid-template-columns: minmax(0, 1fr); } .sales-filters > :nth-child(4) { grid-column: auto; } }
.badge.orange { background: #fde5d6; color: #c2410c; }
.badge.muted { background: #f1f2f4; color: #6b7280; }
/* 지도 */
.sales-map { height: 420px; border: 1px solid var(--line); border-radius: 6px; z-index: 0; }
.sales-pin span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #c8161d; color: #fff; font: 700 12px/1 Inter, sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); }
.sales-chips.pop { margin-top: 8px; flex-direction: column; align-items: stretch; max-height: 240px; overflow-y: auto; }
@media (max-width: 600px) { .sales-map { height: 300px; } }
