/* 송탄123한방 상담 관리 — 관리자 화면 v7 (2026-10-19) · r41 토스 스타일(2026-10-26)
   디자인 시스템: Pretendard · Navy/Blue Primary · Neutral Gray · Semantic(Success/Warning/Danger/Info)
   제약: 외부 리소스 없음(CSP default-src 'none' / style-src 'self' / font-src 'self' / img-src 'self' data:), 인라인 style 속성 없음. */

/* ───────────── 1. 디자인 토큰 ───────────── */
:root {
  /* r41(2026-10-26) 토스 스타일 개편: 회색 바탕 + 흰 카드(선·그림자 없음) · 둥근 모서리 · 큰 굵은 제목 · 강조색 = 병원 강조색 */
  /* Brand / Primary (병원 강조색) */
  --navy-900: #12345e; --navy-800: #0c2647;
  --blue-700: #1b4f9c; --blue-600: #12345e; --blue-100: #dde6f2; --blue-50: #eef3f9;
  /* Neutral (토스 계열 회색) */
  --gray-0: #ffffff; --gray-25: #f9fafb; --gray-50: #f2f4f6; --gray-100: #eaedf0; --gray-200: #e5e8eb; --gray-300: #d1d6db;
  --gray-400: #b0b8c1; --gray-500: #5f6a78; --gray-700: #4e5968; --gray-900: #191f28;
  /* Semantic (텍스트 색은 해당 배경에서 4.5:1 이상) */
  --success-700: #0a7a4b; --success-50: #e7f7ef; --success-500: #12b76a;
  --warning-700: #a84f00; --warning-50: #fff2e2; --warning-500: #ff8a1f;
  --danger-700:  #c8202f; --danger-50:  #ffeef0; --danger-500:  #f04452;
  --info-700:    #1b64da; --info-50:    #e8f3ff; --info-500:    #3182f6;
  --violet-700:  #5a3fd1; --violet-50:  #f1edff; --violet-500:  #7b61ff;
  /* Roles */
  --bg: var(--gray-50); --surface: var(--gray-0); --surface-sub: var(--gray-25);
  --border: var(--gray-100); --border-strong: var(--gray-300);
  --text: var(--gray-900); --text-2: var(--gray-700); --text-3: var(--gray-500); --text-disabled: var(--gray-400);
  --primary: var(--navy-900); --primary-hover: var(--navy-800); --primary-soft: var(--blue-50); --focus: rgba(18, 52, 94, .22);
  /* Spacing scale (4px 기반) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  /* Radius */
  --r-sm: 10px; --r-md: 12px; --r-lg: 20px; --r-full: 999px;
  /* Elevation — 카드는 그림자 없음, 떠 있는 것(창·메뉴)만 */
  --sh-1: none;
  --sh-2: none;
  --sh-3: 0 24px 64px rgba(25, 31, 40, .18), 0 2px 8px rgba(25, 31, 40, .06);
  /* Typography */
  --font: Pretendard, "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .9375rem; --fs-15: 1rem; --fs-16: 1.0625rem; --fs-18: 1.1875rem; --fs-20: 1.375rem; --fs-24: 1.625rem; --fs-32: 2rem;
  /* Layout */
  --sidebar: 248px; --content-max: 1440px; --control-h: 44px;
}

/* ───────────── 2. 기본 ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-14); line-height: 1.5; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
h1 { font-size: var(--fs-24); line-height: 1.3; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h2 { font-size: var(--fs-16); line-height: 1.4; font-weight: 700; letter-spacing: -.01em; margin: 0 0 var(--s3); }
p { margin: 0; }
strong { font-weight: 700; color: var(--text); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); } .small { font-size: var(--fs-13); } .center { text-align: center; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ───────────── 3. 컨트롤 ───────────── */
label { display: block; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
input:not([type=checkbox]), select, textarea {
  display: block; width: 100%; min-width: 0; height: var(--control-h); margin-top: 6px; padding: 0 var(--s3);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface);
  font: inherit; font-size: var(--fs-14); font-weight: 400; color: var(--text); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 120px; padding: 10px var(--s3); resize: vertical; line-height: 1.6; }
select { padding-right: var(--s8); appearance: none; -webkit-appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23646c79' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
input::placeholder, textarea::placeholder { color: #868d99; }
input:hover, select:hover, textarea:hover { border-color: var(--gray-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--gray-50); color: var(--text-disabled); cursor: not-allowed; }
input[type=date] { font-variant-numeric: tabular-nums; }
.input-code { font-size: var(--fs-18) !important; letter-spacing: .2em; font-variant-numeric: tabular-nums; text-align: center; }
label > input, label > select, label > textarea { margin-top: 6px; }
label.check { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-sub); font-weight: 400; font-size: var(--fs-14); color: var(--text-2); cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
label.check em { font-style: normal; color: var(--warning-700); }

/* 버튼: primary(기본) · ghost · sm/lg · block */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: var(--control-h); padding: 0 var(--s4);
  border: 1px solid var(--primary); border-radius: var(--r-sm); background: var(--primary); color: #fff;
  font: inherit; font-size: var(--fs-14); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--gray-100); border-color: var(--gray-200); color: var(--text-disabled); cursor: not-allowed; transform: none; }
.btn--ghost, .btn.alt { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn--ghost:hover, .btn.alt:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--text); }
.btn--ghost:disabled { background: var(--surface); }
.btn--sm { height: 32px; padding: 0 var(--s3); font-size: var(--fs-13); }
.btn--lg { height: 48px; font-size: var(--fs-15); }
.btn--block { width: 100%; }
.link { padding: 2px 0; border: 0; background: none; font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--primary); cursor: pointer; }
.link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--text-disabled); cursor: default; text-decoration: none; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); font-size: 0; cursor: pointer; }
.icon-btn::before { content: "\2715"; font-size: 15px; line-height: 1; }
.icon-btn:hover { background: var(--gray-100); color: var(--text); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: var(--s2); margin-top: var(--s2); }

/* 알림 메시지 */
.msg { display: flex; gap: var(--s2); margin: var(--s3) 0 0; padding: 10px var(--s3); border-radius: var(--r-sm); font-size: var(--fs-13); line-height: 1.5; background: var(--danger-50); color: var(--danger-700); }
.msg::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: var(--r-full); background: var(--msg-ic, var(--danger-700)); color: #fff; font-size: 11px; font-weight: 800; }
.msg.ok { --msg-ic: var(--success-700); background: var(--success-50); color: var(--success-700); } .msg.ok::before { content: "\2713"; }
.msg.warn { --msg-ic: var(--warning-700); background: var(--warning-50); color: var(--warning-700); }
.note { background: var(--warning-50); border-color: #f6d7ad; color: var(--warning-700); word-break: break-all; font-size: var(--fs-13); }

/* 상태 배지 (Semantic) */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); background: var(--gray-100); color: var(--text-2); font-size: var(--fs-12); font-weight: 600; white-space: nowrap; }
.tag[data-status]::before, .dot { content: ""; flex: none; width: 6px; height: 6px; border-radius: var(--r-full); background: currentColor; }
.tag[data-status="상담요망"] { background: var(--warning-50); color: var(--warning-700); }
.tag[data-status="상담완료"] { background: var(--blue-50); color: var(--blue-700); }
.tag[data-status="다시일정체크"] { background: var(--info-50); color: var(--info-700); }
.tag[data-status="방문예정"] { background: var(--violet-50); color: var(--violet-700); }
.tag[data-status="방문완료"] { background: var(--success-50); color: var(--success-700); }
.tag[data-status="부재중"] { background: var(--gray-100); color: var(--gray-700); }
.tag[data-status="미예약"] { background: var(--danger-50); color: var(--danger-700); }
.tag[data-status="보류"], .tag[data-status=""] { background: var(--surface); color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tag.on, .tag[data-delivery="sent"] { background: var(--success-50); color: var(--success-700); }
.tag.off, .tag[data-delivery="failed"], .tag[data-delivery="dead"] { background: var(--danger-50); color: var(--danger-700); }
.tag[data-delivery="pending"], .tag[data-delivery="retrying"] { background: var(--warning-50); color: var(--warning-700); }
/* 분포 막대·범례 색 */
.dot { display: inline-block; width: 8px; height: 8px; background: var(--gray-400); }
[data-status="상담요망"].dot, .dist-bar__seg[data-status="상담요망"] { background: var(--warning-500); }
[data-status="상담완료"].dot, .dist-bar__seg[data-status="상담완료"] { background: var(--blue-700); }
[data-status="다시일정체크"].dot, .dist-bar__seg[data-status="다시일정체크"] { background: var(--info-500); }
[data-status="방문예정"].dot, .dist-bar__seg[data-status="방문예정"] { background: var(--violet-500); }
[data-status="방문완료"].dot, .dist-bar__seg[data-status="방문완료"] { background: var(--success-500); }
[data-status="부재중"].dot, .dist-bar__seg[data-status="부재중"] { background: var(--gray-400); }
[data-status="미예약"].dot, .dist-bar__seg[data-status="미예약"] { background: var(--danger-500); }
[data-status="보류"].dot, .dist-bar__seg[data-status="보류"], [data-status=""].dot, .dist-bar__seg[data-status=""] { background: var(--gray-300); }

/* 카드 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); margin-bottom: var(--s4); box-shadow: var(--sh-1); }
.card > h2 { margin-bottom: var(--s2); }
.card > h2 + .muted { margin-bottom: var(--s4); }

/* ───────────── 4. 레이아웃 ───────────── */
main { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--s8) var(--s10) var(--s12); }
.boot { padding: 30vh 0 0; text-align: center; color: var(--text-3); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); }
.page-head p { margin-top: var(--s1); font-size: var(--fs-14); }
.page-head__action { flex: none; }
.footnote { margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid var(--border); text-align: center; color: var(--text-3); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s4); align-items: start; }
.grid-2 > .card, .stack-cards > .card { margin-bottom: 0; }
.stack-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.grid-2 + .card { margin-top: var(--s4); }

/* 사이드바 / 상단 메뉴 */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s6); min-height: 60px; padding: 0 var(--s6); background: var(--surface); border-bottom: 1px solid var(--border); }
.top__brand { display: flex; align-items: center; gap: var(--s3); flex: none; }
.top__logo { display: block; height: 26px; width: auto; }
.top__product { font-size: var(--fs-12); font-weight: 700; color: var(--text-3); letter-spacing: .02em; white-space: nowrap; }
.top__tabs { display: flex; gap: var(--s1); flex: 1; overflow-x: auto; scrollbar-width: none; }
.top__tabs::-webkit-scrollbar { display: none; }
.top__tabs button { position: relative; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 var(--s3); border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--text-3); white-space: nowrap; cursor: pointer; transition: background .12s, color .12s; }
.top__tabs button::before { content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ic) no-repeat center / contain; mask: var(--ic) no-repeat center / contain; }
.top__tabs button:hover { background: var(--gray-50); color: var(--text); }
.top__tabs button[aria-selected="true"] { background: var(--primary-soft); color: var(--blue-700); }
.top__tabs button[data-tab="list"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2.5'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E"); }
.top__tabs button[data-tab="new"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.top__tabs button[data-tab="notify"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16v-5a6 6 0 0 1 12 0v5l1.5 2h-15z'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.top__tabs button[data-tab="users"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18.5 20a6 6 0 0 0-3-5.2'/%3E%3C/svg%3E"); }
.top__user { display: flex; align-items: center; gap: var(--s3); flex: none; min-width: 0; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--navy-900); color: #fff; font-size: var(--fs-13); font-weight: 700; }
.top__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.top__who #who { font-size: var(--fs-13); font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top__role { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1024px) {
  .top { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); flex-direction: column; align-items: stretch; gap: 0; padding: var(--s6) var(--s4) var(--s4); border-bottom: 0; border-right: 1px solid var(--border); overflow-y: auto; }
  .top__brand { flex-direction: column; align-items: flex-start; gap: var(--s2); padding: 0 var(--s2) var(--s6); }
  .top__tabs { flex: 1; flex-direction: column; gap: 2px; overflow: visible; }
  .top__tabs::before { content: none; }
  .top__tabs button { width: 100%; text-align: left; }
  .top__tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: calc(var(--s4) * -1); top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
  .top__user { flex-wrap: wrap; gap: var(--s3); padding: var(--s4) var(--s2) 0; border-top: 1px solid var(--border); }
  .top__who { flex: 1; }
  .top__user .btn { width: 100%; }
  body:has(> header#top:not([hidden])) main { width: auto; margin-left: var(--sidebar); max-width: none; }
  body:has(> header#top:not([hidden])) main > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }
}

/* ───────────── 5. 상담 목록 ───────────── */
/* 통계: 핵심 KPI 2개 + 처리상태 분포 1개 */
.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.4fr); gap: var(--s4); margin-bottom: var(--s4); }
.kpi { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; padding: var(--s5) var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.kpi__label { font-size: var(--fs-13); font-weight: 600; color: var(--text-3); }
.kpi__value { font-size: var(--fs-32); line-height: 1.15; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi__unit { font-size: var(--fs-13); color: var(--text-3); }
.kpi:not(.kpi--dist) { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: space-between; column-gap: 6px; }
.kpi:not(.kpi--dist) .kpi__label { grid-column: 1 / -1; }
.kpi:not(.kpi--dist) .kpi__unit { align-self: end; padding-bottom: 6px; }
.kpi--primary { background: var(--navy-900); border-color: var(--navy-900); box-shadow: 0 6px 20px rgba(19, 28, 70, .18); }
.kpi--primary .kpi__label { color: #c9d2ff; } .kpi--primary .kpi__value { color: #fff; } .kpi--primary .kpi__unit { color: #c9d2ff; }
.kpi--dist { gap: var(--s3); }
.kpi__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.kpi__meta { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.kpi__empty { color: var(--text-3); font-size: var(--fs-13); padding: var(--s2) 0; }
.dist-bar { display: flex; gap: 2px; height: 10px; border-radius: var(--r-full); overflow: hidden; background: var(--gray-100); }
.dist-bar__seg { min-width: 4px; }
.dist-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s2) var(--s4); margin: 0; padding: 0; list-style: none; }
.dist-legend li { display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: var(--fs-13); color: var(--text-2); }
.dist-legend__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-legend b { font-variant-numeric: tabular-nums; color: var(--text); }

/* 검색 필터: 한 줄 툴바 */
.filters { display: grid; grid-template-columns: minmax(280px, 1.6fr) repeat(3, minmax(120px, 1fr)) auto; gap: var(--s3); align-items: end; margin-bottom: var(--s4); padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.field { min-width: 0; font-size: var(--fs-12); font-weight: 600; color: var(--text-3); }
.field__label { display: block; }
.field--hidden { display: none; }
.range { display: flex; align-items: center; gap: var(--s2); margin-top: 6px; }
.range input { margin-top: 0; }
.range__sep { color: var(--text-3); }
.filters__actions { display: flex; gap: var(--s2); }

/* 데이터 테이블 */
.table-card { padding: 0; overflow: hidden; }
.table-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.table-card__count { flex: none; font-size: var(--fs-13); font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.status-tabs { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs button { flex: none; height: 32px; padding: 0 var(--s3); border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface); font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.status-tabs button:hover { border-color: var(--gray-400); color: var(--text); }
.status-tabs button[aria-selected="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.table-scroll { position: relative; overflow-x: auto; }
.table-scroll--flush { margin: var(--s3) calc(var(--s6) * -1) 0; border-top: 1px solid var(--border); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.tbl th { height: 40px; padding: 0 var(--s4); background: var(--surface-sub); border-bottom: 1px solid var(--border); text-align: left; font-size: var(--fs-12); font-weight: 600; color: var(--text-3); white-space: nowrap; }
.tbl td { height: 52px; padding: var(--s2) var(--s4); border-bottom: 1px solid var(--gray-100); vertical-align: middle; white-space: nowrap; color: var(--text-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: var(--gray-25); }
.table-scroll--flush .tbl th:first-child, .table-scroll--flush .tbl td:first-child { padding-left: var(--s6); }
.table-scroll--flush .tbl th:last-child, .table-scroll--flush .tbl td:last-child { padding-right: var(--s6); }
.tbl td.muted { color: var(--text-3); }
.tbl select { width: auto; height: 32px; margin: 0; padding: 0 var(--s8) 0 var(--s2); font-size: var(--fs-13); }
.tbl td .link + .link { margin-left: var(--s3); }
/* 상담 목록 열 */
.tbl--leads th:first-child, .tbl--leads td:first-child { padding-left: var(--s5); }
.tbl--leads th:last-child, .tbl--leads td:last-child { padding-right: var(--s5); width: 1%; }
.tbl--leads tbody tr.is-clickable { cursor: pointer; }
.tbl--leads tbody tr:hover { background: var(--blue-50); }
.c-date { font-variant-numeric: tabular-nums; }
.c-date__d { color: var(--text); font-weight: 500; }
.c-date__t { margin-left: var(--s2); color: var(--text-3); }
.c-name { color: var(--text) !important; font-weight: 700; }
.c-phone { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.src { display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); background: var(--gray-100); font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
.row-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .12s; }
.row-btn::after { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain; }
.tbl--leads tbody tr:hover .row-btn, .row-btn:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s1); padding: var(--s12) var(--s4); text-align: center; color: var(--text-3); }
.empty strong { font-size: var(--fs-15); color: var(--text-2); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); background: var(--surface-sub); }
.pager:empty { display: none; }
.pager__info { margin-right: var(--s2); font-size: var(--fs-13); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ───────────── 6. 폼·알림·계정 ───────────── */
/* 상담 수동 등록: 컴팩트 폼(최대 920px, 가운데) */
#p-new > .page-head, #p-new > .form-card { width: 100%; max-width: 920px; margin-left: auto; margin-right: auto; }
#p-new > .page-head { margin-bottom: var(--s5); }
.form-card { padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s5); padding: var(--s6) var(--s6) var(--s5); }
.form-grid .span-2 { grid-column: 1 / -1; }
#f-new textarea { height: 160px; min-height: 96px; max-height: 480px; overflow-y: auto; resize: vertical; }
#f-new label.check { padding: 10px var(--s4); font-size: var(--fs-13); line-height: 1.55; }
#f-new label.check input { margin-top: 1px; }
.form-card > .msg { margin: 0 var(--s6) var(--s4); }
.form-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s6); border-top: 1px solid var(--border); background: var(--surface-sub); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.form-card__foot::before { content: "필수: 이름 · 연락처 · 동의 확인"; font-size: var(--fs-12); color: var(--text-3); }
.form-card__foot .btn { min-width: 120px; }
.inline { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.inline h2.full { flex-basis: 100%; margin: 0; }
.inline label { flex: 1 1 180px; }
#f-recipient { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: 9rem minmax(0, 1fr); margin: 0 0 var(--s4); }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.kv dt { font-size: var(--fs-13); color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; white-space: pre-wrap; }
#n-status h2 { margin-bottom: var(--s3); }
#n-status .msg { margin: 0 0 var(--s3); }

/* ───────────── 7. 인증 화면 ───────────── */
body:has(> header#top[hidden]) { background: var(--bg) linear-gradient(var(--navy-900), var(--navy-900)) no-repeat top / 100% 36vh; }
.narrow { width: 100%; max-width: 420px; margin: 12vh auto 0; padding: var(--s10) var(--s8) var(--s8); border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.narrow--wide { max-width: 520px; }
.narrow::before { content: ""; display: block; height: 28px; margin-bottom: var(--s8); background: url("clinic-logo.svg") no-repeat left center / contain; }
.narrow h1 { font-size: var(--fs-24); margin-bottom: var(--s2); }
.narrow > p.muted { margin-bottom: var(--s6); font-size: var(--fs-14); }
.narrow form > label { margin-bottom: var(--s4); }
.narrow form > .btn { margin-top: var(--s2); }
.narrow h2 { margin-top: var(--s2); }
.narrow__foot { margin-top: var(--s5); text-align: center; }
.secret { display: inline-block; padding: 4px 8px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--navy-900); font-size: var(--fs-16); letter-spacing: .08em; }
.uri { display: block; margin-bottom: var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--gray-50); font-size: var(--fs-12); color: var(--text-3); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); margin: var(--s4) 0 var(--s6); padding: 0; list-style: none; }
.codes li { padding: var(--s2); border: 1px dashed var(--border-strong); border-radius: var(--r-sm); background: var(--gray-25); font-family: ui-monospace, Consolas, monospace; text-align: center; }

/* ───────────── 8. 상담 상세(다이얼로그) ───────────── */
dialog { width: min(680px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: var(--sh-3); color: var(--text); overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgba(21, 27, 38, .48); }
.dlg__close { position: absolute; top: var(--s4); right: var(--s4); margin: 0; z-index: 2; }
#dlg-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
#dlg-body > h2 { order: 0; margin: 0; padding: var(--s6) var(--s12) 0 var(--s6); font-size: var(--fs-20); }
#dlg-body > .dlg-meta { order: 1; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s6) var(--s4); border-bottom: 1px solid var(--border); font-size: var(--fs-13); color: var(--text-3); font-variant-numeric: tabular-nums; }
#dlg-body > p.small { order: 2; margin: var(--s4) var(--s6) 0; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--info-50); color: var(--info-700); font-size: var(--fs-12); font-weight: 600; }
#dlg-body > .kv { order: 3; margin: var(--s2) var(--s6) 0; grid-template-columns: 7rem minmax(0, 1fr); }
#dlg-body > .kv dd:nth-of-type(2), #dlg-body > .kv dd:nth-of-type(3) { font-size: var(--fs-16); font-weight: 700; font-variant-numeric: tabular-nums; }
#dlg-body > .kv dd:nth-of-type(6) { padding: var(--s3); margin: var(--s2) 0; border: 0; border-radius: var(--r-md); background: var(--gray-50); line-height: 1.7; min-height: 72px; }
#dlg-body > .kv dt:nth-of-type(6) { padding-top: calc(var(--s2) + var(--s3)); }
#dlg-body > .kv dd:last-of-type, #dlg-body > .kv dt:last-of-type { border-bottom: 0; font-size: var(--fs-13); color: var(--text-3); }
#dlg-body > label { order: 4; margin: var(--s4) var(--s6) 0; }
#dlg-body > .msg { order: 6; margin: var(--s3) var(--s6) 0; }
#dlg-body > .row { order: 7; position: sticky; bottom: 0; flex-direction: row-reverse; justify-content: flex-start; gap: var(--s2); margin-top: var(--s6); padding: var(--s4) var(--s6); border-top: 1px solid var(--border); background: var(--surface-sub); }
#dlg-body > .row .btn { min-width: 112px; }
#dlg-body > .row .link { height: var(--control-h); padding: 0 var(--s4); border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); }
#dlg-body > .row .link:hover { background: var(--gray-50); text-decoration: none; color: var(--text); }

/* 상담 메모 */
#dlg-body > .notes { order: 5; margin: var(--s5) var(--s6) 0; padding-top: var(--s4); border-top: 1px solid var(--border); }
.notes__head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.notes__head h3 { margin: 0; font-size: var(--fs-15); font-weight: 700; }
.notes__count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--gray-100); font-size: var(--fs-12); font-weight: 700; line-height: 20px; text-align: center; color: var(--text-2); }
.notes__count:empty { display: none; }
.notes__hint { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); }
.notes__form { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.notes__form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.notes__form textarea { margin: 0; min-height: 76px; height: 76px; border: 0; border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: none !important; resize: vertical; }
.notes__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 6px 6px 6px var(--s3); border-top: 1px solid var(--gray-100); }
.notes__len { font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
.notes .msg { margin-top: var(--s2); }
.notes__list { margin: var(--s3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.note-item { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--gray-50); }
.note-item__meta { display: flex; align-items: center; gap: var(--s2); margin-bottom: 4px; font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
.note-item__author { font-weight: 700; color: var(--text-2); }
.note-item__at::before { content: "·"; margin-right: var(--s2); }
.note-item__body { margin: 0; font-size: var(--fs-14); line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.notes__empty { padding: var(--s3) 0; font-size: var(--fs-13); color: var(--text-3); text-align: center; }

/* ───────────── 9. 반응형 ───────────── */
@media (max-width: 1279px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi--dist { grid-column: 1 / -1; }
  .filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filters > .field--range { grid-column: span 3; }
  .filters > label.field:nth-of-type(1) { grid-column: span 3; }
  .filters > label.field:nth-of-type(2), .filters > label.field:nth-of-type(3) { grid-column: span 2; }
  .filters__actions { grid-column: span 2; }
  .filters__actions .btn { flex: 1; }
}
@media (min-width: 1024px) and (max-width: 1279px) { main { padding: var(--s6) var(--s6) var(--s10); } }
@media (max-width: 1023px) {
  main { padding: var(--s6) var(--s6) var(--s10); }
  .top { padding: 0 var(--s4); gap: var(--s4); }
  .top__product { display: none; }
  .top__who { display: none; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  html { font-size: 16px; }
  main { padding: var(--s5) var(--s4) var(--s10); }
  .top { flex-wrap: wrap; min-height: 0; padding: var(--s3) var(--s4) 0; gap: 0 var(--s3); }
  .top__brand { flex: 1; }
  .top__logo { height: 22px; }
  .avatar { display: none; }
  .top__tabs { order: 3; flex-basis: 100%; margin: var(--s2) calc(var(--s4) * -1) 0; padding: 0 var(--s2) var(--s2); }
  .top__tabs button { height: 36px; padding: 0 var(--s3); }
  .page-head { align-items: flex-start; flex-direction: column; gap: var(--s3); margin-bottom: var(--s5); }
  .page-head__action { width: 100%; }
  h1 { font-size: var(--fs-20); }
  .kpi { padding: var(--s4); }
  .kpi__value { font-size: 1.75rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s4); }
  .filters > .field--range, .filters__actions { grid-column: 1 / -1 !important; }
  .filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2), .filters > label.field:nth-of-type(3) { grid-column: span 1; }
  .filters > label.field:nth-of-type(3) { grid-column: 1 / -1; }
  .filters__actions .btn { flex: 1; }
  .table-card__head { flex-direction: column; align-items: stretch; gap: var(--s2); padding: var(--s3); }
  .table-card__count { align-self: flex-end; }
  /* 목록: 표 대신 카드형 행 */
  .tbl--leads thead { display: none; }
  .tbl--leads, .tbl--leads tbody { display: block; }
  .tbl--leads tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "phone act" "date act" "src act"; gap: 2px var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--gray-100); }
  .tbl--leads td { display: block; height: auto; padding: 0 !important; border: 0; white-space: normal; }
  .tbl--leads td:nth-child(1) { grid-area: date; font-size: var(--fs-13); }
  .tbl--leads td:nth-child(2) { grid-area: name; font-size: var(--fs-15); }
  .tbl--leads td:nth-child(3) { grid-area: phone; }
  .tbl--leads td:nth-child(4) { grid-area: src; margin-top: 4px; }
  .tbl--leads td:nth-child(5) { grid-area: status; justify-self: end; }
  .tbl--leads td:nth-child(6) { grid-area: act; align-self: center; justify-self: end; width: auto; }
  .card { padding: var(--s5); }
  .table-scroll--flush { margin-left: calc(var(--s5) * -1); margin-right: calc(var(--s5) * -1); }
  .form-grid { grid-template-columns: 1fr; gap: var(--s4); padding: var(--s5); }
  .form-card__foot { padding: var(--s4) var(--s5); } .form-card__foot::before { display: none; } .form-card__foot .btn { width: 100%; }
  .form-card > .msg { margin: 0 var(--s5) var(--s4); }
  .kv { grid-template-columns: 6.5rem minmax(0, 1fr); }
  body:has(> header#top[hidden]) { background-size: 100% 28vh; }
  .narrow { margin-top: 8vh; padding: var(--s8) var(--s6) var(--s6); }
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  #dlg-body > h2 { padding-left: var(--s5); } #dlg-body > .dlg-meta { padding: var(--s2) var(--s5) var(--s4); }
  #dlg-body > p.small, #dlg-body > .kv, #dlg-body > label, #dlg-body > .msg, #dlg-body > .notes { margin-left: var(--s5); margin-right: var(--s5); }
  .notes__hint { display: none; }
  #dlg-body > .kv { grid-template-columns: 5.5rem minmax(0, 1fr); }
  #dlg-body > .row { padding: var(--s3) var(--s5); } #dlg-body > .row .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 수동 등록 동의 확인(2026-10-19): 항목별 4개, 2열 */
#f-new .consent-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); margin: 0; padding: 0; border: 0; min-width: 0; }
#f-new .consent-set legend { grid-column: 1 / -1; padding: 0; margin-bottom: var(--s2); font-size: var(--fs-14); font-weight: 600; color: var(--text); }
#f-new .consent-set legend .muted { margin-left: var(--s2); font-size: var(--fs-13); font-weight: 400; }
#f-new .consent-set label.check { margin: 0; }
#f-new .consent-set label.check b { color: var(--text); font-weight: 600; }
#f-new .consent-set input:disabled + span { opacity: .55; }
@media (max-width: 767px) { #f-new .consent-set { grid-template-columns: 1fr; } }
/* 2026-10-20 환자 접수 확인 문자 설정 */
#n-enable label.check + label.check { margin-top: var(--s3); }
#n-enable #f-ack-max { margin-top: var(--s3); }
#f-login .muted.small { margin-top: var(--s3); }
/* 2026-10-20 계정 관리: 좁은 화면에서도 관리 버튼(비밀번호 초기화 등)이 보이게 행 아래 줄로 */
#u-table tr.u-act-row { display: none; }
@media (max-width: 1180px) {
  #u-table th.u-act-h, #u-table td.u-act-inline { display: none; }
  #u-table tr.u-act-row { display: table-row; }
  #u-table tr.u-act-row td { padding-top: 0; border-top: 0; }
  #u-table .u-act-wrap { position: sticky; left: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); max-width: calc(100vw - 2 * var(--s6)); }
}
/* 2026-10-20 MFA 등록: 단계 안내·QR 코드 */
.enroll-steps { margin: var(--s4) 0 var(--s5); padding-left: 1.4em; display: grid; gap: var(--s2); font-size: var(--fs-14); color: var(--text-2); }
.enroll-steps li { line-height: 1.6; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: var(--s2); margin: var(--s2) 0 var(--s4); }
.qr-box canvas { width: 232px; height: 232px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); image-rendering: pixelated; }
/* 2026-10-20 신뢰 기기 패널 */
#u-devices .d-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
/* 2026-10-20 계정 표시 이름 변경 */
#u-table .u-name { white-space: nowrap; }
#u-table .u-name-input { width: 9em; padding: 4px 8px; margin-right: var(--s2); }
#u-table button.small { font-size: var(--fs-12); }

/* ───────────── 8. 예약 캘린더 (2026-10-20) ───────────── */
.top__tabs button[data-tab="resv"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3Cpath d='M8 14h2M12 14h2M8 17h2'/%3E%3C/svg%3E"); }
/* 상태 색: 예약(파랑)·확정(보라)·내원(초록)·노쇼(주황)·취소(회색 취소선) */
[data-st="예약"] { --st-bg: var(--info-50); --st-fg: var(--info-700); --st-dot: var(--info-500); }
[data-st="확정"] { --st-bg: var(--violet-50); --st-fg: var(--violet-700); --st-dot: var(--violet-500); }
[data-st="내원"] { --st-bg: var(--success-50); --st-fg: var(--success-700); --st-dot: var(--success-500); }
[data-st="노쇼"] { --st-bg: var(--warning-50); --st-fg: var(--warning-700); --st-dot: var(--warning-500); }
[data-st="취소"] { --st-bg: var(--gray-100); --st-fg: var(--gray-500); --st-dot: var(--gray-400); }
.rv-st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-full); background: var(--st-bg); color: var(--st-fg); font-size: var(--fs-12); font-weight: 700; white-space: nowrap; }
.rv-st::before { content: ""; width: 6px; height: 6px; border-radius: var(--r-full); background: var(--st-dot); }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }

.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); margin-bottom: var(--s3); }
.cal-bar__nav, .cal-bar__tools { display: flex; align-items: center; gap: var(--s2); }
.cal-bar__title { margin: 0 0 0 var(--s2); font-size: var(--fs-18); font-variant-numeric: tabular-nums; }
.cal-bar__doc select { margin: 0; height: 32px; width: auto; min-width: 128px; font-size: var(--fs-13); }
.icon-nav { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-nav:hover { background: var(--gray-50); color: var(--text); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--gray-100); }
.seg button { height: 28px; padding: 0 var(--s3); border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--text-3); cursor: pointer; }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.seg--st button[aria-checked="true"] { background: var(--st-bg); color: var(--st-fg); box-shadow: inset 0 0 0 1.5px var(--st-dot); }
.seg--sm { margin-bottom: var(--s3); }

.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s4); align-items: start; }
.cal-card { padding: 0; overflow: hidden; margin: 0; }
.cal-day { margin: 0; padding: var(--s4); position: sticky; top: var(--s4); max-height: calc(100vh - 2 * var(--s4)); overflow-y: auto; }
.cal-day__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); }
.cal-day__head h2 { margin: 0; font-size: var(--fs-16); }
.cal-day__empty { padding: var(--s6) var(--s2); text-align: center; color: var(--text-3); font-size: var(--fs-13); }
.cal-day__list { margin: var(--s2) 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.dayitem { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: var(--s2); width: 100%; padding: 10px var(--s3) 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--doc, var(--gray-300)); border-radius: var(--r-md); background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.dayitem:hover { background: var(--gray-25); border-color: var(--gray-300); border-left-color: var(--doc, var(--gray-400)); }
.dayitem[data-st="취소"] .dayitem__name { text-decoration: line-through; color: var(--text-3); }
.dayitem__time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; font-size: var(--fs-12); color: var(--text-3); }
.dayitem__time b { font-size: var(--fs-14); color: var(--text); }
.dayitem__main { display: flex; flex-direction: column; min-width: 0; }
.dayitem__name { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dayitem__sub { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dayitem__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.doc-pill { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.doc-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: var(--doc, var(--gray-400)); vertical-align: 0; }

/* 월 보기 */
.mcal__head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--surface-sub); }
.mcal__wd { padding: 8px 10px; font-size: var(--fs-12); font-weight: 600; color: var(--text-3); }
.mcal__wd.is-sun { color: var(--danger-700); } .mcal__wd.is-sat { color: var(--info-700); }
.mcal__body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(112px, auto); }
.mcal__cell { position: relative; min-width: 0; padding: 6px 6px 8px; border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); cursor: pointer; transition: background .1s; }
.mcal__cell:nth-child(7n) { border-right: 0; }
.mcal__cell:hover { background: var(--gray-25); }
.mcal__cell.is-out { background: var(--surface-sub); } .mcal__cell.is-out .mcal__num { color: var(--text-disabled); }
.mcal__cell.is-sel { background: var(--blue-50); box-shadow: inset 0 0 0 2px var(--primary); }
.mcal__top { display: flex; align-items: center; gap: 4px; min-height: 26px; }
.mcal__num { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border: 0; border-radius: var(--r-full); background: none; font: inherit; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; cursor: pointer; }
.mcal__cell.is-sun .mcal__num { color: var(--danger-700); } .mcal__cell.is-sat .mcal__num { color: var(--info-700); }
.mcal__cell.is-today .mcal__num { background: var(--danger-500); color: #fff; }
.mcal__cnt { font-size: 11px; font-weight: 600; color: var(--text-3); }
.mcal__add { margin-left: auto; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-3); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .1s; }
.mcal__cell:hover .mcal__add, .mcal__add:focus-visible, .mcal__cell.is-sel .mcal__add { opacity: 1; }
.mcal__add:hover { background: var(--gray-100); color: var(--text); }
.mcal__evs { display: grid; gap: 3px; margin-top: 4px; }
.mcal__more { padding: 2px 6px; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--text-3); text-align: left; cursor: pointer; }
.mcal__more:hover { color: var(--primary); }
.mcal__dots { display: none; }
.ev { display: flex; align-items: center; gap: 5px; min-width: 0; width: 100%; height: 22px; padding: 0 6px 0 5px; border: 0; border-left: 3px solid var(--doc, var(--st-dot)); border-radius: 4px; background: var(--st-bg); color: var(--st-fg); font: inherit; font-size: 12px; line-height: 1; text-align: left; cursor: pointer; overflow: hidden; }
.ev:hover { filter: brightness(.97); box-shadow: 0 1px 3px rgba(21, 27, 38, .12); }
.ev__t { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev__n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.ev__s { flex: none; margin-left: auto; font-size: 11px; font-weight: 700; }
.ev__i { display: block; font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev[data-st="취소"] .ev__n { text-decoration: line-through; color: var(--text-3); }
.ev[data-st="노쇼"] .ev__n { color: var(--warning-700); }

/* 주·일 보기(시간 축) */
.tcal-scroll { overflow-x: auto; }
.tcal { min-width: calc(56px + var(--cols) * 96px); }
.tcal__head, .tcal__body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tcal__head { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--border); background: var(--surface-sub); }
.tcal__corner { border-right: 1px solid var(--gray-100); }
.tcal__colh { height: 40px; border: 0; border-right: 1px solid var(--gray-100); border-top: 3px solid var(--doc, transparent); background: none; font: inherit; font-size: var(--fs-13); font-weight: 700; color: var(--text-2); cursor: pointer; }
.tcal__colh.is-today { color: var(--danger-700); } .tcal__colh.is-sel { background: var(--blue-50); color: var(--blue-700); }
.tcal__axis { position: relative; border-right: 1px solid var(--gray-100); }
.tcal__axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tcal__axis span:first-child { transform: none; }
.tcal__col { position: relative; border-right: 1px solid var(--gray-100); cursor: copy;
  background-image: linear-gradient(to bottom, var(--gray-100) 1px, transparent 1px), linear-gradient(to bottom, var(--gray-50) 1px, transparent 1px);
  background-size: 100% 56px, 100% 28px; }
.tcal__col.is-today { background-color: #fffdf6; }
.tcal__col:hover { background-color: var(--gray-25); }
.tcal__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger-500); z-index: 1; pointer-events: none; }
.tcal__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger-500); }
.ev--block { position: absolute; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; height: auto; padding: 3px 6px; }
.ev--block .ev__s { margin-left: 0; }
.ev { white-space: nowrap; }
.ev--block.ev--narrow { padding: 2px 3px; }
.ev--block.ev--narrow .ev__n, .ev--block.ev--narrow .ev__s, .ev--block.ev--narrow .ev__i { display: none; }
.ev--block.ev--narrow .ev__t { font-size: 10px; overflow: hidden; text-overflow: clip; max-width: 100%; }
.ev--block.ev--row { flex-direction: row; align-items: center; gap: 4px; padding: 0 5px; }
.ev--block.ev--row .ev__s { display: none; }
.ev--block .ev__n { max-width: 100%; }

/* 예약 팝업 */
#dlg-resv, #dlg-rvm { width: min(640px, 94vw); }
.rv-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: var(--s5); }
.rv-title { margin: 0; padding: var(--s6) var(--s12) var(--s2) var(--s6); font-size: var(--fs-20); }
.rv-meta { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s6) var(--s3); border-bottom: 1px solid var(--border); font-size: var(--fs-13); color: var(--text-3); }
.rv-sec { margin: var(--s4) var(--s6) 0; }
.rv-sec h3 { margin: 0 0 var(--s2); font-size: var(--fs-14); font-weight: 700; }
.rv-sec textarea { min-height: 76px; margin-top: 0; }
.rv-sec .notes__len { display: block; margin-top: 4px; text-align: right; }
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.rv-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rv-grid .span-2 { grid-column: span 2; }
.rv-consent { display: grid; gap: 6px; margin-top: var(--s3); }
.rv-consent label.check { padding: 8px var(--s3); font-size: var(--fs-13); }
.rv-search { display: flex; gap: var(--s2); }
.rv-search input { margin: 0; }
.rv-results { margin: var(--s2) 0 0; padding: 0; list-style: none; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.rv-results li.muted { padding: var(--s2); font-size: var(--fs-13); }
.rv-result { display: flex; gap: var(--s3); align-items: center; width: 100%; padding: 8px var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font: inherit; font-size: var(--fs-13); text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.rv-result:hover { border-color: var(--primary); background: var(--blue-50); }
.rv-result .muted { margin-left: auto; font-size: var(--fs-12); }
.rv-picked { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: 10px var(--s3); border-radius: var(--r-md); background: var(--blue-50); font-size: var(--fs-14); }
.rv-picked .link { margin-left: auto; }
.kv--tight { margin-bottom: var(--s2); grid-template-columns: 6rem minmax(0, 1fr); }
.kv--tight dt, .kv--tight dd { padding: 6px 0; }
.rv-body > .msg { margin: var(--s4) var(--s6) 0; }
.rv-conflict { margin: var(--s2) var(--s6) 0; padding: var(--s3); border: 1px solid #f6d7ad; border-radius: var(--r-md); background: var(--warning-50); font-size: var(--fs-13); color: var(--warning-700); }
.rv-conflict ul { margin: 0 0 var(--s2); padding-left: 18px; }
.rv-foot { margin: var(--s5) var(--s6) 0; }
.rv-hist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: var(--fs-12); color: var(--text-2); }
.rv-hist li { display: grid; grid-template-columns: 112px 96px minmax(0, 1fr); gap: var(--s2); padding: 6px 0; border-bottom: 1px solid var(--gray-100); }
.rv-hist__at, .rv-hist__who { color: var(--text-3); font-variant-numeric: tabular-nums; }
.rv-sec--hist { padding-top: var(--s3); border-top: 1px solid var(--border); }
.rv-note, .rv-pad { margin: var(--s3) var(--s6) 0; }
.rvm-list { display: grid; gap: 6px; }
.rvm-row { display: flex; align-items: center; gap: var(--s2); }
.rvm-row input[type=text] { margin: 0; flex: 1; }
.rvm-row input[type=color] { flex: none; width: 40px; height: 36px; margin: 0; padding: 2px; }
.rvm-row--add { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px dashed var(--border-strong); }
.rvm-on { display: flex; align-items: center; gap: 4px; font-weight: 500; white-space: nowrap; }
.rvm-on input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.rvm-unit { display: flex; align-items: center; gap: 4px; font-size: var(--fs-13); color: var(--text-3); }
.rvm-min { width: 76px !important; margin: 0 !important; }
/* 상담 상세 안의 예약 */
#dlg-body > .lead-resv { order: 4; margin: var(--s4) var(--s6) 0; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-sub); }
.lead-resv .notes__head { margin-bottom: var(--s2); }
.lead-resv__add { margin-left: auto; }
.lead-resv__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: var(--fs-13); }

@media (max-width: 1180px) { .cal-wrap { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 1023px) {
  .cal-wrap { grid-template-columns: minmax(0, 1fr); }
  .cal-day { position: static; max-height: none; }
}
@media (max-width: 767px) {
  .cal-bar { padding: var(--s3); }
  .cal-bar__tools { width: 100%; justify-content: space-between; }
  .cal-bar__title { font-size: var(--fs-16); }
  .mcal__body { grid-auto-rows: minmax(64px, auto); }
  .mcal__cell { padding: 4px 3px 6px; }
  .mcal__evs, .mcal__cnt, .mcal__add { display: none; }
  .mcal__top { justify-content: center; }
  .mcal__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
  .mcal__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--doc, var(--st-dot)); }
  .mcal__dots i[data-st="취소"] { background: var(--gray-300); }
  .rv-grid, .rv-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-sec, .rv-foot, .rv-conflict, .rv-body > .msg, .rv-note, .rv-pad { margin-left: var(--s5); margin-right: var(--s5); }
  .rv-title { padding-left: var(--s5); }
  .rv-hist li { grid-template-columns: 1fr; gap: 0; }
  #dlg-body > .lead-resv { margin-left: var(--s5); margin-right: var(--s5); }
  .rvm-row { flex-wrap: wrap; }
  .page-head .row { width: 100%; }
  .page-head .row .btn { flex: 1; }
}

/* ───────────── 9. 정보 수정·비밀번호·기록·다음 예약 (2026-10-20) ───────────── */
.top__tabs button[data-tab="log"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.5 6v5.5c0 4.6 3.2 8.2 7.5 9.5 4.3-1.3 7.5-4.9 7.5-9.5V6z'/%3E%3Cpath d='M12 8v4.5l2.5 1.5'/%3E%3C/svg%3E"); }
#btn-mypw { order: 0; }
@media (min-width: 1024px) { .top__user #btn-mypw { width: 100%; } }
#dlg-body > .edit-box { order: 3; margin: var(--s3) var(--s6) 0; padding: var(--s4); border: 1px solid var(--blue-100); border-radius: var(--r-md); background: var(--blue-50); }
.edit-box h3 { margin: 0 0 4px; font-size: var(--fs-15); }
.edit-box .rv-grid { margin-top: var(--s3); }
.edit-box textarea { min-height: 96px; }
.edit-box label.check { margin-top: var(--s3); background: var(--surface); font-size: var(--fs-13); }
.edit-box .row { margin-top: var(--s3); }
#dlg-mypw { width: min(480px, 94vw); }
#f-mypw { display: grid; gap: var(--s3); padding-bottom: var(--s2); }
#f-mypw .msg { margin: 0; }
.c-next { font-variant-numeric: tabular-nums; color: var(--text-3); }
.next-resv { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: var(--st-bg); color: var(--st-fg); font: inherit; font-size: var(--fs-12); font-weight: 600; cursor: pointer; white-space: nowrap; }
.next-resv span { color: var(--text); }
.next-resv:hover { box-shadow: inset 0 0 0 1px var(--st-dot); }
.lg-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2); }
.lg-filter label { font-size: var(--fs-12); }
.lg-filter input, .lg-filter select { height: 32px; margin-top: 2px; font-size: var(--fs-13); width: auto; }
.lg-filter input[type=date] { width: 140px; }
.lg-filter .lg-lead input { width: 84px; }
.lg-sum { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.lg-sum:empty { display: none; }
.lg-kpi { display: flex; align-items: baseline; gap: var(--s2); padding: 8px var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-13); color: var(--text-3); }
.lg-kpi b { font-size: var(--fs-16); color: var(--text); font-variant-numeric: tabular-nums; }
.lg-kpi.warn { border-color: #f6d7ad; background: var(--warning-50); color: var(--warning-700); }
.lg-kind { display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); background: var(--gray-100); font-size: var(--fs-12); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.lg-kind[data-k="viewed"] { background: var(--info-50); color: var(--info-700); }
.lg-kind[data-k="edit"], .lg-kind[data-k="status"], .lg-kind[data-k="pw_change"], .lg-kind[data-k="pw_reset"], .lg-kind[data-k="role_change"] { background: var(--violet-50); color: var(--violet-700); }
.lg-kind[data-k="login_fail"], .lg-kind[data-k="mfa_fail"], .lg-kind[data-k="login_locked"], .lg-kind[data-k="ip_denied"], .lg-kind[data-k="csrf_denied"] { background: var(--danger-50); color: var(--danger-700); }
.lg-kind[data-k="login_ok"], .lg-kind[data-k="created"] { background: var(--success-50); color: var(--success-700); }
.lg-detail { white-space: normal !important; min-width: 200px; font-size: var(--fs-13); }
#p-log .cal-bar { align-items: flex-end; }
@media (max-width: 767px) {
  .tbl--leads tbody tr { grid-template-areas: "name status" "phone act" "date act" "src act" "nx act"; }
  .tbl--leads td:nth-child(6) { grid-area: nx; justify-self: start; align-self: auto; width: auto; margin-top: 4px; }
  .tbl--leads td:nth-child(6).is-none { display: none; }
  .tbl--leads td:nth-child(7) { grid-area: act; align-self: center; justify-self: end; width: auto; }
  #dlg-body > .edit-box { margin-left: var(--s5); margin-right: var(--s5); }
  .lg-filter { width: 100%; }
  .lg-filter label { flex: 1 1 40%; }
  .lg-filter input[type=date], .lg-filter select { width: 100%; }
  .lg-filter .btn { flex: 1 1 100%; }
}

/* ───────────── 10. 상담 목록 칸 개편 (2026-10-20): 지역·1차 상담·예약현황·방문완료·상담내용 ───────────── */
.tbl--leads th, .tbl--leads td { padding-left: 12px; padding-right: 12px; }
.tbl--leads .c-region, .tbl--leads .c-first { font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.tbl--leads td.is-none { color: var(--text-disabled); }
.tbl--leads .c-memo { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-13); color: var(--text-2); }
.next-resv.is-past { background: var(--gray-100); }
.next-resv.is-past span { color: var(--text-3); }
.visit-ok { display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); background: var(--success-50); color: var(--success-700); font-size: var(--fs-12); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 1279px) { .tbl--leads .c-memo { max-width: 160px; } }
@media (max-width: 767px) {
  .tbl--leads tbody tr { grid-template-areas: "name status" "phone act" "region act" "date act" "first act" "resv resv" "visit visit" "memo memo"; }
  .tbl--leads td:nth-child(1) { grid-area: date; }
  .tbl--leads td:nth-child(2) { grid-area: name; }
  .tbl--leads td:nth-child(3) { grid-area: region; font-size: var(--fs-13); }
  .tbl--leads td:nth-child(4) { grid-area: phone; margin-top: 0; }
  .tbl--leads td:nth-child(5) { grid-area: first; font-size: var(--fs-13); }
  .tbl--leads td:nth-child(5)::before { content: "1차 상담 "; color: var(--text-3); }
  .tbl--leads td:nth-child(6) { grid-area: resv; justify-self: start; margin-top: 4px; }
  .tbl--leads td:nth-child(7) { grid-area: visit; justify-self: start; align-self: auto; width: auto; }
  .tbl--leads td:nth-child(8) { grid-area: memo; max-width: none; white-space: normal; font-size: var(--fs-13); color: var(--text-2); }
  .tbl--leads td:nth-child(9) { grid-area: status; justify-self: end; }
  .tbl--leads td:nth-child(10) { grid-area: act; align-self: center; justify-self: end; width: auto; }
  .tbl--leads td.is-none { display: none; }
}
@media (min-width: 768px) {
  .tbl--leads th, .tbl--leads td { padding-left: 8px; padding-right: 8px; }
  .tbl--leads .c-date__d, .tbl--leads .c-date__t { display: block; margin: 0; line-height: 1.35; }
  .tbl--leads .c-date__t { font-size: var(--fs-12); }
  .tbl--leads .c-memo { max-width: 150px; }
  .tbl--leads .row-btn { padding: 0 6px 0 8px; }
}
@media (max-width: 767px) { .tbl--leads td:nth-child(1), .tbl--leads td:nth-child(3), .tbl--leads td:nth-child(5) { justify-self: start; text-align: left; } }

/* ───────────── 11. 엑셀(CSV) 내보내기 (2026-10-21) ───────────── */
#dlg-export { width: min(560px, 94vw); }
#f-export { display: grid; gap: var(--s3); padding-bottom: var(--s2); }
#f-export .msg { margin: 0; }
#f-export label.check { padding: 8px var(--s3); font-size: var(--fs-13); }
#p-list .page-head .row { gap: var(--s2); flex-wrap: nowrap; }

/* 12. 직원 문자 알림 스위치 (2026-10-21) */
.nswitch { display: flex; align-items: center; gap: var(--s3); padding: 8px var(--s4); border: 1px solid var(--border); border-radius: 999px; background: var(--surface-sub); }
.nswitch__label { font-size: var(--fs-14); font-weight: 600; color: var(--text); }
.nswitch__state { min-width: 3em; font-size: var(--fs-14); color: var(--text-2); }
.nswitch[data-on="1"] { border-color: var(--primary); }
.nswitch[data-on="1"] .nswitch__state { color: var(--primary); }
.switch { position: relative; display: inline-flex; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch input:disabled { cursor: not-allowed; }
.switch__track { display: block; width: 46px; height: 26px; border-radius: 999px; background: var(--border); transition: background .15s; }
.switch__thumb { display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: .55; }

/* 13. 문자 알림 운영 대시보드 v2 (2026-10-21) — 기존 토큰(Navy/Blue·간격·반경) 사용, 이 화면 안에서만 적용
   위계: 제목·상태 > 핵심 숫자(24px) > 카드 제목(16px) > 본문(14px) > 보조(13px). 회색 보조 글자는 대비 높은 --nt-muted 사용 */
.nt { --nt-gap: 18px; --nt-pad: 22px; --nt-muted: #4f5664; --nt-faint: #6b7280; --nt-ctl: 38px; font-size: var(--fs-14); }
/* 상단: 제목 + 발송기 상태 + 전체 알림 */
.nt-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.nt-top__title { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-width: 0; }
.nt-top__title h1 { margin: 0; }
.nt-top__actions { display: flex; align-items: center; gap: var(--s2); }
.nt-health { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--r-full); font-size: var(--fs-13); font-weight: 600; background: var(--gray-100); color: var(--nt-muted); white-space: nowrap; }
.nt-health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); }
.nt-health[data-mode="real"] { background: var(--success-50); color: var(--success-700); } .nt-health[data-mode="real"]::before { background: var(--success-500); box-shadow: 0 0 0 3px rgba(34, 160, 97, .18); }
.nt-health[data-mode="mock"] { background: var(--warning-50); color: var(--warning-700); } .nt-health[data-mode="mock"]::before { background: var(--warning-500); }
.nt-health[data-mode="down"] { background: var(--danger-50); color: var(--danger-700); } .nt-health[data-mode="down"]::before { background: var(--danger-500); }
.nt .nswitch { height: var(--nt-ctl); padding: 0 14px 0 16px; border-radius: var(--r-full); background: var(--surface); }
.nt .nswitch__label { font-size: var(--fs-14); }
.nt .nswitch__state { min-width: 2.6em; font-size: var(--fs-14); font-weight: 700; color: var(--nt-faint); }
.nt-btn { height: var(--nt-ctl); padding: 0 14px; font-size: var(--fs-14); }
/* 핵심 지표 + 보조 지표 */
.nt-stats-panel { margin-bottom: var(--nt-gap); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.nt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nt-kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px var(--nt-pad); min-width: 0; }
.nt-kpi + .nt-kpi { border-left: 1px solid var(--gray-100); }
.nt-kpi__label { font-size: var(--fs-13); font-weight: 600; color: var(--nt-muted); }
.nt-kpi__value { font-size: 1.625rem; line-height: 1.2; font-weight: 700; color: var(--navy-900); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.nt-kpi__sub { font-size: var(--fs-13); color: var(--nt-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-kpi--warn .nt-kpi__value { color: var(--warning-700); }
.nt-kpi--danger .nt-kpi__value { color: var(--danger-700); } .nt-kpi--danger .nt-kpi__sub { color: var(--danger-700); }
.nt-aux { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 10px var(--nt-pad); background: var(--surface-sub); border-top: 1px solid var(--gray-100); font-size: var(--fs-13); color: var(--nt-faint); }
.nt-aux:empty { display: none; }
.nt-aux b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 운영 경고 */
.nt-alerts:empty { display: none; }
.nt-alerts { display: grid; gap: var(--s2); margin-bottom: var(--nt-gap); }
.nt-alert { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); padding: 12px var(--s4); border-radius: var(--r-md); border: 1px solid; border-left-width: 4px; font-size: var(--fs-14); line-height: 1.6; }
.nt-alert b { font-weight: 700; }
.nt-alert--danger { background: var(--danger-50); border-color: var(--danger-500); color: var(--danger-700); }
.nt-alert--warn { background: var(--warning-50); border-color: var(--warning-500); color: var(--warning-700); }
.nt-alert--info { background: var(--info-50); border-color: var(--info-500); color: var(--info-700); }
#meta-status .nt-alert { margin-bottom: var(--s3); }
/* 설정 | 수신자 */
.nt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--nt-gap); margin-bottom: var(--nt-gap); align-items: start; }
@media (min-width: 1100px) { .nt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.nt-grid > .card { margin-bottom: 0; }
/* 카드 */
.nt-card { padding: var(--nt-pad); margin-bottom: var(--nt-gap); }
.nt-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.nt-card__head h2, .nt-fold__head h2 { margin: 0 0 4px; font-size: var(--fs-16); font-weight: 700; color: var(--navy-900); }
.nt-card__desc { margin: 0; font-size: var(--fs-14); line-height: 1.65; color: var(--nt-muted); }
.nt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-13); }
.nt-legend .tag { margin-left: 6px; } .nt-legend .tag:first-child { margin-left: 0; }
.nt-card__tools { display: flex; align-items: center; gap: var(--s3); flex: none; }
.nt-card__tools select { width: auto; height: 36px; margin: 0; font-size: var(--fs-14); }
.nt-count { flex: none; font-size: var(--fs-13); font-weight: 600; color: var(--nt-faint); white-space: nowrap; }
.nt-note { margin: var(--s4) 0 0; font-size: var(--fs-13); line-height: 1.6; color: var(--nt-faint); }
/* 설정 행 */
.nt-setrow { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--gray-100); margin: 0; }
.nt-setrow b { display: block; font-size: var(--fs-15); font-weight: 600; color: var(--text); }
.nt-setrow p { margin: 4px 0 0; font-size: var(--fs-14); line-height: 1.65; color: var(--nt-muted); }
.nt-setrow__ctl { display: flex; align-items: center; gap: var(--s2); flex: none; }
.nt-setrow__ctl input[type=number] { width: 80px; height: var(--nt-ctl); margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.nt-unit { font-size: var(--fs-14); color: var(--nt-muted); margin-right: var(--s1); }
.nt-rules { margin: 0; padding-top: var(--s4); border-top: 1px solid var(--gray-100); font-size: var(--fs-13); line-height: 1.6; color: var(--nt-faint); }
.nt-rules:empty { display: none; }
/* 표 */
.nt .table-scroll--flush { margin-left: calc(var(--nt-pad) * -1); margin-right: calc(var(--nt-pad) * -1); }
.nt .table-scroll--flush .tbl th:first-child, .nt .table-scroll--flush .tbl td:first-child { padding-left: var(--nt-pad); }
.nt .table-scroll--flush .tbl th:last-child, .nt .table-scroll--flush .tbl td:last-child { padding-right: var(--nt-pad); }
.nt-tbl th { height: 38px; font-size: var(--fs-13); color: var(--nt-muted); }
.nt-tbl td { height: 46px; font-size: var(--fs-14); }
.nt-tbl .nt-time { color: var(--nt-muted); font-variant-numeric: tabular-nums; width: 1%; }
.nt-tbl .nt-num { font-variant-numeric: tabular-nums; }
.nt-tbl .nt-strong { color: var(--text); font-weight: 600; }
.nt-tbl .nt-actions { width: 1%; text-align: right; white-space: nowrap; }
.nt-tbl td.nt-actions > * + * { margin-left: var(--s2); }
.nt-tbl tr.is-off td { color: var(--nt-faint); }
.nt-tbl .nt-empty { height: 64px; text-align: center; color: var(--nt-faint); white-space: normal; }
.nt-tbl .nt-detail { width: 99%; white-space: normal; color: var(--nt-muted); font-size: var(--fs-13); }
.nt-tbl .nt-detail--danger { color: var(--danger-700); }
.nt-tbl .btn--sm { height: 32px; font-size: var(--fs-13); }
/* 상태 배지: 높이 24px·12px 통일, 의미별 색 */
.nt .tag { height: 24px; padding: 0 10px; font-size: var(--fs-12); font-weight: 600; }
.tag.nt-tag--real { background: var(--navy-900); color: #fff; }
.tag.nt-tag--mock { background: var(--gray-100); color: var(--gray-700); }
.tag.nt-tag--test { background: var(--violet-50); color: var(--violet-700); }
.tag.nt-tag--lead { background: var(--blue-50); color: var(--blue-700); }
.tag.nt-tag--ack { background: var(--info-50); color: var(--info-700); }
.tag.nt-tag--aud { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tag.nt-tag--wait, .tag[data-delivery="sending"] { background: var(--info-50); color: var(--info-700); }
/* 관리 메뉴 */
.nt-menu { position: relative; display: inline-block; }
.nt-menu > summary { list-style: none; cursor: pointer; }
.nt-menu > summary::-webkit-details-marker { display: none; }
.nt-menu > summary::after { content: "▾"; margin-left: 4px; font-size: 10px; }
.nt-menu__list { position: fixed; z-index: 60; width: 190px; padding: var(--s1); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-2); }
.nt-menu__list button { display: block; width: 100%; padding: 9px var(--s3); border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: var(--fs-14); text-align: left; color: var(--text-2); cursor: pointer; }
.nt-menu__list button:hover { background: var(--gray-50); color: var(--text); }
.nt-menu__list .nt-menu__danger { margin-top: var(--s1); border-top: 1px solid var(--gray-100); border-radius: 0 0 var(--r-sm) var(--r-sm); color: var(--danger-700); }
.nt-menu__list .nt-menu__danger:hover { background: var(--danger-50); color: var(--danger-700); }
/* 수신자 추가 */
.nt-addform { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, 1.1fr) auto; gap: var(--s3); align-items: end; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--gray-100); }
.nt-addform label { margin: 0; font-size: var(--fs-13); color: var(--nt-muted); }
.nt-addform input, .nt-addform select { height: var(--nt-ctl); margin-top: 6px; font-size: var(--fs-14); }
.nt .msg { font-size: var(--fs-14); }
/* 메타 수집(접이식) */
.nt-fold { padding: 0; }
.nt-fold__head { display: flex; align-items: center; gap: var(--s3); padding: 18px var(--nt-pad); cursor: pointer; list-style: none; }
.nt-fold__head::-webkit-details-marker { display: none; }
.nt-fold__head > div { flex: 1; min-width: 0; }
.nt-fold__head .nt-card__desc { font-size: var(--fs-13); color: var(--nt-faint); }
.nt-fold__chev { width: 10px; height: 10px; border-right: 2px solid var(--gray-400); border-bottom: 2px solid var(--gray-400); transform: rotate(45deg); margin: 0 4px 4px; transition: transform .15s; }
.nt-fold[open] .nt-fold__chev { transform: rotate(-135deg); margin-bottom: -4px; }
.nt-fold__body { padding: 0 var(--nt-pad) var(--nt-pad); border-top: 1px solid var(--gray-100); }
.nt-fold__body > .nt-card__desc { margin: var(--s4) 0 var(--s3); }
.nt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.nt-stats > div { padding: 10px var(--s3); background: var(--surface-sub); border: 1px solid var(--gray-100); border-radius: var(--r-md); min-width: 0; }
.nt-stats span { display: block; font-size: var(--fs-12); color: var(--nt-faint); }
.nt-stats b { display: block; font-size: var(--fs-15); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .nt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt-kpi:nth-child(3) { border-left: 0; }
  .nt-kpi:nth-child(n+3) { border-top: 1px solid var(--gray-100); }
}
@media (max-width: 720px) {
  .nt { --nt-pad: 16px; }
  .nt-top__actions { width: 100%; }
  .nt-top__actions .nswitch { flex: 1; }
  .nt-top__actions .nswitch .switch { margin-left: auto; }
  .nt-card__head { flex-direction: column; }
  .nt-setrow { flex-direction: column; align-items: flex-start; }
  .nt-addform { grid-template-columns: minmax(0, 1fr); }
  .nt-kpi__value { font-size: 1.375rem; }
}

/* 14. 문자 알림 — 색 절제(2026-10-21, 사용자 요청): 배경·글자는 무채색, 색은 '실패' 한 가지와 작은 상태 점·주 버튼(파랑)만 */
.nt .tag, .nt .tag.on, .nt .tag.off, .nt .tag[data-delivery],
.nt .tag.nt-tag--real, .nt .tag.nt-tag--mock, .nt .tag.nt-tag--test, .nt .tag.nt-tag--lead, .nt .tag.nt-tag--ack, .nt .tag.nt-tag--aud, .nt .tag.nt-tag--wait {
  background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.nt .tag.nt-tag--real { color: var(--text); font-weight: 700; }
.nt .tag.nt-tag--mock, .nt .tag[data-delivery="pending"], .nt .tag.nt-tag--wait { color: var(--nt-faint); box-shadow: inset 0 0 0 1px var(--border); }
.nt .tag.off, .nt .tag[data-delivery="failed"] { color: var(--danger-700); box-shadow: inset 0 0 0 1px var(--border-strong); }
.nt-health, .nt-health[data-mode] { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.nt-health[data-mode="real"]::before { background: var(--success-500); box-shadow: none; }
.nt-health[data-mode="mock"]::before { background: var(--gray-400); }
.nt-health[data-mode="down"]::before { background: var(--danger-500); }
.nt-kpi__value, .nt-kpi--warn .nt-kpi__value { color: var(--text); }
.nt-kpi--danger .nt-kpi__value { color: var(--danger-700); }
.nt-kpi--danger .nt-kpi__sub { color: var(--nt-faint); }
.nt-alert, .nt-alert--danger, .nt-alert--warn, .nt-alert--info { background: var(--surface); color: var(--text); border-color: var(--border); border-left-width: 3px; }
.nt-alert--danger { border-left-color: var(--danger-500); }
.nt-alert--warn { border-left-color: var(--gray-500); }
.nt-alert span { color: var(--nt-muted); }
.nt-tbl .nt-detail--danger { color: var(--nt-muted); }
.nt .nswitch[data-on="1"] { border-color: var(--border-strong); }
.nt .nswitch[data-on="1"] .nswitch__state { color: var(--text); }
.nt .msg.ok { background: var(--surface-sub); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); --msg-ic: var(--gray-500); }

/* 15. 예약 캘린더 v2 (2026-10-21) — 캘린더 71% : 상세 패널 29%, 무채색 바탕 + 상태는 작은 점(의미 색)으로만. 이 화면 안에서만 적용 */
.rvx { --rv-muted: #4f5664; --rv-faint: #6b7280; --rv-line: var(--gray-100); --rv-ctl: 36px; }
.rvx .page-head p { font-size: var(--fs-14); line-height: 1.6; color: var(--rv-muted); }
/* 상단 도구 줄 */
.rvx .cal-bar { padding: 12px 16px; margin-bottom: var(--s4); }
.rvx .cal-bar__title { margin-left: var(--s3); font-size: var(--fs-20); font-weight: 700; color: var(--navy-900); letter-spacing: -.01em; }
.rvx .icon-nav { width: var(--rv-ctl); height: var(--rv-ctl); font-size: 18px; }
.rvx .cal-bar .btn--sm { height: var(--rv-ctl); font-size: var(--fs-14); }
.rvx .cal-bar__doc select { height: var(--rv-ctl); min-width: 140px; font-size: var(--fs-14); }
.rvx .seg { padding: 3px; }
.rvx .seg button { height: 30px; padding: 0 14px; font-size: var(--fs-14); }
/* 상태: 점만 의미 색, 배지 바탕은 무채색 */
.rvx .rv-st { height: 24px; padding: 0 10px; background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: var(--fs-12); font-weight: 600; }
.rvx .rv-st[data-st="취소"] { color: var(--rv-faint); box-shadow: inset 0 0 0 1px var(--border); }
.rvx .cal-legend { gap: var(--s2); margin-top: var(--s3); }
/* 배치 */
.rvx .cal-wrap { grid-template-columns: minmax(0, 71fr) minmax(340px, 29fr); gap: var(--s4); }
@media (max-width: 1279px) { .rvx .cal-wrap { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 1023px) { .rvx .cal-wrap { grid-template-columns: minmax(0, 1fr); } .rvx .cal-day { position: static; max-height: none; } }
/* 월 보기 */
.rvx .mcal__wd { padding: 10px 12px; font-size: var(--fs-13); color: var(--rv-muted); }
.rvx .mcal__wd.is-sun, .rvx .mcal__wd.is-sat { color: var(--rv-muted); }
.rvx .mcal__body { grid-auto-rows: 138px; }
.rvx .mcal__cell { padding: 8px 8px 6px; border-color: var(--rv-line); overflow: hidden; display: flex; flex-direction: column; }
.rvx .mcal__cell:hover { background: var(--gray-25); }
.rvx .mcal__cell.is-out { background: var(--surface); }
.rvx .mcal__cell.is-out .mcal__num, .rvx .mcal__cell.is-out .mcal__cnt { color: var(--gray-400); }
.rvx .mcal__cell.is-out .ev { opacity: .55; }
.rvx .mcal__cell.is-sel { background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--primary); }
.rvx .mcal__top { min-height: 28px; gap: 6px; }
.rvx .mcal__num { min-width: 28px; height: 28px; font-size: var(--fs-15); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rvx .mcal__cell.is-sun .mcal__num, .rvx .mcal__cell.is-sat .mcal__num { color: var(--text); }
.rvx .mcal__cell.is-today .mcal__num { background: var(--navy-900); color: #fff; }
.rvx .mcal__num:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rvx .mcal__cnt { font-size: var(--fs-12); font-weight: 600; color: var(--rv-faint); font-variant-numeric: tabular-nums; }
.rvx .mcal__add { width: 26px; height: 26px; font-size: 18px; color: var(--rv-faint); }
.rvx .mcal__evs { gap: 3px; margin-top: 6px; min-height: 0; }
.rvx .mcal__more { height: 20px; padding: 0 6px; font-size: var(--fs-12); font-weight: 700; color: var(--rv-muted); border-radius: 4px; }
.rvx .mcal__more:hover, .rvx .mcal__more:focus-visible { background: var(--gray-100); color: var(--text); outline: none; }
/* 예약 칩: 흰 바탕 + 상태 점 + 원장 색 왼쪽 선 */
.rvx .ev { height: 21px; gap: 4px; padding: 0 5px; border-left: 3px solid var(--doc, var(--gray-300)); border-radius: 4px; background: var(--gray-50); color: var(--text-2); font-size: var(--fs-12); }
.rvx .ev:hover { background: var(--gray-100); box-shadow: none; filter: none; }
.rvx .ev:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.rvx .ev__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--st-dot, var(--gray-400)); }
.rvx .ev__t { color: var(--text); font-weight: 700; }
.rvx .ev__n { color: var(--text-2); font-weight: 500; }
.rvx .ev__s { color: var(--rv-faint); font-weight: 600; font-size: var(--fs-12); }
.rvx .ev[data-st="취소"] { background: var(--surface); }
.rvx .ev[data-st="취소"] .ev__t, .rvx .ev[data-st="취소"] .ev__n { color: var(--gray-400); text-decoration: line-through; }
.rvx .ev[data-st="노쇼"] .ev__n { color: var(--text-2); }
/* 주·일 보기 */
.rvx .tcal__head { background: var(--surface); }
.rvx .tcal__colh { height: 44px; font-size: var(--fs-14); color: var(--text); border-top-width: 3px; }
.rvx .tcal__colh.is-today { color: var(--text); font-weight: 800; }
.rvx .tcal__colh.is-sel { background: var(--blue-50); color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
.rvx .tcal__axis span { font-size: var(--fs-12); color: var(--rv-faint); }
.rvx .tcal__col { background-size: 100% 64px, 100% 32px; }
.rvx .tcal__col.is-today { background-color: var(--gray-25); }
.rvx .ev--block { padding: 4px 8px; gap: 2px; height: auto; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); border-left-width: 3px; }
.rvx .ev--block:hover { background: var(--gray-50); }
.rvx .ev--block.ev--row { padding: 0 6px; }
.rvx .ev__i { font-size: var(--fs-12); color: var(--rv-faint); }
/* 날짜 상세 패널 */
.rvx .cal-day { padding: 20px; min-width: 0; }
.rvx .cal-day__head { align-items: flex-start; gap: var(--s3); padding-bottom: var(--s4); }
.rvx .cal-day__eyebrow { margin: 0 0 2px; font-size: var(--fs-12); font-weight: 700; color: var(--rv-faint); }
.rvx .cal-day__head h2 { margin: 0; font-size: var(--fs-18); color: var(--navy-900); }
.rvx .cal-day__sum { margin: 4px 0 0; font-size: var(--fs-13); color: var(--rv-muted); }
.rvx .cal-day__sum b { color: var(--text); }
.rvx .cal-day__head .btn--sm { height: var(--rv-ctl); font-size: var(--fs-14); flex: none; }
.rvx .cal-day__empty { padding: 40px 12px; font-size: var(--fs-14); line-height: 1.6; color: var(--rv-faint); }
.rvx .cal-day__list { gap: var(--s2); margin-top: var(--s3); }
.rvx .dayitem { grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 12px 12px 12px 14px; border-color: var(--border); border-left: 3px solid var(--doc, var(--gray-300)); border-radius: var(--r-md); background: var(--surface); }
.rvx .dayitem:hover { background: var(--gray-25); border-color: var(--border-strong); border-left-color: var(--doc, var(--gray-400)); }
.rvx .dayitem:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rvx .dayitem__time { gap: 2px; font-size: var(--fs-12); color: var(--rv-faint); }
.rvx .dayitem__time b { font-size: var(--fs-15); font-weight: 700; color: var(--text); }
.rvx .dayitem__main { gap: 3px; }
.rvx .dayitem__name { font-size: var(--fs-15); font-weight: 700; color: var(--text); }
.rvx .dayitem__phone { font-size: var(--fs-13); color: var(--text-2); font-variant-numeric: tabular-nums; }
.rvx .dayitem__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: var(--fs-12); color: var(--rv-faint); }
.rvx .dayitem__meta .doc-pill { font-size: var(--fs-12); color: var(--text-2); }
.rvx .dayitem__side { padding-top: 1px; }
.rvx .dayitem[data-st="취소"] .dayitem__name { color: var(--gray-400); }

@media (max-width: 720px) {
  .rvx .cal-bar__title { font-size: var(--fs-18); margin-left: var(--s2); }
  .rvx .mcal__body { grid-auto-rows: 64px; }
  .rvx .mcal__cell { padding: 4px 2px; align-items: center; }
  .rvx .mcal__num { font-size: var(--fs-14); min-width: 30px; height: 30px; }
  .rvx .mcal__wd { padding: 8px 0; text-align: center; }
  .rvx .cal-day { padding: 16px; }
}
.rvx .ev--block { line-height: 1.35; }
.rvx .ev--block .ev__dot { position: absolute; top: 7px; right: 6px; }
.rvx .ev--block .ev__s { display: none; }
.rvx .ev--block .ev__t { padding-right: 10px; }
.rvx .ev--block .ev__n { font-size: var(--fs-12); }
.rvx .ev--block.ev--row .ev__dot { position: static; }
.rvx .ev--block.ev--row .ev__t { padding-right: 0; }

/* 16. 예약 캘린더 세로 공간 정리 (2026-10-21) — 칸 104px(3건까지 모두, 4건부터 2건+더보기), 5·6주에 맞춰 높이 자동 */
.rvx .mcal__body { grid-auto-rows: 104px; }
.rvx .mcal__cell { padding: 6px 6px 4px; }
.rvx .mcal__top { min-height: 26px; }
.rvx .mcal__num { min-width: 26px; height: 26px; font-size: var(--fs-14); }
.rvx .mcal__add { width: 24px; height: 24px; }
.rvx .mcal__evs { gap: 2px; margin-top: 4px; }
.rvx .ev { height: 19px; font-size: .78rem; }
.rvx .mcal__more { height: 18px; font-size: var(--fs-12); }
.rvx .mcal__cell.is-sel { background: #f5f7ff; box-shadow: inset 0 0 0 1px rgba(47, 70, 214, .45); }
.rvx .mcal__cell.is-today:not(.is-sel) { background: var(--surface); }
/* 상세 패널: 캘린더 높이에 맞추지 않고 내용만큼 */
.rvx .cal-wrap { align-items: start; }
.rvx .cal-day { padding: 18px 18px 16px; }
.rvx .cal-day__head { padding-bottom: 14px; }
.rvx .cal-day__list { gap: 10px; margin-top: 14px; }
.rvx .dayitem { padding: 12px 12px 12px 14px; gap: 2px 12px; }
.rvx .dayitem__time b { font-size: var(--fs-15); }
.rvx .dayitem__name { font-size: var(--fs-15); }
.rvx .dayitem__phone { font-size: var(--fs-14); }
.rvx .dayitem__meta { font-size: var(--fs-13); }
.rvx .dayitem__meta .doc-pill { font-size: var(--fs-13); }
@media (max-width: 1279px) { .rvx .mcal__body { grid-auto-rows: 104px; } }
@media (max-width: 720px) { .rvx .mcal__body { grid-auto-rows: 60px; } }
.rvx .cal-main { min-width: 0; }

/* 17. 공지 게시판 (2026-10-21) — 무채색 위주, 고정 글만 회색 배지 */
.top__tabs button[data-tab="notice"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v4a1 1 0 0 0 1 1h2l6 4V5L7 9H5a1 1 0 0 0-1 1z'/%3E%3Cpath d='M17 9a4 4 0 0 1 0 6'/%3E%3C/svg%3E"); }
.nb .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.nb .page-head h1 { margin: 0 0 4px; font-size: var(--fs-24); }
.nb .page-head p { margin: 0; font-size: var(--fs-14); }
.nb .page-head p b { color: var(--text-2); font-weight: 600; }
.nb-card { padding: 0; overflow: hidden; }
.nb-card .table-scroll--flush { margin: 0; border-top: 0; }
.nb-tbl { table-layout: fixed; }
.nb-tbl td { height: auto; padding-top: 12px; padding-bottom: 12px; vertical-align: top; }
.nb-tbl th:nth-child(2), .nb-tbl td:nth-child(2) { width: 160px; }
.nb-tbl th:nth-child(3), .nb-tbl td:nth-child(3) { width: 112px; }
.nb-num { width: 64px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-3); }
.nb-row { cursor: pointer; }
.nb-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nb-row.is-pinned { background: var(--gray-25); }
.nb-tbl td.nb-title { white-space: normal; }
.nb-tw { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nb-tw b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-title b { font-size: var(--fs-15); font-weight: 600; color: var(--text); }
.nb-preview { display: block; margin-top: 2px; overflow: hidden; color: var(--text-3); font-size: var(--fs-13); text-overflow: ellipsis; white-space: nowrap; }
.nb-who { color: var(--text-2); font-size: var(--fs-14); word-break: break-all; }
.tag.nb-pin { flex: none; height: 20px; padding: 0 8px; background: var(--gray-100); color: var(--text-2); border: 1px solid var(--border); }
.nb .pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); }
.nb .pager:empty { display: none; }
#dlg-notice { width: min(760px, 94vw); }
.nb-dtitle { display: flex; align-items: center; gap: var(--s2); word-break: break-word; }
.nb-meta { margin: 0 var(--s6); color: var(--text-3); font-size: var(--fs-13); }
.nb-text { margin: var(--s4) var(--s6) 0; padding-top: var(--s4); border-top: 1px solid var(--border); color: var(--text); font-size: var(--fs-15); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.nb-text:empty { display: none; }
.nb-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s2); margin: var(--s4) var(--s6) 0; }
.nb-img { display: block; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--gray-50); aspect-ratio: 4 / 3; }
.nb-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nb-sec { margin: var(--s4) var(--s6) 0; }
.nb-form .nb-sec { margin: var(--s2) 0 0; }
.nb-sec h3 { margin: 0 0 var(--s2); font-size: var(--fs-14); font-weight: 700; }
.nb-files { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nb-files:empty { display: none; }
.nb-files li { display: flex; align-items: center; gap: var(--s3); min-height: 36px; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--fs-14); }
.nb-files li > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-files a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.nb-files .muted { font-size: var(--fs-13); white-space: nowrap; }
.nb-files--new li { border-style: dashed; }
.nb-files li.is-bad .muted, .nb-hint.is-bad { color: var(--danger-700); }
.nb-form { display: flex; flex-direction: column; gap: var(--s3); }
.nb-form > label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-14); font-weight: 600; color: var(--text-2); }
.nb-form textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
.nb-form .nb-check { flex-direction: row; align-items: center; gap: var(--s2); font-weight: 500; }
.nb-form .nb-check input { width: 16px; height: 16px; }
.nb-pick { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); font-size: var(--fs-13); color: var(--text-3); }
.nb-pick input { font-size: var(--fs-13); }
.nb-hint { margin: 4px 0 0; font-size: var(--fs-13); color: var(--text-3); }
.nb-warn { margin: 0; }
.nb-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin: var(--s5) var(--s6) 0; }
.nb-form .nb-actions { margin: var(--s2) 0 0; }
.nb-body > .msg { margin: var(--s3) var(--s6) 0; }
.nb-form > .msg { margin: 0; }
.nt-setrow__ctl input.nt-phone { width: 150px; height: var(--nt-ctl); margin: 0; font-variant-numeric: tabular-nums; }
#f-clinic-phone > div:first-child { flex: 1; min-width: 0; }
#n-resv-preview { padding: 8px 10px; border-radius: var(--r-md); background: var(--gray-50); color: var(--text-2); font-size: var(--fs-13); word-break: keep-all; }
@media (max-width: 720px) {
  .nb .page-head { flex-direction: column; align-items: stretch; }
  .nb-tbl thead { display: none; }
  .nb-tbl, .nb-tbl tbody { display: block; }
  .nb-tbl tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .nb-tbl td, .table-scroll--flush .nb-tbl td:first-child, .table-scroll--flush .nb-tbl td:last-child { padding: 0; border: 0; width: auto !important; }
  .nb-tbl td.nb-title { grid-column: 1 / -1; margin-bottom: 4px; }
  .nb-tbl td.nb-who { font-size: var(--fs-13); color: var(--text-3); }
  .nb-tbl td.nb-num { display: none; }
  .nb-tbl td.nt-empty { grid-column: 1 / -1; }
  .nb-imgs { grid-template-columns: repeat(2, 1fr); }
}
.nb-tbl .nt-empty { height: 64px; text-align: center; color: var(--text-3); cursor: default; }

/* 18. 지역 선택·병원 계정 (2026-10-21, r6 병합) — 검색에 지역(시·도) 칸 추가, 병원 계정은 유입경로 칸 없음 */
.filters { grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(110px, 1fr)) auto; }
.filters:has(#ff-source[hidden]) { grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(110px, 1fr)) auto; }
@media (max-width: 1279px) {
  .filters, .filters:has(#ff-source[hidden]) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .filters > label.field:nth-of-type(4) { grid-column: span 2; }
}
@media (max-width: 767px) {
  .filters, .filters:has(#ff-source[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters > label.field:nth-of-type(n) { grid-column: auto; }
}
.region-legacy { display: block; margin-top: 4px; font-weight: 400; }
select:disabled { color: var(--text-disabled); background: var(--gray-50); }

/* 19. 공지 긴급·고정·노션형 작성 폼 (2026-10-22) — 무채색, 긴급만 글자색 한 가지 */
.tag.nb-urgent { flex: none; height: 20px; padding: 0 8px; background: var(--surface); color: var(--danger-700); border: 1px solid #e8cfcb; font-weight: 600; }
.nb-row.is-urgent { background: var(--gray-25); }
.nb-actions__gap { flex: 1; }
.nb-body > .nb-actions { flex-wrap: wrap; }
@media (min-width: 768px) { dialog#dlg-notice.is-edit { width: min(780px, 94vw); } }   /* 2026-10-22 r20: 모바일은 기존 하단 시트(100vw) 그대로 — 94vw 가 덮어써 왼쪽으로 쏠리던 문제 */
.np { display: flex; flex-direction: column; min-height: 0; padding: var(--s6) 52px 0; }
.np-crumb { margin: 0 0 var(--s4); color: var(--text-3); font-size: var(--fs-13); }
input.np-title { height: auto; margin: 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
input.np-title:hover, input.np-title:focus { border: 0; box-shadow: none; }
input.np-title::placeholder { color: var(--gray-300); }
.np-props { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s4); }
.np-prop { display: grid; grid-template-columns: 148px minmax(0, 1fr); align-items: start; min-height: 34px; }
.np-prop__k { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 6px; color: var(--text-3); font-size: var(--fs-14); }
.np-prop__k::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--npi) no-repeat center / contain; mask: var(--npi) no-repeat center / contain; }
.np-prop__k[data-ic="user"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="time"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="pin"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6l-1 6 4 3v2H6v-2l4-3z'/%3E%3Cpath d='M12 15v6'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="alert"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.5 20h19z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="file"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 11-8.5 8.5a5 5 0 0 1-7-7L13 4a3.5 3.5 0 0 1 5 5l-8.5 8.5a2 2 0 0 1-3-3L14 7'/%3E%3C/svg%3E"); }
.np-prop__v { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 34px; padding: 4px 8px; border-radius: var(--r-sm); font-size: var(--fs-14); color: var(--text); }
.np-prop__v:hover { background: var(--gray-50); }
.np-val { word-break: break-all; }
.np-prop__note { color: var(--text-3); font-size: var(--fs-13); }
.np-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--text-2); cursor: pointer; }
.np-toggle input.np-check { width: 16px; height: 16px; margin: 0; accent-color: var(--gray-700); cursor: pointer; }
.np-toggle input.np-check:disabled { cursor: not-allowed; }
.np-toggle input.np-check:disabled + span { color: var(--text-disabled); }
.np-files { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.np-files .nb-files li { min-height: 32px; background: var(--surface); }
.np-add { position: relative; display: inline-flex; align-self: flex-start; align-items: center; height: 28px; padding: 0 6px; margin: 0 0 0 -6px; border-radius: var(--r-sm); color: var(--text-3); font-size: var(--fs-14); cursor: pointer; }
.np-add:hover { background: var(--gray-100); color: var(--text-2); }
.np-add input.np-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.np-add:focus-within { outline: 2px solid var(--primary); }
.np-files .nb-hint { margin: 0; }
.np-hr { margin: var(--s4) 0; border: 0; border-top: 1px solid var(--border); }
textarea.np-text { min-height: 180px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); font-size: var(--fs-15); line-height: 1.75; resize: none; overflow: hidden; }
textarea.np-text:hover, textarea.np-text:focus { border: 0; box-shadow: none; }
textarea.np-text::placeholder { color: var(--gray-400); }
.np-warn { margin: var(--s4) 0 0; color: var(--text-3); font-size: var(--fs-13); }
.np > .msg { margin: var(--s3) 0 0; }
.np-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: var(--s2); margin: var(--s4) -52px 0; padding: var(--s3) 52px; border-top: 1px solid var(--border); background: var(--surface); }
#dlg-notice.is-edit .nb-body { padding-bottom: 0; }
@media (max-width: 720px) {
  .np { padding: var(--s5) var(--s5) 0; }
  .np-foot { margin: var(--s4) calc(-1 * var(--s5)) 0; padding: var(--s3) var(--s5); }
  input.np-title { font-size: 24px; }
  .np-prop { grid-template-columns: 112px minmax(0, 1fr); }
}
/* 2026-10-22 r20: 모바일(767px 이하) 팝업은 모두 화면 폭 하단 시트 — 팝업별 94vw 지정이 덮어써 한쪽으로 쏠리던 문제(공지·예약·내보내기·비밀번호) */
@media (max-width: 767px) { #dlg-resv, #dlg-rvm, #dlg-mypw, #dlg-export, #dlg-notice, dialog#dlg-notice.is-edit { width: 100vw; } }
/* 2026-10-22 r20: 공지 목록 펼쳐 보기 · 본문 이미지 임베드 */
.nb-caret { flex: none; width: 14px; height: 14px; background: var(--text-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain; transition: transform .12s; }
.nb-row.is-open .nb-caret { transform: rotate(90deg); }
.nb-row.is-open > td { border-bottom-color: transparent; }
.nb-row.is-open .nb-title b { white-space: normal; }
.nb-exp > td.nb-exp__cell { height: auto; padding: 0 var(--s6) var(--s5) calc(var(--s6) + 22px); white-space: normal; background: var(--surface); cursor: default; }
.nb-row.is-urgent + .nb-exp > td, .nb-row.is-pinned + .nb-exp > td { background: var(--gray-25); }
.nb-exp .nb-meta { margin: 0 0 var(--s3); }
.nb-doc { display: flex; flex-direction: column; gap: var(--s3); max-width: 760px; }
.nb-doc .nb-text { margin: 0; padding: 0; border: 0; }
.nb-body .nb-doc { margin: var(--s4) var(--s6) 0; padding-top: var(--s4); border-top: 1px solid var(--border); }
.nb-fig { margin: 0; }
.nb-fig a { display: inline-block; max-width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--gray-50); }
.nb-fig img { display: block; max-width: 100%; max-height: 640px; height: auto; object-fit: contain; }
.nb-doc .nb-sec { margin: var(--s1) 0 0; }
.nb-none { margin: 0; color: var(--text-3); font-size: var(--fs-14); }
.nb-exp .nb-actions { margin: var(--s4) 0 0; max-width: 760px; }
.nb-exp .msg { max-width: 760px; }
.np-tools { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px dashed var(--border); }
.np-tools .np-add { margin-left: -6px; }
.np-tools__note { color: var(--text-3); font-size: var(--fs-13); }
.np-files .nb-files li .btn--sm { flex: none; }
@media (max-width: 720px) {
  .nb-tbl tr.nb-exp { display: block; padding: 0 14px 14px; border-bottom: 1px solid var(--border); }
  .nb-tbl tr.nb-row.is-open { border-bottom: 0; }
  .nb-exp > td.nb-exp__cell { display: block; padding: 0 !important; }
}
/* 2026-10-22 r21: 메뉴 묶음(업무 / 관리) — 사이드바에서만 묶음 이름, 좁은 화면 가로 메뉴는 얇은 구분선 */
.top__group { flex: none; align-self: center; width: 1px; height: 20px; margin: 0 var(--s1); background: var(--border); font-size: 0; }
@media (min-width: 1024px) {
  .top__group { align-self: auto; width: auto; height: auto; margin: var(--s4) 0 0; padding: var(--s3) var(--s3) var(--s2); border-top: 1px solid var(--gray-100); background: none; font-size: var(--fs-12); font-weight: 600; color: var(--text-3); }
}
@media (min-width: 1024px) { .top__group:first-child { margin-top: 0; border-top: 0; } }

/* 2026-10-22 r24: 오늘 할 일 · 공지 읽음 · 내보내기 조건 — 무채색, 강조는 굵기·테두리로만 */
.today { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: stretch; gap: var(--s3); margin-bottom: var(--s4); }
.today__title { align-self: center; padding-right: var(--s2); color: var(--text-2); font-size: var(--fs-14); font-weight: 700; white-space: nowrap; }
.today__card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label num" "sub sub"; align-items: center; gap: 2px var(--s3); min-width: 0; padding: 12px var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); font: inherit; text-align: left; color: var(--text); cursor: pointer; transition: border-color .12s, background .12s; }
.today__card:hover { border-color: var(--gray-400); background: var(--gray-25); }
.today__card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.today__card.is-on { border-color: var(--gray-700); box-shadow: inset 0 0 0 1px var(--gray-700); }
.today__label { grid-area: label; font-size: var(--fs-14); font-weight: 600; color: var(--text-2); }
.today__num { grid-area: num; display: flex; align-items: baseline; gap: 2px; }
.today__num b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.today__num span { color: var(--text-3); font-size: var(--fs-13); }
.today__sub { grid-area: sub; overflow: hidden; color: var(--text-3); font-size: var(--fs-12); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) {
  .today { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
  .today__title { grid-column: 1 / -1; }
  .today__card { grid-template-columns: 1fr; grid-template-areas: "label" "num" "sub"; padding: 10px 12px; }
  .today__sub { white-space: normal; }
}
.nb-new { flex: none; height: 18px; padding: 0 6px; border-radius: var(--r-full); background: var(--gray-900); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.nb-readbar { margin-top: var(--s4); max-width: 760px; }
.nb-reads__btn { padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-13); color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
.nb-reads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 760px; margin-top: var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-sub); }
.nb-reads[hidden] { display: none; }
.nb-reads__col h4 { margin: 0 0 6px; font-size: var(--fs-13); font-weight: 700; color: var(--text-2); }
.nb-reads__col ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-13); }
.nb-reads__col li { display: flex; justify-content: space-between; gap: var(--s2); }
.nb-reads__col p { margin: 0; font-size: var(--fs-13); }
.nb-ualert { margin: var(--s5) var(--s6) 0; color: var(--danger-700); font-size: var(--fs-13); font-weight: 600; }
.nb-ualert + .rv-title { padding-top: var(--s2); }
.ex-cond { margin: var(--s3) 0; padding: var(--s3) var(--s4) var(--s2); border: 1px solid var(--border); border-radius: var(--r-md); }
.ex-cond legend { padding: 0 4px; font-size: var(--fs-14); font-weight: 700; }
.ex-cond legend em { font-style: normal; font-weight: 400; color: var(--text-3); font-size: var(--fs-12); }
.ex-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); }
.ex-grid .ex-span2 { grid-column: 1 / -1; }
.ex-grid .field { font-size: var(--fs-13); }
.ex-cond .muted.small { margin: var(--s2) 0 0; }
@media (max-width: 520px) { .ex-grid { grid-template-columns: 1fr; } }
/* 2026-10-22 r25: 관리자 기록 엑셀 보고서 창 */
#dlg-logx { width: min(560px, 94vw); }
@media (max-width: 767px) { #dlg-logx { width: 100vw; } }
#f-logx { display: flex; flex-direction: column; gap: var(--s3); }
#f-logx > label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.lx-desc { margin: 0; font-size: var(--fs-13); line-height: 1.6; }
.lx-range { display: flex; align-items: flex-end; gap: var(--s2); }
.lx-range label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.lx-range span { padding-bottom: 10px; color: var(--text-3); }
.lx-quick { display: flex; flex-wrap: wrap; gap: var(--s2); }
#f-logx .muted.small { margin: 0; }
/* 2026-10-22 r26: 계정 역할(메뉴)·권한 */
.u-th-hint { display: block; font-weight: 400; font-size: 11px; color: var(--text-3); }
#u-table select { min-width: 112px; }
/* 역할 칸이 늘어 1680px 아래에서는 관리 버튼을 행 아래 줄로(가로 넘침 방지) */
@media (max-width: 1679px) {
  #u-table th.u-act-h, #u-table td.u-act-inline { display: none; }
  #u-table tr.u-act-row { display: table-row; }
  #u-table tr.u-act-row td { padding-top: 0; border-top: 0; }
  #u-table .u-act-wrap { position: sticky; left: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); max-width: calc(100vw - 2 * var(--s6)); }
}
/* 2026-10-22 r27: 공지 작성 팝업에서 내용이 길면 스크롤이 안 되던 문제 — 폼과 본문 칸이 팝업 높이에 맞춰 줄어들며(내용 잘림) 스크롤할 내용이 없어짐.
   폼은 줄어들지 않게, 팝업 본문(nb-body)이 스크롤하도록 */
#dlg-notice .np { flex: none; min-height: auto; }
#dlg-notice .np > * { flex-shrink: 0; }
#dlg-notice .nb-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }

/* ───────── 2026-10-22 r29: 공지 본문 서식(바로 보이는 편집기) ───────── */
.np-tb { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 var(--s3); padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.np-tb__b { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); font: inherit; font-size: var(--fs-14); cursor: pointer; }
.np-tb__b:hover { background: var(--gray-100); color: var(--text); }
.np-tb__b:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.np-tb__b[aria-pressed="true"], .np-tb__b[aria-expanded="true"] { background: var(--gray-200); color: var(--text); }
.np-tb__b.is-b { font-weight: 800; }
.np-tb__b.is-i { font-style: italic; font-family: Georgia, serif; }
.np-tb__b.is-u { text-decoration: underline; text-underline-offset: 3px; }
.np-tb__b.is-c { box-shadow: inset 0 -3px 0 -0px var(--np-c, transparent); }
.np-tb__b.is-hl[aria-pressed="false"] { background: linear-gradient(transparent 58%, #fbefc0 58%); }
.np-tb__sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.np-tb__img { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 8px; border-radius: var(--r-sm); color: var(--text-2); font-size: var(--fs-14); cursor: pointer; }
.np-tb__img:hover { background: var(--gray-100); color: var(--text); }
.np-tb__img:focus-within { outline: 2px solid var(--primary); }
.np-tb__img input.np-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.np-pal { position: absolute; top: calc(100% + 4px); left: 4px; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
.np-pal[hidden] { display: none; }
.np-sw { gap: 6px; }
.np-sw::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--sw, var(--text)); }
.np-sw--none::before { background: var(--surface); border: 1px solid var(--border-strong); }
.np-sw__t { font-size: var(--fs-13); }
.np-ed { position: relative; min-height: 200px; padding: 2px 0 var(--s3); outline: 0; color: var(--text); font-size: var(--fs-15); line-height: 1.75; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.np-ed.is-empty::before { content: attr(data-ph); position: absolute; top: 2px; left: 0; right: 0; color: var(--gray-400); pointer-events: none; }
.np-ed h3, .nb-doc h3.nb-h { margin: var(--s3) 0 2px; color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.5; }
.np-ed > h3:first-child, .nb-doc > h3.nb-h:first-child { margin-top: 0; }
.np-ed font[color], .np-ed b, .np-ed i, .np-ed u { white-space: pre-wrap; }
.np-ed u, .nb-doc u { text-underline-offset: 3px; }
.np-img { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: fit-content; max-width: 100%; margin: 6px 0; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--gray-50); user-select: none; white-space: normal; }
.np-img img { display: block; max-width: min(320px, 100%); max-height: 200px; border-radius: var(--r-sm); object-fit: contain; }
.np-img__n { padding: 0 4px; color: var(--text-3); font-size: var(--fs-13); line-height: 1.4; }
.np-img:focus, .np-ed .np-img.is-sel { outline: 2px solid var(--primary); }
.nb-doc .nb-text { white-space: pre-wrap; }
.nb-ln:empty { min-height: 1.75em; }
.nb-c-red { color: #b54434; } .nb-c-blue { color: #2f5f98; } .nb-c-green { color: #3b7552; } .nb-c-gray { color: #6b7280; }
mark.nb-hl { padding: 0 1px; border-radius: 2px; background: #fbefc0; color: inherit; }
@media (max-width: 767px) { .np-tb { top: 0; } .np-tb__b { min-width: 30px; padding: 0 6px; } }

/* ───────── 2026-10-22 r30: 공지 게시 기간·보는 대상·다시 알림·임시저장 ───────── */
.np-prop__k[data-ic="cal"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="eye"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.np-prop__k[data-ic="bell"] { --npi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.np-period { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.np-period__to { color: var(--text-3); }
input.np-dt { width: auto; min-width: 0; height: 30px; padding: 0 8px; font-size: var(--fs-14); }
.np-aud { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
select.np-sel { width: auto; height: 30px; padding: 0 28px 0 8px; font-size: var(--fs-14); }
.np-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--s4); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--gray-50); color: var(--text-2); font-size: var(--fs-14); }
.np-draft > span { flex: 1 1 200px; }
.np-dnote { margin-right: auto; align-self: center; color: var(--text-3); font-size: var(--fs-13); }
.tag.nb-sched, .tag.nb-ended, .tag.nb-aud { flex: none; height: 20px; padding: 0 8px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); font-weight: 500; }
.tag.nb-sched { color: #2f5f98; border-color: #cfdcec; }
.tag.nb-ended { color: var(--text-3); }
.nb-remind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--s2); }
.nb-rmsg { margin: 0; font-size: var(--fs-13); }
#u-table .u-phone { font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { input.np-dt { flex: 1 1 100%; } .np-period__to { display: none; } }

/* ───────── 2026-10-22 r30: 재연락 날짜·재접수·월간 통계 ───────── */
.today { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
@media (max-width: 767px) { .today { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.today__card[data-k="due"] .today__label::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: var(--warning-500); vertical-align: middle; }
.tag.c-dup { margin-left: 6px; height: 18px; padding: 0 6px; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.c-recall { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-12); white-space: nowrap; }
.c-recall.is-late { color: var(--warning-700); }
.c-recall.is-late::after { content: " · 지남"; }
.chip-toggle { height: 28px; margin-left: auto; margin-right: var(--s3); padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-13); cursor: pointer; }
.chip-toggle:hover { border-color: var(--gray-400); }
.chip-toggle[aria-pressed="true"] { border-color: var(--gray-700); background: var(--gray-900); color: #fff; }
.chip-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#dlg-body > .same-num { order: 3; margin: var(--s3) var(--s6) 0; }
@media (max-width: 767px) { #dlg-body > .same-num { margin-left: var(--s5); margin-right: var(--s5); } }
.same-num { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--gray-25); }
.same-num h3 { margin: 0 0 6px; font-size: var(--fs-14); font-weight: 700; color: var(--text-2); }
.same-num__list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-13); }
.same-num__list li { display: flex; align-items: center; gap: 8px; }
dd.recall-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
dd.recall-cell input[type=date] { width: auto; height: 30px; padding: 0 8px; }
/* 월간 통계 */
.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--s4); }
.st-bar input[type=month] { width: auto; height: 32px; padding: 0 8px; }
.st-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.st-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.st-kpi__label { color: var(--text-2); font-size: var(--fs-13); font-weight: 600; }
.st-kpi__val { color: var(--text); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-kpi__sub { color: var(--text-3); font-size: var(--fs-12); }
.st-card { position: relative; margin-bottom: var(--s4); }
.st-card__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); margin-bottom: var(--s3); }
.st-card__head h2 { margin: 0; font-size: var(--fs-15); }
.st-days { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 180px; padding-top: 8px; border-bottom: 1px solid var(--border); }
.st-day { display: flex; flex-direction: column; min-width: 0; cursor: default; }
.st-day__plot { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.st-day__bar { display: block; width: 70%; max-width: 18px; min-height: 0; border-radius: 4px 4px 0 0; background: #4f6bd8; transition: opacity .1s; }
.st-day__bar.is-zero { height: 2px !important; background: var(--gray-200); }
.st-day:hover .st-day__bar { opacity: .75; }
.st-day.is-today .st-day__bar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px #4f6bd8; }
.st-day__x { height: 18px; margin-bottom: -20px; color: var(--text-3); font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.st-day.is-weekend .st-day__x { color: var(--gray-400); }
.st-card .st-days { margin-bottom: 22px; }
.st-tip { position: absolute; top: 44px; z-index: 2; padding: 4px 8px; border-radius: var(--r-sm); background: var(--gray-900); color: #fff; font-size: var(--fs-12); white-space: nowrap; pointer-events: none; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.st-grid .st-card:first-child { grid-column: 1 / -1; }
.st-tbl td, .st-tbl th { padding-top: 8px; padding-bottom: 8px; }
.st-tbl th:nth-child(n+2), .st-tbl td.st-tbl__p { text-align: right; white-space: nowrap; width: 76px; }
.st-tbl th:nth-child(2) { text-align: left; width: 45%; }
.st-tbl__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.st-tbl__n { white-space: nowrap; }
.st-tbl__n b { display: inline-block; min-width: 2.5em; margin-left: 6px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.st-tbl__p { color: var(--text-2); font-variant-numeric: tabular-nums; }
.st-hbar { display: inline-block; width: calc(100% - 3.5em); max-width: 220px; height: 8px; vertical-align: middle; }
.st-hbar__fill { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: #4f6bd8; }
@media (max-width: 1023px) { .st-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .st-grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-days { height: 140px; } .st-tbl__name { max-width: 110px; } }
.top__tabs button[data-tab="stats"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-8'/%3E%3C/svg%3E"); }

/* ───────── 2026-10-22 r32: 메모 빠른 문구 · 광고비 ───────── */
.phr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.phr__chip { height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-full); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-13); cursor: pointer; }
.phr__chip:hover { border-color: var(--gray-400); background: var(--gray-50); color: var(--text); }
.phr__chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.phr__edit { margin-left: 4px; }
.phr__ta { width: 100%; font-size: var(--fs-14); line-height: 1.6; }
.phr p { flex-basis: 100%; margin: 0; }
.st-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1279px) { .st-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-spend-btn { margin-left: auto; }
.st-spend { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--gray-25); }
.st-spend p { margin: 0 0 var(--s2); }
.st-spend__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin-bottom: var(--s3); }
.st-spend__grid label { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--text-2); }
.st-spend__grid input { height: 32px; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }
.st-spend__grid em { font-style: normal; color: var(--text-3); }
.st-tbl--src th:nth-child(2) { width: 32%; }
.st-tbl--src th:nth-child(n+3), .st-tbl--src td.st-tbl__p { width: 86px; }
.st-tot td { border-top: 2px solid var(--border-strong); font-weight: 700; }
.notes__form .phr { margin: 0; padding: 10px 12px 2px; }

/* 2026-10-23 응답 속도 카드 · 지연 경고 체크 · 지연 경고 시간 고르기 */
.st-grid .st-card.st-resp { grid-column: 1 / -1; }
.st-resp__sum { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0 0 var(--s3); font-size: var(--fs-14); color: var(--text-2); }
.st-resp__sum b { color: var(--text); font-variant-numeric: tabular-nums; }
.st-resp__grp th { text-align: left !important; width: auto !important; padding-top: var(--s3); font-size: var(--fs-12); font-weight: 600; color: var(--text-2); background: transparent; }
.st-tbl--resp td.st-tbl__p { width: 88px; }
.st-resp__slow { color: var(--danger-700) !important; font-weight: 600; }
.u-delay { display: inline-flex; align-items: center; gap: 4px; margin-left: var(--s2); font-size: var(--fs-12); color: var(--text-2); white-space: nowrap; cursor: pointer; }
.u-delay input { margin: 0; }
.nt-setrow__ctl select#n-delay { height: var(--nt-ctl); min-width: 96px; margin: 0; }
.nt-setrow p b { display: inline; font-size: inherit; font-weight: 600; }
.st-tbl--resp th:nth-child(n+2) { text-align: right; width: 88px; }
#n-delay-state { white-space: nowrap; }

/* ───────────── 2026-10-23 상담 목록: 접수일시 굵게 · 오늘 접수 번호 · 상태별 줄 색 · 모바일 순서(날짜/시간 → 이름/전화 → 지역 → 상담 내용) ───────────── */
.tbl--leads .c-date__d, .tbl--leads .c-date__t { color: var(--text); font-weight: 800; }
.c-seq { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-right: 6px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; vertical-align: middle; }
.today__recv { color: var(--primary); font-weight: 800; }
.tbl--leads tbody tr.row-resv { background: #eaf1ff; }
.tbl--leads tbody tr.row-plan { background: #fff1de; }
.tbl--leads tbody tr.row-done { background: #fde8e8; }
.tbl--leads tbody tr.row-resv td:first-child { box-shadow: inset 4px 0 0 #3b6fe0; }
.tbl--leads tbody tr.row-plan td:first-child { box-shadow: inset 4px 0 0 #f08c00; }
.tbl--leads tbody tr.row-done td:first-child { box-shadow: inset 4px 0 0 #e03131; }
.tbl--leads tbody tr.row-resv:hover { background: #dce8ff; }
.tbl--leads tbody tr.row-plan:hover { background: #ffe7c7; }
.tbl--leads tbody tr.row-done:hover { background: #fbd9d9; }
@media (min-width: 768px) { .tbl--leads .c-seq { display: grid; width: max-content; margin: 0 0 3px; } }
@media (max-width: 767px) {
  .tbl--leads tbody tr { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 0; grid-template-areas: "date date status" "name phone act" "region region act" "memo memo memo" "first first first" "resv resv resv" "visit visit visit"; }
  .tbl--leads tbody tr.row-resv { box-shadow: inset 4px 0 0 #3b6fe0; }
  .tbl--leads tbody tr.row-plan { box-shadow: inset 4px 0 0 #f08c00; }
  .tbl--leads tbody tr.row-done { box-shadow: inset 4px 0 0 #e03131; }
  .tbl--leads tbody tr td:first-child { box-shadow: none !important; }
  .tbl--leads td:nth-child(1) { grid-area: date; font-size: var(--fs-15); margin-bottom: 4px; display: flex !important; align-items: center; }
  .tbl--leads td:nth-child(1) .c-date__d, .tbl--leads td:nth-child(1) .c-date__t { display: inline; font-size: var(--fs-15); }
  .tbl--leads td:nth-child(1) .c-date__t { margin-left: 6px; }
  .tbl--leads td:nth-child(2) { grid-area: name; }
  .tbl--leads td:nth-child(4) { grid-area: phone; justify-self: start; align-self: center; margin-left: 10px; font-size: var(--fs-15); }
  .tbl--leads td:nth-child(3) { grid-area: region; margin-top: 2px; }
  .tbl--leads td:nth-child(3).is-none { display: none; }
  .tbl--leads td:nth-child(8) { grid-area: memo; margin-top: 4px; color: var(--text); }
}

/* 2026-10-23 지역 미지정: 지역이 빈 상담은 '지역 미지정'(흐린 글자, 모바일에서도 보임) */
.tbl--leads td.c-region.is-unset { color: var(--text-3); }

/* 2026-10-23 r36: 오늘 접수 번호 — 파란 동그라미 대신 날짜 왼쪽 좁은 칸의 흐린 숫자(번호 있는 줄·없는 줄 날짜 위치 동일) */
.tbl--leads .c-date__wrap { display: inline-flex; align-items: center; gap: 8px; }
.tbl--leads .c-date__wrap::before { content: ""; display: block; width: 1.4rem; flex: none; }
.tbl--leads .c-date__wrap.has-seq::before { display: none; }
.tbl--leads .c-seq, .c-seq { display: block; width: 1.4rem; min-width: 0; height: auto; margin: 0; padding: 0; border-radius: 0; background: none; color: var(--text-3); font-size: 13px; font-weight: 700; text-align: right; line-height: 1; }
@media (min-width: 768px) { .tbl--leads .c-seq { display: block; width: 1.4rem; margin: 0; } }
.tbl--leads .c-date__dt { display: block; }
@media (max-width: 767px) {
  .tbl--leads .c-date__wrap::before { display: none; }
  .tbl--leads .c-seq { width: auto; font-size: var(--fs-13); }
  .tbl--leads .c-seq::after { content: "번"; margin-left: 1px; font-weight: 500; }
  .tbl--leads .c-date__dt { display: inline; }
}

/* 2026-10-23 휴대폰 푸시 알림 */
#btn-push.is-on { border-color: var(--primary); color: var(--primary); }
#dlg-push { width: min(480px, 94vw); }
@media (max-width: 767px) { #dlg-push { width: 100vw; } #dlg-push .rv-foot0 { flex-wrap: wrap; } #dlg-push .rv-foot0 .btn { flex: 1 1 100%; } }   /* r38: 모바일은 다른 창처럼 하단 전체 폭 */
.push-box { display: grid; gap: var(--s3); }
.push-state { margin: 0; font-weight: 700; }
.push-guide { padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--surface-sub, #f5f7fb); font-size: var(--fs-14); line-height: 1.6; }
.push-guide ol { margin: 6px 0; padding-left: 1.3em; }
.push-guide p { margin: 4px 0 0; }

/* ═══════════════ 2026-10-23 r39 모바일 화면 전면 정리 (767px 이하만 — 768px 이상은 바뀌지 않음) ═══════════════
   기준: 좌우 여백 16 · 구역 간격 16 · 카드 안 12~16 · 카드 모서리 12 · 본문 14 · 보조 12~13 · 제목 22 · 지표 숫자 26 · 버튼 높이 40~44 */
.m-only { display: none; }
.tbl--leads td.c-mwho, .tbl--leads td.c-mmeta { display: none; }   /* r39 모바일 전용 칸 — PC 표에서는 숨김 */
.tbl--leads td.c-act { padding-right: var(--s5); width: 1%; }   /* 모바일 칸이 줄 끝에 붙어 :last-child 가 바뀌므로 '상세' 칸을 직접 지정(PC 모양 그대로) */
@media (max-width: 767px) {
  .m-only[hidden] { display: none !important; }

  /* ── 헤더: 로고 · 알림 · 메뉴 한 줄(52px) + 메뉴 탭 한 줄(44px) ── */
  .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand act" "tabs tabs"; align-items: center; gap: 0; min-height: 0; padding: 0 var(--s2) 0 var(--s4); box-shadow: none; }
  .top__brand { grid-area: brand; height: 52px; }
  .top__logo { height: 20px; }
  .top__mact { grid-area: act; display: flex; align-items: center; gap: 2px; }
  .top__mbtn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-md); background: none; color: var(--text-2); cursor: pointer; }
  .top__mbtn:active { background: var(--gray-100); }
  .top__dot { display: none; position: absolute; top: 11px; right: 11px; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--success-500, #16a34a); }
  #btn-push-m.is-on .top__dot { display: block; }
  .top__tabs { grid-area: tabs; order: initial; flex-basis: auto; margin: 0 calc(var(--s2) * -1) 0 calc(var(--s4) * -1); padding: 0 var(--s3) 0 var(--s3); gap: 2px; border-top: 1px solid var(--gray-100); }
  .top__tabs button { height: 44px; padding: 0 10px; border-radius: 0; font-size: var(--fs-14); gap: 6px; }
  .top__tabs button::before { width: 16px; height: 16px; }
  .top__tabs button[aria-selected="true"] { background: none; color: var(--blue-700); box-shadow: inset 0 -2px 0 var(--primary); }
  .top__tabs .top__group { display: none; }
  /* 낮은 빈도 기능(알림 설정·비밀번호 변경·로그아웃)은 ☰ 메뉴 안 */
  .top__user { display: none; }
  .top.is-menu-open .top__user { position: absolute; top: 52px; right: var(--s2); left: auto; z-index: 30; display: flex; flex-direction: column; align-items: stretch; gap: 0; width: min(280px, calc(100vw - 16px)); padding: var(--s2); border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
  .top.is-menu-open .top__user .avatar { display: none; }
  .top.is-menu-open .top__who { display: flex; padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--gray-100); }
  .top.is-menu-open .top__who #who { font-size: var(--fs-15); }
  .top.is-menu-open .top__user .btn { justify-content: flex-start; width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; box-shadow: none; font-size: var(--fs-15); font-weight: 500; color: var(--text); }
  .top.is-menu-open .top__user .btn:active { background: var(--gray-100); }
  .top.is-menu-open .top__user #btn-logout { color: var(--danger-700); }

  /* ── 공통 리듬 ── */
  main { padding: var(--s4) var(--s4) var(--s8); }
  .page-head h1 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
  .page-head { margin-bottom: var(--s4); }
  /* 상담 목록 머리: 제목 왼쪽 · [⋯][+ 상담 등록] 오른쪽 한 줄(설명 문구는 모바일에서 생략). 다른 화면 머리는 기존 배치 그대로 */
  #p-list .page-head { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--s3); }
  #p-list .page-head p { display: none; }
  #p-list .page-head > div:first-child { flex: 1; min-width: 0; }
  #p-list .page-head h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #p-list .page-head .row.page-head__action { width: auto; flex: none; flex-wrap: nowrap; gap: var(--s2); }
  #p-list .page-head .row.page-head__action .btn { flex: none; width: auto; }
  .page-head__action .more { flex: none; }
  .btn { min-height: 44px; }
  .btn--sm { min-height: 36px; }
  .card { border-radius: 12px; box-shadow: none; }
  #foot { margin-top: var(--s6); font-size: var(--fs-12); }

  /* ── 상담 목록: 업무 순서대로 — 제목·등록 → 핵심 지표 → 오늘 할 일 → 검색 → 목록 → 이번 달 현황 ── */
  #p-list:not([hidden]) { display: flex; flex-direction: column; }
  #p-list > .page-head { order: 1; }
  #p-list > #m-kpi { order: 2; }
  #p-list > #today { order: 3; }
  #p-list > #f-filter { order: 4; }
  #p-list > #m-list { order: 5; }
  #p-list > #list-card { order: 6; }
  #p-list > #btn-stats { order: 7; }
  #p-list > #stats { order: 8; }
  #p-list .page-head__action #btn-export { display: none; }
  #p-list .page-head__action #btn-go-new { height: 40px; min-height: 40px; padding: 0 14px; font-size: var(--fs-14); }
  .more { position: relative; display: inline-flex; }
  .page-head__action .more .more__btn { width: 40px; min-width: 40px; min-height: 40px; height: 40px; padding: 0; font-size: 20px; letter-spacing: 0; }
  .more__pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 190px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .16); }
  .more__pop[hidden] { display: none; }
  .more__pop button { height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: none; font: inherit; font-size: var(--fs-15); text-align: left; color: var(--text); cursor: pointer; }
  .more__pop button:active { background: var(--gray-100); }

  /* 핵심 지표 2개(2열 · 작게) */
  .mkpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
  .mkpi__card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; text-align: left; color: var(--text); }
  button.mkpi__card { cursor: pointer; }
  .mkpi__label { font-size: var(--fs-13); font-weight: 600; color: var(--text-3); }
  .mkpi__num { display: flex; align-items: baseline; gap: 2px; }
  .mkpi__num b { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .mkpi__num span { font-size: var(--fs-13); color: var(--text-3); }
  .mkpi__sub { overflow: hidden; max-width: 100%; font-size: var(--fs-12); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
  .mkpi__card.is-primary { border-color: var(--navy-900); background: var(--navy-900); color: #fff; }
  .mkpi__card.is-primary .mkpi__label, .mkpi__card.is-primary .mkpi__num span { color: #c9d2ff; }
  .mkpi__card.is-todo .mkpi__num b { color: var(--danger-700); }
  .mkpi__card.is-on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

  /* 오늘 할 일: 큰 카드 대신 한 묶음 안의 줄(줄마다 44px 이상) */
  .today { display: block; margin-bottom: var(--s4); padding: 4px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
  .today__title { display: block; padding: 8px 14px 4px; font-size: var(--fs-13); font-weight: 700; color: var(--text-3); }
  .today__title .today__recv { display: none; }
  .today__card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label num" "sub num"; column-gap: var(--s3); row-gap: 0; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; border-top: 1px solid var(--gray-100); border-radius: 0; background: none; box-shadow: none; }
  .today__title + .today__card { border-top: 0; }
  .today__card[data-k="todo"] { display: none; }
  .today__card.is-on { background: var(--primary-soft); }
  .today__label { font-size: var(--fs-15); font-weight: 600; color: var(--text); }
  .today__label::before { display: none; }
  .today__num { align-self: center; }
  .today__num b { font-size: 20px; }
  .today__sub { font-size: var(--fs-12); }

  /* 검색: 이름·연락처 한 줄 + [상세 조건][검색]. 기간·지역·유입경로·초기화는 펼쳤을 때만 */
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s2); margin-bottom: var(--s3); padding: 12px; border-radius: 12px; box-shadow: none; }
  .filters .field { gap: 4px; font-size: var(--fs-13); }
  .filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2) { font-size: 0; gap: 0; }   /* 이름·연락처는 칸 안 안내 글자로 충분 — 칸 이름은 화면 낭독용 aria 로 */
  .filters input, .filters select { height: 44px; font-size: 16px; }
  .filters > .field--range, .filters > label.field:nth-of-type(3), .filters > #ff-source { display: none; }
  .filters.is-open > .field--range { display: grid; grid-column: 1 / -1 !important; }
  .filters.is-open > label.field:nth-of-type(3), .filters.is-open > #ff-source:not([hidden]) { display: grid; grid-column: span 1 !important; }
  .filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2) { grid-column: span 1 !important; }
  .filters__actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: var(--s2); grid-column: 1 / -1 !important; }
  .filters__actions .btn { width: 100%; height: 44px; }
  .filters__more { display: inline-flex; }
  .filters__cnt { margin-left: 4px; color: var(--primary); font-weight: 700; }
  .filters:not(.is-open) #btn-reset { display: none; }
  .filters.is-open .filters__actions { grid-template-columns: 1fr 1fr 1fr; }
  .filters .range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; width: 100%; }
  .filters .range input { width: 100%; min-width: 0; padding: 0 8px; font-size: 15px; }
  .filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2) { order: 1; }
  .filters > .field--range { order: 2; }
  .filters > label.field:nth-of-type(3), .filters > #ff-source { order: 3; }
  .filters > .filters__actions { order: 4; }

  /* 목록 머리: 처리상태 탭 한 줄(가로 밀기) + 건수·재접수만 */
  #list-card { padding: 0; overflow: hidden; border-radius: 12px; }
  .table-card__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tabs tabs" "count dup"; gap: var(--s2); padding: 10px 12px; }
  .table-card__head .status-tabs { grid-area: tabs; margin: 0 -12px; padding: 0 12px; }
  .status-tabs button { height: 36px; }
  .table-card__count { grid-area: count; align-self: center; font-size: var(--fs-13); }
  .chip-toggle { grid-area: dup; height: 36px; margin: 0; padding: 0 12px; }
  .table-scroll { margin: 0; }

  /* 목록 행: 1) 번호·접수 시각 ··· 상태  2) 이름 연락처(재접수·재연락)  3) 지역 · 상담 내용(한 줄)  4) 1차 상담·예약·방문(있을 때만)  오른쪽 › = 상세 */
  .tbl--leads tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date status" "who act" "meta act" "first act" "resv resv" "visit visit"; column-gap: var(--s2); row-gap: 2px; padding: 12px 6px 12px 16px; border-bottom: 1px solid var(--gray-100); }
  .tbl--leads td:nth-child(2), .tbl--leads td:nth-child(3), .tbl--leads td:nth-child(4), .tbl--leads td:nth-child(8) { display: none !important; }
  .tbl--leads td:nth-child(1) { grid-area: date; display: flex !important; align-items: center; margin: 0 0 2px; font-size: var(--fs-13); }
  .tbl--leads td:nth-child(1) .c-date__d, .tbl--leads td:nth-child(1) .c-date__t { display: inline; font-size: var(--fs-13); font-weight: 700; color: var(--text-2); }
  .tbl--leads td:nth-child(1) .c-date__t { margin-left: 5px; }
  .tbl--leads .c-seq { width: auto; margin-right: 6px; font-size: var(--fs-12); }
  .tbl--leads td.c-mwho { grid-area: who; display: flex !important; width: auto; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
  .c-mwho__name { font-size: 16px; font-weight: 700; color: var(--text); }
  .c-mwho__phone { font-size: var(--fs-14); color: var(--text-2); font-variant-numeric: tabular-nums; }
  .c-mwho .tag, .c-mwho .c-recall { align-self: center; font-size: var(--fs-12); }
  .tbl--leads td.c-mmeta { grid-area: meta; display: block !important; width: auto; min-width: 0; overflow: hidden; font-size: var(--fs-13); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
  .c-mmeta .is-unset { color: var(--text-disabled); }
  .c-mmeta__memo::before { content: "·"; margin: 0 6px; color: var(--text-disabled); }
  .tbl--leads td:nth-child(5) { grid-area: first; margin-top: 2px; font-size: var(--fs-12); color: var(--text-3); }
  .tbl--leads td:nth-child(5)::before { content: "1차 상담 "; }
  .tbl--leads td:nth-child(6) { grid-area: resv; justify-self: start; margin-top: 6px; }
  .tbl--leads td:nth-child(7) { grid-area: visit; justify-self: start; margin-top: 4px; }
  .tbl--leads td:nth-child(5).is-none, .tbl--leads td:nth-child(6).is-none, .tbl--leads td:nth-child(7).is-none { display: none !important; }
  .tbl--leads td:nth-child(9) { grid-area: status; justify-self: end; align-self: center; margin-right: 10px; }
  .tbl--leads td:nth-child(9) .tag { font-size: var(--fs-12); }
  .tbl--leads td:nth-child(10) { grid-area: act; align-self: center; justify-self: end; width: auto; }
  .tbl--leads .row-btn { display: grid; place-items: center; width: 40px; min-height: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--gray-400, #9aa3b2); font-size: 0; }
  .tbl--leads .row-btn::after { width: 18px; height: 18px; }
  .tbl--leads tbody tr:hover .row-btn, .tbl--leads .row-btn:hover { background: none; color: var(--primary); }
  .tbl--leads tbody tr:active { background: var(--gray-50); }
  .tbl--leads tbody tr.row-resv, .tbl--leads tbody tr.row-plan, .tbl--leads tbody tr.row-done { padding-left: 16px; }
  .tbl--leads .next-resv { min-height: 36px; padding-top: 0; padding-bottom: 0; }
  .pager { justify-content: space-between; padding: 8px 12px; }
  .pager .btn { min-width: 72px; height: 40px; min-height: 40px; }
  .empty { padding: var(--s8) var(--s4); }

  /* 이번 달 현황: 목록 아래 · 접어 두기 */
  .stats-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 48px; margin: var(--s4) 0 0; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--text-2); cursor: pointer; }
  .stats-toggle b { margin-left: auto; margin-right: 10px; font-variant-numeric: tabular-nums; color: var(--text); }
  .stats-toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gray-400, #9aa3b2); border-bottom: 2px solid var(--gray-400, #9aa3b2); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
  .stats-toggle[aria-expanded="true"] { border-radius: 12px 12px 0 0; border-bottom-color: var(--gray-100); }
  .stats-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
  #stats { display: none; }
  #stats.is-open { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface); overflow: hidden; }
  #stats.is-open .kpi { padding: 12px 14px; border: 0; border-radius: 0; box-shadow: none; background: none; }
  #stats.is-open .kpi--primary { display: none; }
  #stats.is-open .kpi:not(.kpi--dist) { grid-template-columns: 1fr auto auto; align-items: baseline; }
  #stats.is-open .kpi:not(.kpi--dist) .kpi__label { grid-column: auto; }
  #stats.is-open .kpi__value { font-size: 20px; color: var(--text); }
  #stats.is-open .kpi--dist { border-top: 1px solid var(--gray-100); }
  #stats.is-open .dist-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #stats[hidden] { display: none !important; }
}
@media (max-width: 359px) {
  .page-head h1 { font-size: 20px; }
  #p-list .page-head__action #btn-go-new { padding: 0 10px; }
  .mkpi__num b { font-size: 24px; }
  .tbl--leads td:nth-child(4) { font-size: var(--fs-13); }
  .tbl--leads td:nth-child(3) { max-width: 7em; }
}

/* ═══════════════ r41 (2026-10-26) 토스 스타일 개편 ═══════════════
   원칙: 회색 바탕(#f2f4f6) 위 흰 카드 — 테두리·그림자 없이 면으로 구분 · 모서리 20 · 제목 크고 굵게 · 여백 넉넉히
         강조색은 병원 강조색 하나(주요 버튼·선택 상태만) · 보조 버튼과 입력칸은 회색 면 · 상태 배지는 점 없는 연한 면
   유지: 상담 목록 행의 칸 순서·굵기(접수일시·이름 굵게) · 상태별 줄 색(방문예정 주황·방문완료 빨강·예약 파랑) — 줄 왼쪽 굵은 막대만 뺌 */
body { font-size: var(--fs-14); letter-spacing: -.01em; }
h1 { font-size: var(--fs-24); font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: var(--fs-18); font-weight: 700; letter-spacing: -.02em; }
::selection { background: var(--blue-100); color: var(--text); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* 입력칸: 회색 면 · 선 없음 · 누르면 흰 바탕 + 남색 테두리 */
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid transparent; border-radius: var(--r-md); background-color: var(--gray-50); }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color: transparent; background-color: var(--gray-100); }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--primary); background-color: var(--surface); box-shadow: 0 0 0 3px var(--focus); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--gray-50); opacity: .6; }
input::placeholder, textarea::placeholder { color: #6b7684; }
label.check { border: 0; border-radius: var(--r-md); background: var(--gray-50); }

/* 버튼: 주요 = 남색 면 · 보조 = 회색 면(선 없음) · 모서리 12 */
.btn { border-radius: var(--r-md); font-weight: 600; transition: background .15s, color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn--ghost, .btn.alt { border-color: transparent; background: var(--gray-50); color: var(--text-2); }
.btn--ghost:hover, .btn.alt:hover { border-color: transparent; background: var(--gray-100); color: var(--text); }
.btn--ghost:disabled { background: var(--gray-50); }
.btn:disabled { border-color: transparent; background: var(--gray-50); color: var(--text-disabled); }
.btn--sm { height: 36px; border-radius: var(--r-sm); }
.btn--lg { height: 52px; border-radius: 14px; font-size: var(--fs-15); }
.link { color: var(--primary); }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-sm); }
.icon-btn::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat center / contain; }
.icon-btn:hover { background: var(--gray-50); }
.msg { border-radius: var(--r-md); padding: 12px 14px; }

/* 상태 배지: 점 없이 연한 면 · 모서리 8 */
.tag { height: 26px; padding: 0 10px; border-radius: 8px; font-size: var(--fs-13); font-weight: 600; letter-spacing: -.01em; }
.tag[data-status]::before { content: none; }
.tag[data-status="보류"], .tag[data-status=""] { background: var(--gray-50); color: var(--text-2); box-shadow: none; }
.dist-bar { height: 8px; gap: 3px; }
.dist-bar__seg:first-child { border-radius: 999px 0 0 999px; } .dist-bar__seg:last-child { border-radius: 0 999px 999px 0; }

/* 카드·면: 선·그림자 없음 */
.card, .kpi, .filters, .today__card, .chip-toggle, .stats-toggle { border-color: transparent; box-shadow: none; }
.card { border: 0; border-radius: var(--r-lg); padding: 28px; margin-bottom: var(--s5); }
.card > h2 { margin-bottom: var(--s3); }

/* 레이아웃·사이드바 */
main { padding: 40px 48px 64px; }
.page-head { margin-bottom: 28px; }
.page-head p { margin-top: 6px; color: var(--text-3); }
.top { border-bottom-color: var(--gray-50); }
.top__tabs button { height: 44px; padding: 0 14px; border-radius: var(--r-md); font-size: var(--fs-14); font-weight: 600; color: var(--text-2); }
.top__tabs button::before { width: 20px; height: 20px; color: var(--gray-400); }
.top__tabs button:hover { background: var(--gray-50); color: var(--text); }
.top__tabs button[aria-selected="true"] { background: var(--gray-50); color: var(--text); font-weight: 700; }
.top__tabs button[aria-selected="true"]::before { background: var(--primary); }
.top__tabs .top__group { color: var(--text-3); }
.avatar { background: var(--primary); }
@media (min-width: 1024px) {
  .top { border-right: 0; padding: 28px 16px 20px; }
  .top__brand { padding: 0 10px 28px; }
  .top__tabs button[aria-selected="true"]::after { content: none; }
  .top__user { border-top-color: var(--gray-50); padding-top: 20px; }
  .top__user .btn { height: 40px; }
}

/* 상담 목록: 지표 · 검색 · 표 */
.stats { gap: var(--s4); margin-bottom: var(--s5); }
.kpi { border: 0; border-radius: var(--r-lg); padding: 24px 26px; }
.kpi__label { font-size: var(--fs-14); font-weight: 600; color: var(--text-2); }
.kpi__value { font-size: 30px; letter-spacing: -.03em; }
.kpi__unit { font-size: var(--fs-14); }
.kpi--primary { background: var(--surface); border-color: transparent; box-shadow: none; }
.kpi--primary .kpi__label { color: var(--text-2); } .kpi--primary .kpi__value { color: var(--primary); } .kpi--primary .kpi__unit { color: var(--text-3); }
.dist-legend li { font-size: var(--fs-14); }
.today { gap: var(--s4); margin-bottom: var(--s5); }
.today__card { border: 0; border-radius: 18px; background: var(--surface); padding: 18px 22px; }
.today__card:hover { border-color: transparent; background: var(--gray-25); }
.today__card.is-on { border-color: transparent; box-shadow: inset 0 0 0 2px var(--primary); }
.today__label { font-size: var(--fs-14); }
.filters { border: 0; border-radius: var(--r-lg); padding: 22px 26px; gap: var(--s4); margin-bottom: var(--s5); }
.field { font-size: var(--fs-13); color: var(--text-2); }
.table-card { border-radius: var(--r-lg); }
.table-card__head { padding: 20px 26px 14px; border-bottom: 0; }
.table-card__count { font-size: var(--fs-14); }
.status-tabs { gap: 8px; }
.status-tabs button { height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-full); background: var(--gray-50); font-size: var(--fs-14); color: var(--text-2); }
.status-tabs button:hover { border-color: transparent; background: var(--gray-100); color: var(--text); }
.status-tabs button[aria-selected="true"] { background: var(--primary); color: #fff; }
.chip-toggle { height: 36px; padding: 0 14px; border: 0; background: var(--gray-50); font-size: var(--fs-14); }
.chip-toggle:hover { border-color: transparent; background: var(--gray-100); }
.chip-toggle[aria-pressed="true"] { border-color: transparent; background: var(--primary); }
.tbl th { height: 44px; background: var(--surface); border-bottom: 1px solid var(--gray-50); font-size: var(--fs-13); font-weight: 500; color: var(--text-3); }
.tbl td { height: 64px; border-bottom: 1px solid var(--gray-50); }
.tbl tbody tr:hover, .tbl--leads tbody tr:hover { background: var(--gray-25); }
.tbl--leads th:first-child, .tbl--leads td:first-child { padding-left: 26px; }
.tbl--leads td.c-act { padding-right: 26px; }
.src { border-radius: 8px; background: var(--gray-50); }
.row-btn { height: 34px; padding: 0 10px 0 14px; border: 0; border-radius: var(--r-sm); background: var(--gray-50); color: var(--text-2); }
.tbl--leads tbody tr:hover .row-btn, .row-btn:hover { border-color: transparent; background: var(--gray-100); color: var(--text); }
.pager { padding: 14px 26px; border-top: 1px solid var(--gray-50); background: var(--surface); }
/* 상태별 줄 색은 그대로, 왼쪽 굵은 막대만 뺌 */
.tbl--leads tbody tr.row-resv td:first-child, .tbl--leads tbody tr.row-plan td:first-child, .tbl--leads tbody tr.row-done td:first-child { box-shadow: none; }
.tbl--leads tbody tr.row-resv { background: #edf4ff; } .tbl--leads tbody tr.row-resv:hover { background: #e2edff; }
.tbl--leads tbody tr.row-plan { background: #fff4e6; } .tbl--leads tbody tr.row-plan:hover { background: #ffecd4; }
.tbl--leads tbody tr.row-done { background: #ffeff0; } .tbl--leads tbody tr.row-done:hover { background: #ffe3e5; }

/* 폼·표 정보 */
.form-card__foot { border-top-color: var(--gray-50); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.kv dt, .kv dd { border-bottom-color: var(--gray-50); }
.kv dt { color: var(--text-3); }

/* 로그인 화면: 남색 띠 없이 회색 바탕 + 흰 카드 */
body:has(> header#top[hidden]) { background: var(--bg); }
.narrow { border-radius: 24px; box-shadow: none; padding: 44px 36px 36px; }

/* 상담 상세 창 */
dialog { border-radius: 24px; }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
#dlg-body > h2 { padding: 28px 56px 0 28px; font-size: var(--fs-20); }
#dlg-body > .dlg-meta { padding: 10px 28px 18px; border-bottom: 0; }
#dlg-body > p.small { margin: 0 28px; padding: 10px 14px; border-radius: var(--r-md); background: var(--gray-50); color: var(--text-3); font-weight: 500; }
#dlg-body > .kv { margin: 8px 28px 0; }
#dlg-body > .kv dd:nth-of-type(6) { border-radius: 14px; background: var(--gray-50); }
#dlg-body > label { margin: 20px 28px 0; }
#dlg-body > .msg { margin: 12px 28px 0; }
#dlg-body > .row { padding: 16px 28px 20px; border-top: 1px solid var(--gray-50); background: var(--surface); }
#dlg-body > .row .link { height: var(--control-h); border: 0; border-radius: var(--r-md); background: var(--gray-50); color: var(--text-2); }
#dlg-body > .row .link:hover { background: var(--gray-100); color: var(--text); }
#dlg-body > .notes { margin: 24px 28px 0; border-top: 0; padding-top: 0; }
.notes__head h3 { font-size: var(--fs-16); }
.notes__form { border: 1px solid transparent; border-radius: 14px; background: var(--gray-50); }
.notes__form:focus-within { border-color: var(--primary); background: var(--surface); }
.notes__form textarea, .notes__form textarea:hover, .notes__form textarea:focus { background: transparent; border-color: transparent; }
.notes__bar { border-top-color: transparent; }
.note-item { border-radius: 14px; background: var(--gray-50); padding: 14px 16px; }

/* 알림 버튼(아이콘) */
.btn .ic { flex: none; width: 18px; height: 18px; }
#btn-push.is-on { border-color: transparent; background: var(--primary-soft); color: var(--primary); }

/* 모바일(767px 이하): 같은 원칙 · 카드 모서리 18 */
@media (max-width: 767px) {
  main { padding: 20px 16px 40px; }
  .card { border-radius: 18px; padding: 20px; }
  .page-head h1 { font-size: 24px; }
  .top { border-bottom: 0; }
  .top__tabs { border-top-color: var(--gray-50); }
  .top__tabs button[aria-selected="true"] { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--primary); }
  .top.is-menu-open .top__user { border: 0; border-radius: 18px; box-shadow: var(--sh-3); }
  .more__pop { border: 0; border-radius: 18px; box-shadow: var(--sh-3); }
  .mkpi { gap: 10px; margin-bottom: 12px; }
  .mkpi__card { border: 0; border-radius: 18px; padding: 16px 18px; }
  .mkpi__card.is-primary { background: var(--surface); color: var(--text); }
  .mkpi__card.is-primary .mkpi__label, .mkpi__card.is-primary .mkpi__num span { color: var(--text-3); }
  .mkpi__card.is-primary .mkpi__num b { color: var(--primary); }
  .mkpi__card.is-on { box-shadow: inset 0 0 0 2px var(--primary); }
  .mkpi__num b { font-size: 28px; }
  .today { border: 0; border-radius: 18px; padding: 6px 0; margin-bottom: 12px; }
  .today__title { padding: 12px 18px 6px; font-size: var(--fs-14); color: var(--text); }
  .today__card { border-radius: 0; border-top: 1px solid var(--gray-50); padding: 10px 18px; min-height: 56px; background: none; }
  .today__card.is-on { box-shadow: none; background: var(--primary-soft); }
  .filters { border-radius: 18px; padding: 14px; gap: 8px; margin-bottom: 12px; }
  #list-card { border-radius: 18px; }
  .table-card__head { padding: 14px 14px 10px; }
  .table-card__head .status-tabs { margin: 0 -14px; padding: 0 14px; }
  .status-tabs button { height: 36px; }
  .tbl--leads tbody tr { padding: 14px 6px 14px 18px; border-bottom: 1px solid var(--gray-50); }
  .tbl--leads tbody tr.row-resv, .tbl--leads tbody tr.row-plan, .tbl--leads tbody tr.row-done { box-shadow: none; padding-left: 18px; }
  .tbl--leads .row-btn { background: none; }
  .stats-toggle { border: 0; border-radius: 18px; padding: 0 18px; height: 52px; }
  .stats-toggle[aria-expanded="true"] { border-radius: 18px 18px 0 0; }
  #stats.is-open { border: 0; border-radius: 0 0 18px 18px; }
  #stats.is-open .kpi--dist { border-top-color: var(--gray-50); }
  dialog { border-radius: 24px 24px 0 0; }
}
/* r41 보정: 목록 카드는 안쪽 여백 없이(머리·표가 직접 채움) · 회색 바탕 위 보조 버튼은 흰 면 · 모바일 목록 칸 높이 자동 */
.card.table-card, #list-card { padding: 0; }
.page-head .btn--ghost, .page-head .btn.alt, main > section > .row .btn--ghost { background: var(--surface); }
.page-head .btn--ghost:hover, .page-head .btn.alt:hover { background: var(--gray-100); }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
@media (max-width: 767px) { .tbl td { height: auto; } }
/* r41 보정: 왼쪽 굵은 색 막대 → 앞쪽 작은 색 점(원장 색·경고 종류는 그대로 구분) · 알림 띠는 연한 면 */
.nt-alert, .nt-alert--danger, .nt-alert--warn, .nt-alert--info { border: 0; border-left-width: 0; border-radius: 14px; padding: 14px 18px; }
.nt-alert--danger { background: var(--danger-50); color: var(--danger-700); }
.nt-alert--warn { background: var(--warning-50); color: var(--warning-700); }
.nt-alert--info { background: var(--gray-50); }
.dayitem, .rvx .dayitem { position: relative; border: 0; border-left: 0; border-radius: 14px; background: var(--gray-50); padding-left: 24px; }
.dayitem::before, .rvx .dayitem::before { content: ""; position: absolute; left: 11px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--doc, var(--gray-400)); }
.dayitem:hover { background: var(--gray-100); }
.ev, .rvx .ev { border-left: 0; border-radius: 6px; }   /* 일정 칸 안의 점(원장·상태 색)이 이미 있음 */
.rvx .ev--block { border-left-width: 0; box-shadow: none; background: var(--gray-50); }
@media (max-width: 767px) { .top__tabs button { height: 44px; padding: 0 10px; border-radius: 0; font-size: var(--fs-14); } .top__tabs button:hover { background: none; } }

/* ═══════════════ r42 (2026-10-26) 간격 정리 — 화면마다 달랐던 바깥 여백·구역 간격·카드 안쪽 여백을 한 기준으로 ═══════════════
   PC(1024~): 화면 여백 40/48 · 제목 아래 28 · 구역 사이 20 · 카드 안쪽 28 · 도구줄(검색·달력 막대) 20/28
   태블릿(768~1023): 화면 여백 32 · 나머지 PC 와 같음
   휴대폰(~767): 화면 여백 20/16 · 제목 아래 20 · 구역 사이 12 · 카드 안쪽 20 · 도구줄 16/20 */
:root { --page-gap: 20px; --head-gap: 8px; --card-pad: 28px; --bar-pad-y: 20px; --nt-pad: var(--card-pad); }
main > section[id^="p-"]:not([hidden]) { display: flex; flex-direction: column; gap: var(--page-gap); }
main > section[id^="p-"] > * { margin-top: 0 !important; margin-bottom: 0 !important; min-width: 0; }
main > section[id^="p-"] > .page-head, main > section[id^="p-"] > .nt-top { margin-bottom: var(--head-gap) !important; }
.card { padding: var(--card-pad); min-width: 0; }
.card.table-card, #list-card { padding: 0; }
.filters, .cal-bar, .rvx .cal-bar, #p-log .cal-bar { padding: var(--bar-pad-y) var(--card-pad); }
.table-card__head { padding: 20px var(--card-pad) 14px; }
.tbl--leads th:first-child, .tbl--leads td:first-child, .table-card .tbl th:first-child, .table-card .tbl td:first-child { padding-left: var(--card-pad); }
.tbl--leads td.c-act, .table-card .tbl th:last-child, .table-card .tbl td:last-child { padding-right: var(--card-pad); }
.pager { padding: 14px var(--card-pad); }
.table-scroll--flush, .nt .table-scroll--flush { margin: var(--s3) calc(var(--card-pad) * -1) 0; }
.table-scroll--flush .tbl th:first-child, .table-scroll--flush .tbl td:first-child { padding-left: var(--card-pad); }
.table-scroll--flush .tbl th:last-child, .table-scroll--flush .tbl td:last-child { padding-right: var(--card-pad); }
.nb-card .table-scroll--flush { margin: 0; }
.st-grid > *, .nt-grid > *, .grid-2 > *, .stats > *, .today > * { min-width: 0; }
@media (min-width: 768px) and (max-width: 1023px) { main { padding: 32px 32px 48px; } }
@media (max-width: 767px) {
  :root { --page-gap: 12px; --head-gap: 8px; --card-pad: 20px; --bar-pad-y: 16px; }
  main { padding: 20px 16px 40px; }
  .table-card__head { padding: 16px var(--card-pad) 10px; }
  .table-card__head .status-tabs { margin: 0 calc(var(--card-pad) * -1); padding: 0 var(--card-pad); }
  .tbl--leads tbody tr, .tbl--leads tbody tr.row-resv, .tbl--leads tbody tr.row-plan, .tbl--leads tbody tr.row-done { padding: 14px 8px 14px var(--card-pad); }
  .today__title, .today__card { padding-left: var(--card-pad); padding-right: var(--card-pad); }
  .stats-toggle { padding: 0 var(--card-pad); }
  #stats.is-open .kpi { padding: 12px var(--card-pad); }
  .pager { padding: 8px var(--card-pad); }
  .table-scroll--flush .tbl th:first-child, .table-scroll--flush .tbl td:first-child { padding-left: var(--card-pad); }
}

/* ═══════════════ r43 (2026-10-26) 상담 목록 밀도 — 명단이 첫 화면에 바로 보이게 ═══════════════
   첫 화면 순서: 제목·버튼 한 줄 → 오늘 요약 한 줄 → 검색(목록 카드 머리와 붙임) → 명단. 이번 달 현황은 맨 아래 접기.
   토스 느낌(회색 바탕·흰 카드·남색 강조·둥근 모서리)은 유지, 여백만 업무 밀도로. 명단 칸 순서·굵기·줄 색 그대로 */
main { padding-top: 32px; }
#p-list { --head-gap: 0px; }
#p-list > .page-head { align-items: center; }
#p-list > .page-head p { display: none; }
#p-list > .page-head h1 { font-size: 24px; }

/* 순서: 제목 → 오늘 요약 → (오류 문구) → 검색 → 명단 → 이번 달 현황(접기) */
#p-list:not([hidden]) { display: flex; flex-direction: column; }
#p-list > .page-head { order: 1; } #p-list > #m-kpi { order: 2; } #p-list > #today { order: 3; } #p-list > #m-list { order: 4; }
#p-list > #f-filter { order: 5; } #p-list > #list-card { order: 6; } #p-list > #btn-stats { order: 7; } #p-list > #stats { order: 8; }

/* 오늘 요약: 높이 낮은 한 줄 칩(설명 줄 숨김 — 마우스를 올리면 제목으로 보임) */
.today { grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 12px; }
.today__card { grid-template-areas: "label num"; padding: 12px 18px; border-radius: 16px; }
.today__sub { display: none; }
.today__num b { font-size: 22px; }

/* 검색: 이름·연락처 한 줄 + [상세 조건][검색] · 기간·지역·유입경로·초기화는 '상세 조건'을 눌렀을 때만. 목록 카드 위에 붙임 */
.filters__more { display: inline-flex; }
.filters { grid-template-columns: minmax(0, 220px) minmax(0, 220px) minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 16px var(--card-pad); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2) { font-size: 0; }
.filters > label.field:nth-of-type(1) input, .filters > label.field:nth-of-type(2) input { margin-top: 0; }
.filters > label.field:nth-of-type(1) { grid-column: 1; grid-row: 1; } .filters > label.field:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.filters > .filters__actions { grid-column: 4; grid-row: 1; display: flex; gap: 8px; }
.filters > .field--range, .filters > label.field:nth-of-type(3), .filters > #ff-source, .filters:not(.is-open) #btn-reset { display: none; }
.filters.is-open > .field--range { display: block; grid-column: 1 / span 2; grid-row: 2; }
.filters.is-open > label.field:nth-of-type(3) { display: block; grid-column: 3; grid-row: 2; max-width: 240px; }
.filters.is-open > #ff-source:not([hidden]) { display: block; grid-column: 4; grid-row: 2; }
main > section#p-list > #list-card { margin-top: calc(var(--page-gap) * -1) !important; border-radius: 0 0 var(--r-lg) var(--r-lg); }
main > section#p-list > #f-filter[hidden] + #list-card, main > section#p-list > #m-list:not([hidden]) + #f-filter + #list-card { margin-top: 0 !important; }
#list-card .table-card__head { padding: 12px var(--card-pad); border-top: 1px solid var(--gray-50); }

/* 명단: 줄 높이 52 · 넓은 화면에서는 표 머리가 위에 붙어 있음 */
.tbl--leads td { height: 52px; padding-top: 6px; padding-bottom: 6px; }
.tbl--leads th { height: 40px; }
@media (min-width: 1280px) {
  #list-card { overflow: clip; }
  #list-card .table-scroll { overflow: visible; }
  .tbl--leads thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: 0 1px 0 var(--gray-50); }
}

/* 이번 달 현황: 맨 아래 접힌 막대 */
.stats-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; padding: 0 var(--card-pad); border: 0; border-radius: var(--r-lg); background: var(--surface); font: inherit; font-size: var(--fs-14); font-weight: 600; color: var(--text-2); cursor: pointer; }
.stats-toggle:hover { background: var(--gray-25); }
.stats-toggle b { margin-left: auto; margin-right: 12px; font-variant-numeric: tabular-nums; color: var(--text); }
.stats-toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gray-400); border-bottom: 2px solid var(--gray-400); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.stats-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
#btn-stats.m-only { display: flex; }
#btn-stats[hidden] { display: none !important; }
#stats { display: none; }
#stats.is-open { display: grid; }
#stats[hidden] { display: none !important; }

@media (max-width: 1279px) and (min-width: 768px) {
  .today { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .today__title { grid-column: 1 / -1; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .filters > .filters__actions { grid-column: 3; }
  .filters.is-open > label.field:nth-of-type(3) { grid-column: 1; grid-row: 3; max-width: none; }
  .filters.is-open > #ff-source:not([hidden]) { grid-column: 2; grid-row: 3; }
}

/* 휴대폰: 오늘 요약 = 4칸 한 줄 · 검색 = 한 줄 · 목록 줄 여백 줄임 */
@media (max-width: 767px) {
  #p-list > #m-kpi:not([hidden]) { display: grid !important; }   /* r54: 오늘 할 일 칸이 일별 표로 바뀌어 휴대폰에도 핵심 지표 2칸을 보임 */
  .today { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
  .today__title { grid-column: 1 / -1; padding: 0 2px; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
  .today__title .today__recv { display: inline; }
  .today__card, .today__card[data-k="todo"] { display: grid; grid-template-columns: 1fr; grid-template-areas: "label" "num"; gap: 2px; min-height: 0; padding: 10px 10px 9px; border: 0; border-radius: 14px; background: var(--surface); text-align: left; }
  .today__title + .today__card { border-top: 0; }
  .today__card.is-on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); }
  .today__label { overflow: hidden; font-size: 12px; font-weight: 600; color: var(--text-2); text-overflow: ellipsis; white-space: nowrap; }
  .today__label::before { display: none !important; }
  .today__num b { font-size: 20px; }
  .today__num span { font-size: 12px; }
  .today__card[data-k="todo"] .today__num b { color: var(--danger-700); }

  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 8px; padding: 12px; border-radius: 18px 18px 0 0; }
  .filters > label.field:nth-of-type(1), .filters > label.field:nth-of-type(2) { grid-column: auto !important; grid-row: 1; order: 0 !important; }
  .filters > .filters__actions { display: contents !important; }
  .filters__actions .btn { width: auto; height: 44px; padding: 0 12px; }
  .filters__actions .filters__more { grid-row: 1; grid-column: 3; }
  .filters__actions .btn[type=submit] { grid-row: 1; grid-column: 4; }
  .filters.is-open > .field--range { display: grid; grid-column: 1 / -1 !important; grid-row: 2; }
  .filters.is-open > label.field:nth-of-type(3) { grid-column: 1 / span 2 !important; grid-row: 3; max-width: none; }
  .filters.is-open > #ff-source:not([hidden]) { grid-column: 3 / -1 !important; grid-row: 3; }
  .filters.is-open #btn-reset { grid-column: 1 / -1; grid-row: 4; width: 100%; }
  #list-card { border-radius: 0 0 18px 18px; }
  #list-card .table-card__head { padding: 10px var(--card-pad) 8px; }
  .tbl--leads td { height: auto; padding-top: 0; padding-bottom: 0; }
  .tbl--leads tbody tr, .tbl--leads tbody tr.row-resv, .tbl--leads tbody tr.row-plan, .tbl--leads tbody tr.row-done { padding-top: 12px; padding-bottom: 12px; }
  .stats-toggle { border-radius: 18px; }
  #stats.is-open { margin-top: -12px !important; }
}
@media (max-width: 767px) {
  .tbl--leads td { border-bottom: 0 !important; }
  .tbl--leads tbody tr { row-gap: 3px; }
  .tbl--leads td.c-act, .tbl--leads td:nth-child(10) { align-self: center; }
  .tbl--leads .row-btn { min-height: 36px; height: 36px; }
  .filters input { padding: 0 10px; font-size: 15px; }
  #p-list > .page-head h1 { font-size: 22px; }
}
@media (max-width: 767px) {
  .tbl--leads tbody tr { grid-template-areas: "date status" "who act" "meta act" "first first" "resv resv" "visit visit"; row-gap: 2px; }
  .filters__actions .filters__more { font-size: 0; padding: 0 12px; }
  .filters__actions .filters__more::before { content: "조건"; font-size: var(--fs-14); }
  .filters__actions .filters__more .filters__cnt { font-size: var(--fs-13); }
}

/* ═══════════════ r44 (2026-10-26) 인터랙션 — 하루 수십 번 쓰는 업무 화면이라 '빠르고 짧게, 필요한 곳만' ═══════════════
   누르면 살짝 눌림(0.97, 0.16초) · 색 바뀜 0.15초 · 창은 0.2초 안에 열리고 더 빨리 닫힘 · 펼침은 0.18초 · 키보드 동작·목록 스크롤에는 움직임 없음
   움직임 줄이기(운영체제 설정)면 위치·크기 움직임은 끄고 투명도만 */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1); }

/* 누르는 것: 색은 부드럽게, 누르는 순간 살짝 작아짐 */
.btn, .row-btn, .status-tabs button, .chip-toggle, .today__card, .mkpi__card, .stats-toggle, .top__mbtn, .icon-btn, .more__pop button, .top__user .btn {
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out); }
.btn:active:not(:disabled), .row-btn:active, .status-tabs button:active, .chip-toggle:active, .stats-toggle:active, .top__mbtn:active, .icon-btn:active { transform: scale(.97); }
.today__card:active, .mkpi__card:active { transform: scale(.98); }
.top__tabs button { transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.top__tabs button::before { transition: background-color 150ms ease; }
input:not([type=checkbox]):not([type=radio]), select, textarea, .notes__form { transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.tag { transition: background-color 200ms ease, color 200ms ease; }
.tbl tbody tr { transition: background-color 120ms ease; }
.stats-toggle::after { transition: transform 200ms var(--ease-out); }

/* 명단 다시 불러오는 중: 살짝 흐리게(0.12초 넘게 걸릴 때만) */
#list-card .table-scroll { transition: opacity 150ms ease; }
#list-card.is-loading .table-scroll { opacity: .5; }

/* 상세 창: 가운데에서 살짝 커지며 열림 0.2초 · 닫힐 땐 0.15초 · 휴대폰은 아래에서 올라옴 */
dialog { transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete; }
dialog:not([open]) { opacity: 0; transform: scale(.98); transition-duration: 150ms; }
dialog::backdrop { transition: background-color 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete; }
@starting-style { dialog[open] { opacity: 0; transform: scale(.97); } dialog[open]::backdrop { background-color: rgba(0, 0, 0, 0); } }

/* 펼쳐지는 것: 위에서 4px 내려오며 나타남 */
.filters.is-open > .field--range, .filters.is-open > label.field:nth-of-type(3), .filters.is-open > #ff-source, .filters.is-open #btn-reset,
#stats.is-open, .msg:not([hidden]), .more__pop:not([hidden]) { transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
@starting-style {
  .filters.is-open > .field--range, .filters.is-open > label.field:nth-of-type(3), .filters.is-open > #ff-source, .filters.is-open #btn-reset { opacity: 0; transform: translateY(-4px); }
  #stats.is-open { opacity: 0; transform: translateY(-6px); }
  .msg:not([hidden]) { opacity: 0; transform: translateY(-4px); }
  .more__pop:not([hidden]) { opacity: 0; transform: scale(.96); }
}
.more__pop { transform-origin: top right; }

@media (max-width: 767px) {
  dialog { transition: opacity 200ms ease, transform 300ms var(--ease-drawer), overlay 300ms allow-discrete, display 300ms allow-discrete; }
  dialog:not([open]) { opacity: 1; transform: translateY(100%); transition-duration: 200ms; }
  @starting-style { dialog[open] { opacity: 1; transform: translateY(100%); } }
  .top.is-menu-open .top__user { transform-origin: top right; transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out); }
  @starting-style { .top.is-menu-open .top__user { opacity: 0; transform: scale(.96); } }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active, .row-btn:active, .status-tabs button:active, .chip-toggle:active, .stats-toggle:active, .top__mbtn:active, .icon-btn:active, .today__card:active, .mkpi__card:active { transform: none; }
  dialog, dialog:not([open]) { transform: none !important; }
  @starting-style { dialog[open] { transform: none; } }
  .filters.is-open > *, #stats.is-open, .msg, .more__pop { transform: none !important; }
}

/* ═══════════════ r45 (2026-10-26) 화면 전환 · 마우스 반응 · 저장 알림 · 불러오는 동안 뼈대 ═══════════════ */
/* 화면 전환: 메뉴를 바꾸면 새 화면이 6px 아래에서 0.22초에 올라오며 나타남 */
main > section[id^="p-"]:not([hidden]) { transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { main > section[id^="p-"]:not([hidden]) { opacity: 0; transform: translateY(6px); } }

/* 마우스 반응(마우스 쓰는 기기만 — 휴대폰 터치에는 적용 안 함) */
@media (hover: hover) and (pointer: fine) {
  .today__card, .kpi, .mkpi__card, .st-kpis > *, .stats-toggle { transition: background-color 150ms ease, box-shadow 200ms ease, transform 200ms var(--ease-out); }
  .today__card:hover, .stats-toggle:hover { transform: translateY(-2px); background: var(--surface); box-shadow: 0 8px 20px rgba(25, 31, 40, .07); }
  .tbl--leads tbody tr.is-clickable:hover { background: #f4f7fb; }
  .tbl--leads tbody tr.is-clickable:hover .c-name { color: var(--primary) !important; }
  .tbl--leads tbody tr:hover .row-btn { background: var(--primary-soft); color: var(--primary); }
  .tbl--leads tbody tr.row-resv:hover { background: #e2edff; } .tbl--leads tbody tr.row-plan:hover { background: #ffecd4; } .tbl--leads tbody tr.row-done:hover { background: #ffe3e5; }
  .btn:not(.btn--ghost):not(.alt):not(:disabled):hover { box-shadow: 0 4px 12px rgba(18, 52, 94, .22); }
  .status-tabs button:not([aria-selected="true"]):hover, .chip-toggle:not([aria-pressed="true"]):hover { background: var(--gray-100); color: var(--text); }
  .top__tabs button:not([aria-selected="true"]):hover::before { background: var(--text-2); }
  .dayitem { transition: background-color 150ms ease, transform 200ms var(--ease-out); }
  .dayitem:hover { transform: translateX(2px); }
  .note-item { transition: background-color 150ms ease; }
}

/* 저장 완료 알림(토스트): 화면 아래 가운데 · 진한 회색 · 아래에서 올라옴 0.25초 · 사라질 땐 0.2초 */
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: min(92vw, 440px); padding: 13px 18px 13px 14px; border-radius: 14px; background: rgba(25, 31, 40, .94); color: #fff; font-size: var(--fs-14); font-weight: 600; line-height: 1.4; box-shadow: 0 12px 32px rgba(0, 0, 0, .2); pointer-events: auto;
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style { .toast { opacity: 0; transform: translateY(16px) scale(.98); } }
.toast.is-out { opacity: 0; transform: translateY(8px); transition-duration: 200ms; }
.toast__ic { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--success-500) 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 14px; }
.toast--err .toast__ic { background-color: var(--danger-500); }
@media (max-width: 767px) { .toasts { bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100vw - 32px); } .toast { width: 100%; max-width: none; } }

/* 불러오는 동안 뼈대: 회색 자리 위로 빛이 천천히 지나감(1.2초) */
.tbl--leads tr.skel td { height: 52px; padding-top: 0; padding-bottom: 0; }
.tbl--leads tr.skel td { display: table-cell; }
.tbl--leads tr.skel td > .sk { display: inline-block; height: 12px; margin-right: 28px; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, var(--gray-50) 25%, var(--gray-100) 50%, var(--gray-50) 75%) 0 0 / 300% 100%; animation: sk-shine 1.2s linear infinite; }
.sk--a { width: 64px; } .sk--b { width: 72px; } .sk--c { width: 120px; } .sk--d { width: 30%; }
@keyframes sk-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (max-width: 767px) {
  .tbl--leads tbody tr.skel { display: block; padding: 16px var(--card-pad); }
  .tbl--leads tr.skel td { display: grid !important; gap: 8px; height: auto; padding: 0 !important; }
  .tbl--leads tr.skel td > .sk { margin: 0; } .sk--a { width: 40%; } .sk--b { width: 60%; } .sk--c { width: 35%; } .sk--d { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  main > section[id^="p-"]:not([hidden]) { transform: none !important; }
  .today__card:hover, .stats-toggle:hover, .dayitem:hover { transform: none; }
  .toast { transform: none !important; }
  .tbl--leads tr.skel td > .sk { animation: none; }
}
@media (max-width: 767px) { .tbl--leads tr.skel td { width: 100%; } }
dialog > .toasts { position: fixed; }
@media (max-width: 767px) { dialog > .toasts { bottom: calc(88px + env(safe-area-inset-bottom)); } }   /* 휴대폰 창 안에서는 아래 버튼 줄 위에 */

/* ═══════════════ r46 (2026-10-26) 설명 → 제목 옆 (?) 말풍선 ═══════════════ */
.help-ttl { display: inline-flex; align-items: center; gap: 6px; }
.help-ttl > b { display: inline; }
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; min-height: 0; margin: 0 0 0 6px; padding: 0;
  border: 0; border-radius: 50%; background: var(--gray-200, #e5e8eb); color: var(--gray-600, #4e5968); font: 700 11px/1 inherit; cursor: help; vertical-align: 2px;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.help-ttl > .help-btn { margin-left: 0; vertical-align: 0; }
.help-btn:hover, .help-btn[aria-expanded="true"] { background: var(--navy-900, #12345e); color: #fff; }
.help-btn:active { transform: scale(.92); }
.help-btn:focus-visible { outline: 2px solid var(--navy-900, #12345e); outline-offset: 2px; }
.help-btn::before { content: ''; position: absolute; inset: -10px; }   /* 누르는 영역 넓힘(휴대폰) */
.help-btn { position: relative; }
.help-tip { position: fixed; z-index: 1000; left: 0; top: 0; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 12px 14px;
  border-radius: 12px; background: #333d4b; color: #fff; font-size: 13px; line-height: 1.6; letter-spacing: -0.01em; word-break: keep-all;
  box-shadow: 0 8px 24px rgba(0, 25, 54, .18); pointer-events: none; opacity: 0; visibility: hidden;
  transform: translateY(4px) scale(.96); transform-origin: var(--ax, 22px) top;
  transition: opacity 160ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms; }
.help-tip[data-side="top"] { transform: translateY(-4px) scale(.96); transform-origin: var(--ax, 22px) bottom; }
.help-tip.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 160ms ease, transform 220ms var(--ease-out), visibility 0s; }
.help-tip.is-instant { transition-duration: 0s; }
.help-tip p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.help-tip p + p { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); }
.help-tip b { color: #fff; font-weight: 700; display: inline; }
.help-tip::after { content: ''; position: absolute; left: calc(var(--ax, 22px) - 6px); top: -5px; width: 12px; height: 12px; background: inherit; border-radius: 2px; transform: rotate(45deg); }
.help-tip[data-side="top"]::after { top: auto; bottom: -5px; }
@media (prefers-reduced-motion: reduce) { .help-tip, .help-tip[data-side="top"] { transform: none; } .help-btn:active { transform: none; } }

/* r47 (2026-10-26) 로고 = 처음 화면 링크 */
a.top__brand { color: inherit; text-decoration: none; border-radius: 10px; -webkit-tap-highlight-color: transparent; transition: opacity 150ms ease, transform 160ms var(--ease-out); }
@media (hover: hover) { a.top__brand:hover { opacity: .78; } }
a.top__brand:active { transform: scale(.97); }
a.top__brand:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 4px; }

/* ═══════════════ r48 (2026-10-26) 처리상태 배지 색 줄이기 — 줄 배경색(예약 파랑·방문예정 주황·방문완료 빨강)·예약 칩은 그대로 ═══════════════
   상담요망 = 연한 남색(할 일) · 부재중·다시일정체크·미예약·보류 = 연회색 · 상담완료·방문예정·방문완료 = 흐린 글씨. 월간 통계 막대 색은 그대로 */
.tag[data-status] { background: var(--gray-100); color: var(--text); box-shadow: none; font-weight: 600; }
.tag[data-status="상담요망"] { background: #e8eef7; color: var(--navy-900); font-weight: 700; }
.tag[data-status="상담완료"], .tag[data-status="방문예정"], .tag[data-status="방문완료"] { background: transparent; color: var(--text-3); font-weight: 500; }
.tbl--leads tr.row-plan .tag[data-status], .tbl--leads tr.row-done .tag[data-status], .tbl--leads tr.row-resv .tag[data-status="상담완료"] { color: var(--text-2); }

/* ═══════════════ r50 (2026-10-26) PC 기본 화면 크기 90% — 크롬에서 Ctrl+휠로 90% 한 것과 같게(휴대폰·태블릿은 그대로) ═══════════════ */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) { html { zoom: .9; } }

/* ═══════════════ r51 (2026-10-26) 설정 화면 · 메뉴 이름(공지사항·계정 관리·설정) ═══════════════ */
.top__tabs button[data-tab="settings"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
.set .page-head { margin-bottom: 0; }
.set-dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px var(--s5); margin: 0 0 var(--s2); font-size: var(--fs-14); }
.set-dl dt { color: var(--text-3); font-weight: 500; }
.set-dl dd { margin: 0; color: var(--text); font-weight: 600; word-break: break-all; }
.set-cur { margin-left: 8px; vertical-align: 1px; background: #e8eef7; color: var(--navy-900); }
.set-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s3); }
.set-link { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; border: 0; border-radius: var(--r-lg); background: var(--gray-50); font: inherit; text-align: left; cursor: pointer;
  transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.set-link b { color: var(--text); font-size: var(--fs-15); font-weight: 700; }
.set-link span { color: var(--text-3); font-size: var(--fs-13); }
@media (hover: hover) { .set-link:hover { background: var(--gray-100); } }
.set-link:active { transform: scale(.98); }
.set-link:focus-visible { outline: 2px solid var(--navy-900); outline-offset: 2px; }
#set-app-state { font-size: var(--fs-15); }

/* ═══════════════ r52 (2026-10-26) 화면 캡처(Print Screen) 경고 창 ═══════════════ */
.cap-dlg { width: min(380px, 92vw); }
.cap-dlg__body { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px 24px; text-align: center; }
.cap-dlg__ic { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 50%; background: #fdecec; color: #d22030; font-size: 24px; font-weight: 800; }
.cap-dlg h2 { margin: 0; font-size: var(--fs-18, 18px); font-weight: 700; color: var(--text); }
.cap-dlg p { margin: 0; font-size: var(--fs-14); line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.cap-dlg p.muted { color: var(--text-3); font-size: var(--fs-13); }
.cap-dlg .btn { margin-top: 12px; }

/* ═══ r54 (2026-10-26) 오늘 DB수·오늘 예약 · 이번 달 DB수 · 월 일별 표 · 예약 상태 '진료' ═══ */
/* PC 핵심 지표: 남색 카드 안에 [오늘 DB수 | 오늘 예약] */
.kpi.kpi--pair { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; align-content: stretch; column-gap: 0; }
.kpi--pair .kpi__half { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s1); min-width: 0; }
.kpi--pair .kpi__half + .kpi__half { padding-left: var(--s5); border-left: 1px solid rgba(201, 210, 255, .22); }
.kpi--pair .kpi__row { display: flex; align-items: baseline; gap: 6px; }
.kpi--pair .kpi__unit { padding-bottom: 0; }
/* 모바일 핵심 지표 */
.mkpi__pair { flex-direction: row !important; align-items: stretch !important; gap: 0 !important; }
.mkpi__half { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; }
.mkpi__half + .mkpi__half { padding-left: 16px; margin-left: 16px; border-left: 1px solid var(--gray-100); }
/* PC·태블릿(768px 이상)에서도 상담 목록 맨 위에 [오늘 DB수 | 오늘 예약] · 이번 달 DB수 */
@media (min-width: 768px) {
  #p-list > #m-kpi:not([hidden]) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s4); margin-bottom: var(--s4); }
  #m-kpi .mkpi__card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 22px; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); }
  #m-kpi .mkpi__label { font-size: var(--fs-13); font-weight: 600; color: var(--text-3); }
  #m-kpi .mkpi__num { display: flex; align-items: baseline; gap: 3px; }
  #m-kpi .mkpi__num b { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
  #m-kpi .mkpi__card.is-primary .mkpi__num b { color: var(--primary); }
  #m-kpi .mkpi__num span { font-size: var(--fs-13); color: var(--text-3); }
}
/* 월 일별 표 (오늘 할 일 자리) */
#today.today--daily { display: block; margin-bottom: var(--s4); padding: 12px 0 4px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.dly__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 var(--s4) 10px; }
.dly__title { font-size: var(--fs-15, 15px); font-weight: 700; color: var(--text); }
.dly__nav { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: 18px; line-height: 1; color: var(--text-2); cursor: pointer; }
.dly__nav:disabled { opacity: .35; cursor: default; }
.dly__nav:not(:disabled):hover { background: var(--gray-25); }
.dly__now { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: inherit; font-size: var(--fs-12); color: var(--text-2); cursor: pointer; }
.dly__sum { margin-left: auto; color: var(--text-3); font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.dly__wrap { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.dly { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: var(--fs-13); font-variant-numeric: tabular-nums; }
.dly th, .dly td { padding: 7px 0; min-width: 40px; text-align: center; white-space: nowrap; border-top: 1px solid var(--gray-100); }
.dly thead th { border-top: 0; font-weight: 600; color: var(--text-3); }
.dly thead th button { padding: 2px 6px; border: 0; border-radius: 6px; background: none; font: inherit; color: inherit; cursor: pointer; }
.dly thead th button:hover { background: var(--gray-100); }
.dly th.is-sun { color: var(--danger-700); } .dly th.is-sat { color: var(--info-700); }
.dly .dly__k { position: sticky; left: 0; z-index: 1; min-width: 52px; padding: 7px 10px 7px var(--s4); background: var(--surface); text-align: left; font-weight: 700; color: var(--text-2); box-shadow: 1px 0 0 var(--gray-100); }
.dly .dly__t { position: sticky; right: 0; z-index: 1; min-width: 52px; padding-right: var(--s4); background: var(--gray-25); font-weight: 700; color: var(--text); box-shadow: -1px 0 0 var(--gray-100); }
.dly tbody td { color: var(--text); font-weight: 600; }
.dly tbody td.is-zero { color: var(--gray-300); font-weight: 400; }
.dly tr[data-k="db"] td:not(.is-zero) { color: var(--primary); font-weight: 800; }
/* r55: 고른 날·오늘 칸은 테두리 선 없이 옅은 남색 배경만. 날짜 단추는 다른 단추처럼 남색 알약 모양 + 흰 글씨 */
.dly .is-today, .dly .is-pick { background: var(--primary-soft); }
.dly.has-pick .is-today:not(.is-pick) { background: none; }
.dly thead th button { min-width: 38px; height: 26px; padding: 0 8px; border-radius: 999px; transition: background-color .15s ease, color .15s ease; }
.dly thead th.is-today button, .dly thead th.is-pick button { background: var(--primary); color: #fff; font-weight: 700; }
.dly.has-pick thead th.is-today:not(.is-pick) button { background: none; color: var(--primary); }
.dly thead th.is-today button:hover, .dly thead th.is-pick button:hover { background: var(--primary-hover, var(--primary)); }
@media (max-width: 767px) {
  #today.today--daily { padding: 10px 0 2px; border-radius: 12px; }
  .dly__head { padding: 0 14px 8px; }
  .dly__sum { flex-basis: 100%; margin-left: 0; }
  .dly th, .dly td { min-width: 36px; padding: 8px 0; }
  .dly .dly__k { padding-left: 14px; }
}
/* 예약 상태: 진료(내원 후 진료까지) — 진한 초록 */
[data-st="진료"] { --st-bg: var(--success-100, #d3f2df); --st-fg: var(--success-700); --st-dot: var(--success-700); }

/* r55 모바일 상담 목록: 상담 내용을 지역 아래 줄로(최대 2줄) */
@media (max-width: 767px) {
  .tbl--leads td.c-mmeta { white-space: normal; text-overflow: clip; }
  .c-mmeta > span:first-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .c-mmeta__memo { display: -webkit-box; margin-top: 2px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-2); white-space: normal; word-break: break-all; }
  .c-mmeta__memo::before { content: none; }
}
/* r56 상담 목록 접수 날짜: 남색 둥근 버튼 모양 + 흰 글씨(시간은 옆·아래 그대로) */
.tbl--leads td:nth-child(1) .c-date__d { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; line-height: 1.4; }
.tbl--leads td:nth-child(1) .c-date__t { margin-top: 3px; }
@media (max-width: 767px) { .tbl--leads td:nth-child(1) .c-date__d { color: #fff; font-size: var(--fs-12); } .tbl--leads td:nth-child(1) .c-date__t { margin-top: 0; } }
@media (min-width: 768px) { .tbl--leads td:nth-child(1) .c-date__dt { display: inline-flex; flex-direction: column; align-items: center; } }
/* r57 일별 표 날짜 선택 인터랙션: 열 강조가 부드럽게 옮겨가고, 고른 날짜 버튼이 살짝 튀고, 아래 목록은 새 결과가 아래에서 올라옴 */
.dly th, .dly td { transition: background-color .22s cubic-bezier(.23, 1, .32, 1); }
.dly thead th button { transition: background-color .2s cubic-bezier(.23, 1, .32, 1), color .2s ease, transform .16s ease-out; }
.dly thead th button:active { transform: scale(.94); }
.dly thead th button.is-pop { animation: dlyPop .32s cubic-bezier(.23, 1, .32, 1); }
@keyframes dlyPop { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
#tbody.is-fx-in > tr { animation: dlyRowIn .32s cubic-bezier(.23, 1, .32, 1) both; }
#tbody.is-fx-in > tr:nth-child(2) { animation-delay: .03s; } #tbody.is-fx-in > tr:nth-child(3) { animation-delay: .06s; }
#tbody.is-fx-in > tr:nth-child(4) { animation-delay: .09s; } #tbody.is-fx-in > tr:nth-child(5) { animation-delay: .12s; }
#tbody.is-fx-in > tr:nth-child(n+6) { animation-delay: .15s; }
@keyframes dlyRowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .dly th, .dly td, .dly thead th button { transition: none; }
  .dly thead th button.is-pop, #tbody.is-fx-in > tr { animation: none; }
}
