/* =============================================
   울타리와공간 내담자관리 — Admin CSS
   홈페이지 토큰 기반 (2A6B67 teal 계열)
   ============================================= */

:root {
  --p:    #2F6B4F;
  --pd:   #1D4531;
  --pm:   #3D8480;
  --pl:   #E8F3EC;
  --pl2:  #C8E4E2;
  --acc:  #C9A24A;
  --acc-l:#FAF0EA;
  --tg:   #7DCFCA;

  --txt:     #1A2B2A;
  --mut:     #667070;
  --fnt:     #9AABAB;
  --bg:      #F3F7F7;
  --bg-w:    #FFFFFF;
  --bg-dark: #162422;
  --brd:     #DDE8E8;

  --ok:     #1A7F5A;  --ok-bg:   #D4F0E4;
  --warn:   #9B4A0A;  --warn-bg: #FDECD8;
  --err:    #9B1A1A;  --err-bg:  #FDE8E8;
  --inf:    #1A4F7A;  --inf-bg:  #E0EEF6;
  --ai:     #5B21B6;  --ai-bg:   #EDE9FE;

  --sh:    0 1px 4px rgba(42,107,103,.07), 0 1px 2px rgba(42,107,103,.05);
  --sh-lg: 0 6px 24px rgba(42,107,103,.13);
  --radius:    10px;
  --radius-sm: 6px;
  --hdr:       52px;

  --font-serif: 'Noto Serif KR', serif;
  --font-sans:  'Noto Sans KR', sans-serif;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-sans); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--brd); border-radius: 3px; }

/* ── Header ─────────────────────────────────── */
#hdr {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--hdr);
  background: #1D4531;
  display: flex; align-items: center;
  padding: 0 20px; gap: 14px;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 2px 12px rgba(0,0,0,.25);
}
.hdr-logo {
  display: flex; flex-direction: column;
  line-height: 1.2; flex-shrink: 0;
  padding-right: 14px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.hdr-logo-ko {
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 700;
  color: #fff; letter-spacing: -.02em; white-space: nowrap;
}
.hdr-logo-sub {
  font-size: 9px; color: rgba(255,255,255,.35); letter-spacing: .05em;
}
.hdr-burger {
  display: none;
  background: none; border: none; color: #fff;
  font-size: 18px; line-height: 1; padding: 4px 6px; flex-shrink: 0;
}
.hdr-nav {
  display: flex; align-items: center; gap: 2px; flex: 1;
  overflow-x: auto; flex-wrap: nowrap;
  scrollbar-width: none;
}
.hdr-nav::-webkit-scrollbar { display: none; }
.hdr-nav a {
  color: rgba(255,255,255,.58);
  font-size: 12.5px; font-weight: 500;
  padding: 5px 10px; border-radius: var(--radius-sm);
  transition: all .15s; white-space: nowrap;
}
.hdr-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.hdr-nav a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; box-shadow: inset 0 -2px 0 #2F6B4F; }
.hdr-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.hdr-user { font-size: 12px; color: rgba(255,255,255,.45); }
.hdr-user strong { color: rgba(255,255,255,.82); font-weight: 600; }
.hdr-logout {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 100px;
  transition: all .15s;
}
.hdr-logout:hover { background: rgba(255,255,255,.14); color: #fff; }
.hdr-gear-btn {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: 13px; line-height: 1;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0;
}
.hdr-gear-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.hdr-avatar {
  display: none;
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.14); color: #fff;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-left: auto;
}
.hdr-link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: 11.5px; font-weight: 500;
  padding: 4px 10px; border-radius: 100px;
  transition: all .15s; white-space: nowrap; text-decoration: none;
}
.hdr-link-btn:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── 모바일 슬라이드 패널 ───────────────────────── */
.hdr-mobile-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 290; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.hdr-mobile-backdrop.open { opacity: 1; pointer-events: auto; }
.hdr-mobile-panel {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  width: 260px; max-width: 82vw;
  background: #1D4531;
  display: flex; flex-direction: column;
  padding: 16px 14px; gap: 2px;
  transform: translateX(-100%); transition: transform .22s ease;
  overflow-y: auto;
}
.hdr-mobile-panel.open { transform: translateX(0); }
.hdr-mobile-panel a, .hdr-mobile-panel button {
  color: rgba(255,255,255,.72); font-size: 13.5px; font-weight: 500;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: none; border: none; text-align: left; width: 100%;
}
.hdr-mobile-panel a:hover, .hdr-mobile-panel button:hover { background: rgba(255,255,255,.1); color: #fff; }
.hdr-mobile-panel a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
.hdr-mobile-user { padding: 6px 12px 12px; color: rgba(255,255,255,.85); font-size: 13.5px; }
.hdr-mobile-divider { height: 1px; background: rgba(255,255,255,.12); margin: 8px 4px; }
.hdr-mobile-logout { color: rgba(255,255,255,.55); }

/* ── Main ────────────────────────────────────── */
#app {
  padding-top: var(--hdr);
  min-height: 100vh;
}
.page-inner { padding: 22px 24px; max-width: 1400px; margin: 0 auto; }
.loading-full {
  display: flex; align-items: center; justify-content: center;
  height: calc(100vh - var(--hdr)); color: var(--mut); font-size: 14px;
}

/* ── Page Header ────────────────────────────── */
.ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.pt { font-family: var(--font-serif); font-size: 19px; font-weight: 700; color: var(--pd); }
.bc { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--fnt); margin-bottom: 12px; flex-wrap: wrap; }
.bc-link { color: var(--p); cursor: pointer; font-weight: 600; }
.bc-link:hover { text-decoration: underline; }

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--bg-w); border: 1px solid var(--brd);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--sh);
}
.card + .card { margin-top: 12px; }
.card-title { font-size: 13px; font-weight: 700; color: var(--pd); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }

/* ── Stat Grid ──────────────────────────────── */
.sg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.sc {
  background: var(--bg-w); border: 1px solid var(--brd);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--sh);
}
.sc-lbl { font-size: 10px; color: var(--mut); letter-spacing: .5px; text-transform: uppercase; margin-bottom: 6px; }
.sc-val { font-size: 24px; font-weight: 700; color: var(--p); letter-spacing: -1px; line-height: 1; }
.sc-sub { font-size: 11px; color: var(--fnt); margin-top: 3px; }

/* ── Tables ─────────────────────────────────── */
.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  background: #F3F7F7; text-align: left;
  padding: 8px 12px; font-weight: 700; font-size: 11px;
  color: var(--mut); border-bottom: 1.5px solid var(--brd); white-space: nowrap;
}
thead th.sort-asc::after  { content: ' ↑'; }
thead th.sort-desc::after { content: ' ↓'; }
thead th.sortable { cursor: pointer; }
thead th.sortable:hover { color: var(--p); }
td { padding: 8px 12px; border-bottom: 1px solid #EBF2F7; vertical-align: middle; }
tr:hover td { background: #F6FAFA; }
tr:last-child td { border-bottom: none; }
.tbl-link { color: var(--p); cursor: pointer; font-weight: 600; }
.tbl-link:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-sm); border: none;
  font-size: 13px; font-family: var(--font-sans); font-weight: 600;
  transition: all .15s; white-space: nowrap; cursor: pointer; line-height: 1.4;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.bp  { background: var(--p);   color: #fff; }
.bp:hover:not(:disabled)  { background: var(--pd); }
.bs  { background: #fff;  color: var(--txt); border: 1.5px solid var(--brd); }
.bs:hover:not(:disabled)  { background: var(--bg); }
.ba  { background: var(--acc); color: #fff; }
.ba:hover:not(:disabled)  { background: #b5714b; }
.bai { background: linear-gradient(135deg, #1A7F5A, #0F5E42); color: #fff; }
.bai:hover:not(:disabled) { filter: brightness(1.08); }
.bd  { background: var(--err-bg); color: var(--err); border: 1px solid #F5C6C6; }
.bd:hover:not(:disabled)  { background: #FACDCD; }
.bop { background: transparent; color: var(--p); border: 1.5px solid var(--pl2); }
.bop:hover:not(:disabled) { background: var(--pl); }
.sm { padding: 4px 9px;  font-size: 11.5px; border-radius: 5px; }
.xs { padding: 2px 7px;  font-size: 10.5px; border-radius: 4px; }
.btn-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--brd);
}

/* ── Forms ──────────────────────────────────── */
.fi { display: flex; flex-direction: column; gap: 4px; }
.fi.full { grid-column: 1 / -1; }
label { font-size: 10px; font-weight: 700; color: var(--mut); letter-spacing: .4px; text-transform: uppercase; }
input, select, textarea {
  border: 1.5px solid var(--brd); border-radius: var(--radius-sm);
  padding: 7px 10px; font-size: 13px; font-family: var(--font-sans);
  color: var(--txt); width: 100%; outline: none; background: #fff;
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--p); box-shadow: 0 0 0 3px rgba(42,107,103,.1);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.65; }
.fg  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.fg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-sec {
  grid-column: 1 / -1; margin-top: 6px; padding-top: 11px;
  border-top: 1px solid var(--brd);
  font-size: 10.5px; font-weight: 700; color: var(--mut); letter-spacing: .4px; text-transform: uppercase;
}
.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.search-bar input { max-width: 260px; }

/* ── Badges ─────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.b진행중   { background: var(--ok-bg);   color: var(--ok); }
.b종결     { background: #E8ECF0;        color: #4A5568; }
.b조기종결 { background: var(--err-bg);  color: var(--err); }
.b연장     { background: var(--inf-bg);  color: var(--inf); }
.b중단     { background: var(--warn-bg); color: var(--warn); }
.b단회기,.b단회 { background: var(--ai-bg); color: var(--ai); }
.b접수면담 { background: var(--pl);      color: var(--p); }
.b문의,.b미진행,.b취소 { background: #F0F0F0; color: #666; }
.bdef      { background: #F0F0F0;        color: #666; }
/* Pay */
.bpay-완료     { background: var(--ok-bg);   color: var(--ok); }
.bpay-미납     { background: var(--err-bg);  color: var(--err); }
.bpay-예치금차감 { background: var(--inf-bg); color: var(--inf); }
.bpay-선납     { background: var(--ai-bg);   color: var(--ai); }
.bpay-면제     { background: #E8ECF0;        color: #4A5568; }
.bpay-노쇼차감 { background: #FFE8E0;        color: #B83A00; }
.bpay-당일취소차감 { background: #FFF0E0;    color: #A05500; }

/* ── Section Chips ──────────────────────────── */
.sec-chip {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 20px;
  font-size: 10px; font-weight: 700; margin-right: 3px;
}
.sec-y { background: #E1F5EE; color: #085041; }
.sec-n { background: #F1EFE8; color: #888780; }

/* ── Info Boxes ─────────────────────────────── */
.info-box  { background: var(--inf-bg);  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--inf);  line-height: 1.7; }
.warn-box  { background: var(--warn-bg); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--warn); line-height: 1.7; }
.err-box   { background: var(--err-bg);  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--err);  line-height: 1.7; }
.ok-box    { background: var(--ok-bg);   border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--ok);   line-height: 1.7; }
.ai-box    { background: var(--ai-bg);   border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--ai);   line-height: 1.7; }

/* ── Empty / Loading ────────────────────────── */
.empty { text-align: center; padding: 36px 20px; color: var(--fnt); font-size: 13px; line-height: 1.9; }
.loading { text-align: center; padding: 28px; color: var(--mut); font-size: 13px; }

/* ── Markdown ────────────────────────────────── */
.mdp {
  background: #F6FAFA; border: 1px solid #C8DCEA;
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 13px; line-height: 1.8; color: var(--txt); overflow-wrap: break-word;
}
.md-h1 { font-size: 16px; font-weight: 700; color: var(--p); margin: 14px 0 6px; }
.md-h2 { font-size: 14px; font-weight: 700; color: var(--p); margin: 12px 0 5px; padding-bottom: 3px; border-bottom: 1px solid var(--brd); }
.md-h3 { font-size: 13px; font-weight: 700; color: var(--p); margin: 10px 0 4px; }
.md-h4, .md-h5, .md-h6 { font-size: 12px; font-weight: 700; color: var(--mut); margin: 8px 0 3px; }
.md-p  { margin: 5px 0; line-height: 1.8; }
.md-hr { border: none; border-top: 1px solid var(--brd); margin: 9px 0; }
.md-bq { border-left: 3px solid var(--p); margin: 6px 0; padding: 3px 10px; background: var(--pl); color: var(--mut); border-radius: 0 5px 5px 0; font-size: 12.5px; }
.md-ul { margin: 5px 0; padding-left: 16px; }
.md-ul li { margin: 2px 0; }
.md-pre { background: var(--bg-dark); color: #C8E6F0; border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 12px; line-height: 1.6; margin: 7px 0; }
.md-inline { background: var(--inf-bg); color: var(--inf); border-radius: 3px; padding: 1px 4px; font-size: 12px; }

/* ── Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.52);
  z-index: 500; display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.modal-box {
  background: var(--bg-w); border-radius: 12px; padding: 22px;
  width: 100%; max-width: 820px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.modal-sm { max-width: 480px; }
.modal-lg { max-width: 1100px; }
.modal-title {
  font-size: 15px; font-weight: 700; color: var(--pd);
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--fnt); padding: 2px 5px; border-radius: 4px;
}
.modal-close:hover { background: var(--bg); color: var(--txt); }
.modal-body { max-height: 68vh; overflow-y: auto; }
.modal-footer {
  display: flex; gap: 8px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--brd); flex-wrap: wrap;
}
/* Form modal */
.modal-form { padding: 0; }
.modal-form-hdr {
  position: sticky; top: 0; background: var(--bg-w); z-index: 5;
  padding: 14px 22px; border-bottom: 1px solid var(--brd);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.modal-form-hdr .modal-title { margin-bottom: 0; }
.modal-form-actions { display: flex; gap: 6px; }
.modal-form-body { padding: 18px 22px; max-height: 75vh; overflow-y: auto; }
.modal-form-footer { padding: 12px 22px; border-top: 1px solid var(--brd); display: flex; gap: 8px; }

/* ── Toast ───────────────────────────────────── */
#toastRoot {
  position: fixed; bottom: 22px; right: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 7px; pointer-events: none;
}
.toast {
  background: var(--pd); color: #fff;
  padding: 9px 15px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  opacity: 0; transform: translateY(6px);
  transition: opacity .22s, transform .22s;
  pointer-events: none; max-width: 300px; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok   { background: var(--ok); }
.toast-err  { background: var(--err); }
.toast-warn { background: var(--warn); }
.toast-ai   { background: var(--ai); }

/* ── Avatars ─────────────────────────────────── */
.av {
  border-radius: 50%; background: var(--pl);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; color: var(--p);
  flex-shrink: 0;
}
.av-sm { width: 32px; height: 32px; font-size: 12px; }
.av-md { width: 40px; height: 40px; font-size: 15px; }
.av-lg { width: 52px; height: 52px; font-size: 20px; }

/* ── Dashboard ───────────────────────────────── */
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-sec-title {
  font-size: 10.5px; font-weight: 700; color: var(--mut);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}
.ac-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  cursor: pointer; transition: background .12s; border-radius: var(--radius-sm); flex-wrap: wrap;
}
.ac-row:hover { background: #F3F8F8; }
.ac-name   { font-size: 13.5px; font-weight: 700; color: var(--p); white-space: nowrap; }
.ac-meta   { font-size: 11.5px; color: var(--mut); white-space: nowrap; }
.ac-sep    { color: var(--brd); }
.ac-recent { font-size: 11.5px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; max-width: 260px; white-space: nowrap; }
.ac-next   { font-size: 11.5px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.ac-btn    { margin-left: auto; flex-shrink: 0; }

/* ── Client List ─────────────────────────────── */
.client-num { font-size: 11px; color: var(--fnt); font-weight: 600; }
.client-alias { font-size: 11px; color: var(--mut); }

/* ── Profile grid ───────────────────────────── */
.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px; }
.pf { background: #F6FAFA; border-radius: 5px; padding: 7px 10px; }
.pf .pl { font-size: 9.5px; color: var(--fnt); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.pf .pv { font-size: 13px; font-weight: 600; color: var(--txt); }

/* ── Workspace ───────────────────────────────── */
.ws-wrap { max-width: 1700px; margin: 0 auto; padding: 18px 20px; }
.ws-bc   { display: flex; align-items: center; gap: 5px; margin-bottom: 12px; font-size: 11.5px; color: var(--fnt); flex-wrap: wrap; }
.ws-bc-link { color: var(--p); cursor: pointer; font-weight: 600; }
.ws-bc-link:hover { text-decoration: underline; }
.ws-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.3fr) minmax(420px, 1.55fr);
  gap: 12px; align-items: start;
}
.ws-col {
  background: var(--bg-w); border: 1px solid var(--brd);
  border-radius: var(--radius); box-shadow: var(--sh);
  overflow: hidden; display: flex; flex-direction: column;
}
.ws-col-head {
  background: #F3F7F7; padding: 9px 13px;
  border-bottom: 1px solid var(--brd);
  display: flex; align-items: center; justify-content: space-between;
  gap: 7px; flex-wrap: wrap; position: sticky; top: var(--hdr); z-index: 10;
}
.ws-col-title { font-size: 12.5px; font-weight: 700; color: var(--pd); display: flex; align-items: center; gap: 5px; }
.ws-col-body  { padding: 12px; overflow-y: auto; max-height: calc(100vh - 130px); }
.ws-empty     { padding: 28px 16px; text-align: center; color: var(--fnt); font-size: 12px; line-height: 1.9; }

/* Person / consult / session item in WS */
.ws-item {
  background: #fff; border: 1px solid var(--brd); border-radius: 7px;
  padding: 7px 10px; cursor: pointer; transition: border-color .12s, background .12s;
  margin-bottom: 5px;
}
.ws-item:last-child { margin-bottom: 0; }
.ws-item:hover  { border-color: var(--pm); background: #F8FEFE; }
.ws-item.active { background: var(--pl); border-color: var(--p); }
.ws-item-top  { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 2px; }
.ws-item-meta { font-size: 10.5px; color: var(--mut); line-height: 1.4; }

/* WS field grid */
.ws-pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 8px; }
.ws-pf { background: #F6FAFA; border-radius: 5px; padding: 5px 8px; }
.ws-pf .lbl { font-size: 9.5px; color: var(--fnt); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 1px; }
.ws-pf .val { font-size: 11.5px; font-weight: 600; color: var(--txt); word-break: break-all; line-height: 1.3; }
.ws-sec-title { font-size: 10px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .4px; margin: 12px 0 6px; }

/* Inline box in WS */
.ws-inline { background: #fff; border: 1px solid var(--brd); border-radius: 7px; padding: 8px 11px; margin-bottom: 7px; }
.ws-inline-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; gap: 5px; }
.ws-inline-title { font-size: 10.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .3px; }
.ws-inline-mdp   { font-size: 12px; line-height: 1.65; color: var(--txt); }
.ws-inline-empty { font-size: 11px; color: var(--fnt); }
.ws-edit-btn {
  background: #fff; border: 1px solid var(--brd); width: 22px; height: 22px;
  border-radius: 4px; font-size: 11px; color: var(--mut); padding: 0; line-height: 1; flex-shrink: 0;
}
.ws-edit-btn:hover { background: #FFFCE8; border-color: var(--p); color: var(--p); }

/* Section blocks (right WS column) */
.ws-sec-block { border-top: 1px solid var(--brd); padding: 11px 12px; }
.ws-sec-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.ws-sec-label { font-size: 12px; font-weight: 700; color: var(--txt); display: flex; align-items: center; gap: 5px; }
.ws-sec-icon { width: 20px; height: 20px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.icon-transcript { background: #E1F5EE; color: #085041; }
.icon-content    { background: var(--inf-bg); color: var(--inf); }
.icon-analysis   { background: var(--ai-bg); color: var(--ai); }
.icon-note       { background: #FAEEDA; color: #633806; }
.icon-audio      { background: #FAECE7; color: #712B13; }

/* Dropdown */
.dropzone {
  border: 2px dashed var(--brd); border-radius: 7px;
  padding: 14px; text-align: center; cursor: pointer;
  transition: all .15s; font-size: 12px; color: var(--mut);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--p); background: var(--pl); }

/* ── Login page ─────────────────────────────── */
.login-body {
  background: var(--pd);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  background: #fff; border-radius: 16px; padding: 40px;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo-ko { display: block; font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--pd); margin-bottom: 5px; }
.login-logo-sub { display: block; font-size: 10.5px; color: var(--mut); letter-spacing: .05em; }
.login-divider { height: 1px; background: var(--brd); margin: 0 0 24px; }
.login-fi + .login-fi { margin-top: 12px; }
.login-fi label { display: block; font-size: 10px; font-weight: 700; color: var(--mut); letter-spacing: .4px; text-transform: uppercase; margin-bottom: 5px; }
.login-fi input { font-size: 14px; padding: 9px 12px; border-radius: 8px; }
.login-submit { width: 100%; margin-top: 18px; padding: 10px; font-size: 14px; border-radius: 8px; justify-content: center; }
.login-err { display: none; margin-top: 12px; padding: 8px 12px; background: var(--err-bg); color: var(--err); border-radius: 6px; font-size: 12.5px; line-height: 1.5; }

/* ── Misc ───────────────────────────────────── */
.cl { color: var(--p); cursor: pointer; font-weight: 600; }
.cl:hover { text-decoration: underline; }
.muted { color: var(--mut); }
.faint { color: var(--fnt); }
.mono  { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.ai-badge { display: inline-flex; align-items: center; gap: 3px; background: var(--ai-bg); color: var(--ai); font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.rc-badge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; background: var(--pl); color: var(--p); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1100px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-col-body { max-height: none; }
  .dash-two { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hdr-burger { display: block; }
  .hdr-nav, .hdr-right { display: none; }
  .hdr-avatar { display: flex; }
  .hdr-logo { border-right: none; padding-right: 0; }
}
@media (max-width: 800px) {
  .sg { grid-template-columns: repeat(2, 1fr); }
  .fg, .fg3, .fg4 { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .page-inner { padding: 16px; }
}

/* ================================================================
   Chat C-2 추가 CSS  —  style.css 맨 끝에 추가하세요
   (기존 스타일과 충돌 없이 독립적으로 동작하도록 작성)
   ================================================================ */

/* ─── 폼 그리드 ─────────────────────────────────────────────── */
.form-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.form-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-sec {
  grid-column: 1 / -1;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted, #667);
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e0e0e0);
}
.form-sec:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.full-col { grid-column: 1 / -1; }
.fi {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fi label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #667);
}
.fi input, .fi select, .fi textarea {
  border: 1.5px solid var(--border, #ddd);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: var(--text, #222);
  transition: border-color .15s;
  width: 100%;
}
.fi input:focus, .fi select:focus, .fi textarea:focus {
  border-color: var(--primary, #2a6b67);
  box-shadow: 0 0 0 3px rgba(42,107,103,.08);
}
.fi textarea { resize: vertical; min-height: 80px; line-height: 1.65; }
.fi textarea[readonly] { background: var(--bg-soft, #f8fafc); color: var(--text-muted, #667); cursor: default; resize: none; }
.other-input { margin-top: 4px !important; }
.req { color: #e53; }
.hint-ok    { font-size: 11px; color: #1a7f5a; font-weight: 600; }
.hint-muted { font-size: 11px; color: #9aa; }

/* ─── 모달 ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 14px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: mIn .18s ease;
}
@keyframes mIn { from { opacity:0; transform:scale(.96) translateY(8px); } }
.modal-sm { width: 420px; }
.modal-lg { width: 720px; }
.modal-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 700; flex: 1; }
.modal-hdr-right { display: flex; gap: 8px; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: #999; padding: 2px 6px;
  border-radius: 5px; margin-left: 4px;
}
.modal-close:hover { background: #f0f0f0; color: #333; }
.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex; gap: 8px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid #eee;
}

/* ─── 삭제 확인 ──────────────────────────────────────────────── */
.danger-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: #991b1b;
  line-height: 1.75;
  margin-bottom: 16px;
}
.danger-box-sub {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.75;
  margin-bottom: 14px;
}
.confirm-prompt {
  font-size: 13.5px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.65;
}
.confirm-input {
  border: 2px solid #e53;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: box-shadow .15s;
}
.confirm-input:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }

/* ─── 버튼 ───────────────────────────────────────────────────── */
.btn          { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-family: inherit; font-weight: 600; transition: all .15s; }
.btn-sm       { padding: 5px 11px; font-size: 12px; }
.btn-primary  { background: var(--primary, #2a6b67); color: #fff; }
.btn-primary:hover { background: var(--primary-dark, #1d4e4b); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost    { background: #fff; color: #555; border: 1.5px solid #ddd; }
.btn-ghost:hover { background: #f8f8f8; }
.btn-danger   { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  background: none; border: 1px solid transparent; padding: 3px 7px;
  border-radius: 5px; cursor: pointer; font-size: 14px; line-height: 1;
  transition: background .12s;
}
.icon-btn:hover { background: #f0f0f0; border-color: #ddd; }
.icon-btn.danger:hover { background: #fef2f2; border-color: #fca5a5; }
.icon-btn.green:hover  { background: #f0fdf4; border-color: #86efac; }
.icon-btn.xs { padding: 2px 5px; font-size: 12px; }

/* ─── 배지 (상태) ────────────────────────────────────────────── */
.sbadge {
  display: inline-block; padding: 2px 8px;
  border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.sbadge.xs { font-size: 10px; padding: 1px 6px; }
.b진행중   { background: #d4f0e4; color: #1a7f5a; }
.b종결     { background: #e8ecf0; color: #4a5568; }
.b조기종결 { background: #fde8e8; color: #9b1a1a; }
.b연장     { background: #e0eef6; color: #1a4f7a; }
.b중단     { background: #fdecd8; color: #9b4a0a; }
.b단회기   { background: #f0ebf8; color: #5b21b6; }
.b문의,.b미진행,.b취소,.b접수면담 { background: #f0f0f0; color: #666; }
.b진행완료 { background: #d4f0e4; color: #1a7f5a; }
.b예정     { background: #e0eef6; color: #1a4f7a; }
.b노쇼,.b당일취소 { background: #fdecd8; color: #9b4a0a; }
.b일정변경됨 { background: #f0ebf8; color: #5b21b6; }
.bdef      { background: #f0f0f0; color: #888; }

/* ─── 목록 페이지 ────────────────────────────────────────────── */
.page-loading { padding: 40px; text-align: center; color: #999; }
.page-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 700; }
.cnt-badge {
  display: inline-block; background: #e8ecf0; color: #667;
  font-size: 12px; font-weight: 600; padding: 1px 8px;
  border-radius: 20px; margin-left: 6px; vertical-align: middle;
}
.filter-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 14px; flex-wrap: wrap;
}
.search-input {
  border: 1.5px solid #ddd; border-radius: 8px; padding: 7px 12px;
  font-size: 13px; min-width: 220px; flex: 1; outline: none;
}
.search-input:focus { border-color: var(--primary, #2a6b67); }
.filter-sel {
  border: 1.5px solid #ddd; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; background: #fff; cursor: pointer; outline: none;
}
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  background: #f4f9fc; text-align: left; padding: 9px 12px;
  font-size: 11px; font-weight: 700; color: #667;
  border-bottom: 1.5px solid #ddd; white-space: nowrap;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid #edf2f7; vertical-align: middle; }
.data-table tr:hover td { background: #f8fcfe; }
.data-table tr:last-child td { border-bottom: none; }
.empty-cell { text-align: center; color: #999; padding: 32px !important; }
.link-name { color: var(--primary, #2a6b67); font-weight: 600; text-decoration: none; }
.link-name:hover { text-decoration: underline; }
.muted { color: #888; }
.action-cell { white-space: nowrap; }
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 18px;
}
.pager-btn {
  border: 1.5px solid #ddd; border-radius: 7px; padding: 6px 14px;
  background: #fff; cursor: pointer; font-size: 13px;
  transition: all .12s;
}
.pager-btn:hover:not([disabled]) { background: #f4f9fc; border-color: var(--primary, #2a6b67); }
.pager-btn[disabled] { opacity: .4; cursor: not-allowed; }
.pager-info { font-size: 13px; color: #666; }
.info-note {
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 7px;
  padding: 10px 14px; font-size: 13px; color: #0369a1; margin-bottom: 14px;
}

/* ─── 워크스페이스 레이아웃 ─────────────────────────────────── */
.ws-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.15fr) minmax(360px, 1.3fr);
  gap: 0;
  height: calc(100vh - 60px);   /* 헤더 높이 맞게 조정 */
  overflow: hidden;
}
.ws-col {
  border-right: 1px solid #e5e8ec;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ws-col:last-child { border-right: none; }
.ws-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e8ec;
  background: #f8fafc;
  flex-shrink: 0;
  cursor: default;
}
.ws-panel-hdr.ws-hdr-clickable { cursor: pointer; }
.ws-panel-title {
  font-size: 13px; font-weight: 700; color: #334;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
}
.ws-panel-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* 헤더에 바로 들어가는 선택 드롭다운 (회기/차수 패널) */
.ws-hdr-select {
  flex: 1; min-width: 0;
  border: 1.5px solid #ddd; border-radius: 7px;
  padding: 5px 9px; font-size: 12.5px; font-weight: 700; background: #fff;
  color: #334; outline: none; cursor: pointer;
}
.ws-hdr-select:focus { border-color: var(--primary, #2a6b67); }

/* 헤더에 드롭다운과 나란히 오는 액션 버튼(일정예약/+ 차수) — 드롭다운(flex:1)이 남는 공간을
   채우므로 이 버튼들은 줄어들지 않고 오른쪽 끝에 붙는다 (회기/차수 패널 공용) */
.ws-panel-hdr .icon-btn { flex-shrink: 0; }

/* 모바일 전용 접기/펼치기 토글 — 데스크탑에서는 항상 숨김 */
.ws-fold-toggle {
  display: none;
  flex-shrink: 0;
  background: #fff; border: 1px solid #ddd; border-radius: 6px;
  padding: 4px 9px; font-size: 11.5px; font-weight: 600; color: #556;
  cursor: pointer;
}

/* 패널 본문 첫 줄 — 수정/삭제/AI/추가 등 액션 버튼 그룹 (3패널 공통) */
.ws-body-actions {
  display: flex; justify-content: flex-end; gap: 4px;
  padding: 8px 14px; flex-wrap: wrap;
}
.ws-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}
.ws-loading { text-align: center; color: #aaa; padding: 24px; font-size: 13px; }
.ws-loading.xs { padding: 8px; font-size: 12px; }
.ws-empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #aaa; text-align: center; padding: 40px;
  gap: 12px;
}
.ws-empty-state .empty-icon { font-size: 36px; }
.ws-empty-state p { font-size: 13px; line-height: 1.75; }
.empty-msg {
  padding: 12px 14px; color: #aaa; font-size: 12px;
  text-align: center; line-height: 1.7;
}
.empty-msg.xs { padding: 6px 14px; font-size: 11px; }

/* ─── 내담자 정보 패널 ───────────────────────────────────────── */
.info-grid   { padding: 0 14px; }
.info-row    { display: flex; gap: 8px; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid #f0f0f0; }
.info-row:last-child { border-bottom: none; }
.info-lbl    { color: #aaa; width: 64px; flex-shrink: 0; font-size: 11px; padding-top: 1px; }
.info-val    { color: #334; }
.person-memo {
  margin: 10px 14px 0; padding: 10px 12px;
  background: #f8f9fa; border-radius: 7px;
  font-size: 12px; color: #555; line-height: 1.75;
  white-space: pre-wrap;
}

/* 편집 모달에는 있으나 읽기 화면엔 없던 항목(경위/목표/메모 등) 노출용 */
.detail-memo-item { margin: 8px 14px 0; }
.detail-memo-item:last-child { margin-bottom: 8px; }
.detail-memo-lbl {
  display: block; font-size: 11px; color: #aaa; margin-bottom: 3px;
}
.detail-memo-val {
  padding: 8px 10px; background: #f8f9fa; border-radius: 7px;
  font-size: 12px; color: #555; line-height: 1.65; white-space: pre-wrap;
}

/* ─── 차수/회기 패널 ─────────────────────────────────────────── */
.consult-method { font-size: 11px; color: #667; }
.consult-topic  { font-size: 12px; color: #667; padding: 6px 12px 0; }

/* 회기 목록 */
.session-block { padding: 6px 8px 4px; }
.sb-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px 6px; font-size: 11px; font-weight: 700; color: #888;
}
.sess-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 7px 8px; border-radius: 7px; cursor: pointer;
  transition: background .1s;
  margin-bottom: 2px;
}
.sess-row:hover { background: #eef6f5; }
.sess-row.active { background: #e0f2f0; }
.sess-num   { font-size: 12px; font-weight: 700; color: #334; min-width: 30px; }
.sess-date  { font-size: 11px; color: #667; min-width: 72px; }
.sess-topic { font-size: 11px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.sess-row-actions { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }

/* 결제 */
.pay-block    { border-top: 1px dashed #dde; margin: 4px 0 0; padding: 8px 10px 10px; }
.pay-hdr      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pay-title    { font-size: 11px; font-weight: 700; color: #556; text-transform: uppercase; letter-spacing: .04em; }
.pay-summary  { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pay-item     { font-size: 12px; display: flex; gap: 6px; align-items: center; }
.pay-item strong { font-weight: 700; color: var(--primary, #2a6b67); }
.pay-list     { display: flex; flex-direction: column; gap: 3px; }
.pay-row      { display: flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 0; }
.pay-date     { color: #888; min-width: 70px; }
.pay-method   { min-width: 44px; }
.pay-amt      { font-weight: 600; min-width: 60px; }
.pay-memo     { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 부부/가족상담 연동 — 연결된 구성원 목록 */
.consult-group-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.cg-member-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 8px; border-radius: 7px; background: #f7fafa; }
.cg-member-name { font-size: 12.5px; font-weight: 700; color: #334; }
.cg-member-row .icon-btn { margin-left: auto; }

/* documentManager.js의 .doc-cond와 동일한 조건부 표시 마커 — workspace.js(회기 참석 구성원)에서도
   재사용하므로 전역 스타일시트에 둔다. */
.doc-hidden { display: none !important; }

/* 부부/가족상담 연동 — 회기 참석 구성원(공동유형 회기에서만 노출) */
.se-attendees-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.se-attendee-item  { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #334; cursor: pointer; }
.se-attendee-item input { width: auto; }
.se-attendees-note { width: 100%; margin-top: 8px; min-height: 50px; font-size: 12.5px; }

/* 부부/가족상담 연동 — 연결된 구성원 차수에서 등록된 공동 회기 배지/안내 */
.sess-linked-badge {
  font-size: 10.5px; color: #7a5a1a; background: #fdf3e0; border-radius: 8px;
  padding: 2px 7px; white-space: nowrap; flex-shrink: 0;
}
.sess-linked-banner {
  font-size: 12px; color: #7a5a1a; background: #fdf3e0; border: 1px solid #f0dfb0;
  border-radius: var(--radius-sm, 8px); padding: 8px 12px; margin-bottom: 10px;
}

/* ─── 오른쪽 패널 (섹션 에디터) ─────────────────────────────── */
.ws-right-body { padding: 0; display: flex; flex-direction: column; height: 100%; }
.sess-info-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.info-chip {
  display: inline-block; font-size: 11.5px; font-weight: 500;
  padding: 2px 9px; border-radius: 20px;
}
.info-chip.topic { background: #e8f4fd; color: #1a4f7a; }
.info-chip.pay   { background: #f0fdf4; color: #1a7f5a; }
.info-chip.venue { background: #fdf0e8; color: #7a4a1a; }
.info-chip.next  { background: #f8f0fd; color: #5b21b6; }

/* 회기 결제 인라인 표시 */
.sess-pay-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; font-size: 12px; color: #556;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.pay-row-label { font-weight: 700; color: #888; font-size: 11px; }
.sess-pay-amt  { font-weight: 700; color: var(--primary, #2a6b67); }

/* 섹션 카드 */
.section-cards {
  padding: 10px 14px; display: flex; flex-direction: column; gap: 6px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.section-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 1px solid #e5e8ec; border-radius: 8px;
  background: #fafbfc;
}
.section-card-main  { display: flex; align-items: center; gap: 8px; }
.section-card-name  { font-size: 13px; font-weight: 600; color: #334; }
.section-card-actions { display: flex; gap: 4px; }
.sbadge.bhas  { background: #d4f0e4; color: #1a7f5a; }
.sbadge.bnone { background: #f0f0f0; color: #999; }

/* 상담요약/회기분석/축어록/녹음파일/외부보고 카드 — "있음"/"없음" 배지 텍스트 대신 배경색으로 구분 */
.section-card.no-content  { background: #f0f0f0; border-color: #e2e2e2; }
.section-card.has-content { background: #e8f5ec; border-color: #cde8d8; }

/* 외부보고 카드 — 보고서 1건 이상이면 카드가 아래로 확장되어 목록 표시 */
.section-card-report { flex-direction: column; align-items: stretch; gap: 6px; }
.section-card-hdr { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-card-list {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 6px; border-top: 1px dashed #e2e8ec;
}
.report-card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 2px; font-size: 12px;
}
.report-card-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334; }
.report-card-footer { display: flex; justify-content: flex-end; padding-top: 2px; }

/* 섹션 편집 모달 */
.section-edit-ta {
  width: 100%; min-height: 400px; box-sizing: border-box;
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  font-size: 13.5px; line-height: 1.85; padding: 14px 16px;
  color: #334; border: 1px solid #e5e8ec; border-radius: 7px; resize: vertical;
}

.md-preview {
  padding: 14px 18px; overflow-y: auto; flex: 1;
  font-size: 13.5px; line-height: 1.85; color: #334;
}
.md-preview h1,.md-preview h2,.md-preview h3 { font-weight: 700; margin: 1em 0 .4em; }
.md-preview p  { margin-bottom: .75em; }
.md-preview ul,.md-preview ol { padding-left: 1.4em; margin-bottom: .75em; }
.md-preview li { margin-bottom: .25em; }
.md-preview hr { border: none; border-top: 1px solid #eee; margin: 1em 0; }
.md-preview blockquote { border-left: 3px solid #ccc; padding-left: 12px; color: #667; margin: .75em 0; }
.md-preview code { background: #f0f0f0; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.md-preview pre  { background: #f8f8f8; padding: 12px; border-radius: 7px; overflow-x: auto; }
.md-preview pre code { background: none; padding: 0; }

/* ─── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; height: auto; }
  .ws-col    { border-right: none; border-bottom: 1px solid #e5e8ec; max-height: 50vh; }
  .ws-col-right { max-height: 70vh; }
  .form-grid3 { grid-template-columns: 1fr 1fr; }
  .modal-lg   { width: calc(100vw - 32px); }
  .modal-sm   { width: calc(100vw - 32px); }

  /* 모바일 전용 패널 접기/펼치기 — 데스크탑에서는 항상 펼침 */
  .ws-fold-toggle { display: inline-block; }
  .ws-col.ws-folded { max-height: none; }
  .ws-col.ws-folded > .ws-panel-body { display: none; }
}
@media (max-width: 480px) {
  .form-grid3,.form-grid2 { grid-template-columns: 1fr; }
}

/* ─── 대시보드 v2 (사이드바 + 월간 캘린더) ─────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  align-items: start;
}
.dash-side { display: flex; flex-direction: column; gap: 10px; }
.dash-side-toolbar {
  display: flex; flex-direction: column; gap: 7px;
}

.dash-today-card { min-height: 130px; padding: 12px 14px; }
.dash-today-card .card-title { margin-bottom: 8px; }
.dash-today-row {
  display: flex; align-items: center; gap: 7px; padding: 6px 4px;
  cursor: pointer; border-radius: 6px; font-size: 12.5px; line-height: 1.5;
  flex-wrap: wrap;
}
.dash-today-row:hover { background: #F3F8F8; }
.dash-today-time      { font-weight: 700; color: var(--p); flex-shrink: 0; }
.dash-today-name      { font-weight: 600; color: var(--txt); }
.dash-today-counselor { color: var(--mut); font-size: 11.5px; }
.dash-sess-counselor  { font-size: 10.5px; color: var(--fnt); }

.dash-active-count {
  font-family: var(--font-serif); font-size: 34px; font-weight: 700;
  color: var(--p); line-height: 1.1; margin-top: 2px; cursor: pointer; display: inline-block;
}
.dash-active-count:hover { color: var(--pd); text-decoration: underline; }
.dash-active-sub { font-size: 11.5px; color: var(--mut); margin-top: 3px; }

/* 나의 내담자 카드 (진행중 사례 대체, 축소된 크기) */
.dash-my-clients-card { padding: 8px 12px; }
.dash-my-clients-card .card-title { margin-bottom: 4px; }
.dash-my-count {
  font-size: 14px; font-weight: 600; color: var(--txt);
  margin-top: 2px; cursor: pointer; display: inline-block;
}
.dash-my-count strong { font-family: var(--font-serif); font-size: 17px; color: var(--p); }
.dash-my-count:hover strong { color: var(--pd); }
.dash-my-count:hover { text-decoration: underline; }

/* 캘린더 카드 — overflow:hidden이면 주/일 시간대 그리드가 길어질 때 스크롤이 막히므로
   월간 그리드의 둥근 모서리 클리핑은 border-radius로 충분해 overflow는 visible로 둔다. */
.dash-cal-card { padding: 0; }
.dash-cal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--brd); flex-wrap: wrap; gap: 8px;
}
.dash-cal-nav  { display: flex; align-items: center; gap: 6px; }
.dash-cal-nav-btn {
  background: #fff; border: 1.5px solid var(--brd); border-radius: 6px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--mut); cursor: pointer;
}
.dash-cal-nav-btn:hover { border-color: var(--p); color: var(--p); }
.dash-cal-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: var(--pd); min-width: 108px; text-align: center;
}
.dash-cal-view-toggle {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg); border-radius: 8px; padding: 2px;
}
.dash-cal-view-btn {
  background: none; border: none; border-radius: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--mut); cursor: pointer;
}
.dash-cal-view-btn:hover  { color: var(--p); }
.dash-cal-view-btn.active { background: #fff; color: var(--p); box-shadow: var(--sh); }
.dash-cal-icon-btn {
  background: #fff; border: 1.5px solid var(--brd); border-radius: 6px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--mut); cursor: pointer;
}
.dash-cal-icon-btn:hover { border-color: var(--p); color: var(--p); }

.dash-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dash-cal-dow {
  text-align: center; font-size: 10.5px; font-weight: 700; color: var(--mut);
  padding: 8px 4px; border-bottom: 1px solid var(--brd); text-transform: uppercase;
}
.dash-cal-dow.sun { color: var(--err); }
.dash-cal-dow.sat { color: var(--inf); }

.dash-cal-cell {
  min-height: 96px; min-width: 0; border-right: 1px solid var(--brd); border-bottom: 1px solid var(--brd);
  padding: 5px 5px 6px; display: flex; flex-direction: column; gap: 2px;
}
.dash-cal-cell:nth-child(7n)      { border-right: none; }
.dash-cal-cell.other-month        { background: #FAFCFC; }
.dash-cal-cell.other-month .dash-cal-daynum { color: var(--fnt); }
.dash-cal-cell.today              { background: var(--pl); }
.dash-cal-daynum { font-size: 11.5px; font-weight: 700; color: var(--txt); margin-bottom: 2px; }
.dash-cal-cell.today .dash-cal-daynum {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%; background: var(--p); color: #fff;
}
.dash-cal-sess {
  display: flex; align-items: center; gap: 4px; font-size: 10.5px; line-height: 1.4;
  padding: 1px 3px; border-radius: 4px; cursor: pointer; overflow: hidden; min-width: 0;
}
.dash-cal-sess:hover  { background: #F3F8F8; }
.dash-cal-dot         { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dash-cal-sess-txt    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.dash-cal-more {
  font-size: 10px; color: var(--p); font-weight: 700; cursor: pointer; padding: 1px 3px;
}
.dash-cal-more:hover { text-decoration: underline; }

/* 주간/일간 시간대 그리드 */
.dash-cal-timegrid-wrap { overflow-x: auto; }
.dash-tg-header {
  display: grid; border-bottom: 1px solid var(--brd); position: sticky; top: var(--hdr); background: #fff; z-index: 2;
}
.dash-tg-daycol-hdr {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--mut);
  padding: 8px 4px; border-left: 1px solid var(--brd);
}
.dash-tg-daycol-hdr.today { color: var(--p); background: var(--pl); }
.dash-tg-body {
  display: grid; position: relative;
}
.dash-tg-timelabel {
  font-size: 10px; color: var(--fnt); text-align: right; padding: 0 6px;
  transform: translateY(-6px); border-top: 1px solid var(--brd);
}
.dash-tg-slot {
  border-top: 1px solid #f0f4f4; border-left: 1px solid var(--brd); cursor: pointer;
}
.dash-tg-slot:hover { background: #F3F8F8; }
.dash-tg-sess {
  margin: 1px 2px; padding: 2px 5px; border-radius: 4px; background: var(--pl);
  font-size: 10.5px; line-height: 1.3; overflow: hidden; cursor: pointer; z-index: 1;
}
.dash-tg-sess:hover { background: var(--pl2); }
.dash-tg-sess .dash-cal-sess-txt { white-space: normal; }

/* 보조일정 (세션과 구분: 옅은 점선 테두리 + 다른 색 계열) */
.dash-sec-event {
  font-size: 10px; color: var(--acc); background: var(--acc-l);
  border: 1px dashed var(--acc); border-radius: 4px;
  padding: 1px 4px; margin-top: 2px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; cursor: default;
}
.dash-sec-event-txt { overflow: hidden; text-overflow: ellipsis; }
.dash-sec-event-allday { margin: 3px 2px 0; white-space: normal; }
.dash-tg-sec-event {
  /* align-self:start였던 이전 규칙은 grid-row span 전체(시작~종료 시간)로 늘어나야 할 블럭을
     내용물 높이(한 줄)로만 줄여버렸다 — span 1(30분 고정)일 때는 티가 안 났지만, 실제 기간만큼
     span을 늘려 표시하는 지금은 반드시 stretch(기본값)로 두어야 한다. */
  margin: 1px 2px; z-index: 1;
}

/* "예약 가능 시간" 블럭 — 세션/보조일정과 구분되는 옅은 초록 빗금 스타일 */
.dash-avail-slot {
  font-size: 10px; color: var(--ok);
  background: repeating-linear-gradient(45deg, var(--ok-bg), var(--ok-bg) 5px, #fff 5px, #fff 10px);
  border: 1px dashed var(--ok); border-radius: 4px;
  padding: 1px 4px; margin-top: 2px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; cursor: default;
}
.dash-avail-slot-txt { overflow: hidden; text-overflow: ellipsis; }
.dash-tg-avail-slot {
  /* dash-tg-sec-event와 동일한 이유로 align-self:start를 두지 않는다(stretch로 span 전체를 채움). */
  margin: 1px 2px; z-index: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
}

/* 보조일정 표시 설정 모달 */
.dash-sec-vis-list { display: flex; flex-direction: column; gap: 8px; }
.dash-sec-vis-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--txt); cursor: pointer;
}
.dash-sec-vis-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-sec-vis-item input[type="checkbox"] { flex-shrink: 0; }
.dash-sec-vis-item input[type="color"] {
  width: 30px; height: 24px; padding: 0; border: 1px solid var(--brd); border-radius: 4px; cursor: pointer;
  justify-self: end;
}
.dash-sec-vis-toggle { padding-bottom: 10px; }
.dash-sec-vis-divider { border-top: 1px solid var(--brd); margin: 2px 0 12px; }

/* 캘린더/진행중사례 모달 안 세션·명단 행 */
.dash-modal-sess-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px; cursor: pointer;
  border-radius: 6px; border-bottom: 1px solid #f0f0f0;
}
.dash-modal-sess-row:last-child { border-bottom: none; }
.dash-modal-sess-row:hover      { background: #F3F8F8; }

/* 진행중 사례 모달 카드 */
.dash-active-card {
  padding: 10px 6px; cursor: pointer; border-radius: 6px; border-bottom: 1px solid #f0f0f0;
}
.dash-active-card:last-child { border-bottom: none; }
.dash-active-card:hover      { background: #F3F8F8; }
.dash-active-card-hdr  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-active-card-name { font-size: 13.5px; font-weight: 600; color: var(--txt); }
.dash-active-card-num  { font-size: 11.5px; color: var(--mut); }
.dash-active-card-next { font-size: 12px; color: var(--txt); margin-top: 4px; }
.dash-active-card-none { color: var(--fnt); }
.dash-active-card-meta {
  display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 4px;
  font-size: 11px; color: var(--mut);
}

@media (max-width: 900px) {
  .dash-layout   { grid-template-columns: 1fr; }
  .dash-cal-cell { min-height: 76px; }
}

/* ─── 일정예약 모달 (components/bookingModal.js) ─────────────────── */
.bkm-person-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pl); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 13.5px; color: var(--txt);
}
.bkm-search-results {
  margin-top: 4px; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--brd); border-radius: var(--radius-sm);
}
.bkm-search-results:empty { border: none; }
.bkm-search-row {
  padding: 8px 10px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--brd);
}
.bkm-search-row:last-child { border-bottom: none; }
.bkm-search-row:hover { background: var(--pl); }

.bkm-pattern-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bkm-pattern-btn { background: #fff; color: var(--mut); border: 1.5px solid var(--brd); }
.bkm-pattern-btn.active { background: var(--p); color: #fff; border-color: var(--p); }

.bkm-radio-row { display: flex; gap: 16px; margin-bottom: 8px; }
.bkm-radio-row label {
  display: flex; align-items: center; gap: 5px;
  text-transform: none; font-size: 13px; font-weight: 400; color: var(--txt);
}
.bkm-radio-row input[type="radio"] { width: auto; }

.bkm-cal-hdr {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--pd);
}
.bkm-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.bkm-cal-dow {
  text-align: center; font-size: 10.5px; font-weight: 700; color: var(--mut);
  padding: 3px 0;
}
.bkm-cal-cell {
  text-align: center; font-size: 12.5px; padding: 7px 0;
  border-radius: 6px; cursor: pointer; color: var(--txt);
  background: var(--bg);
}
.bkm-cal-cell:hover:not(.past):not(.empty) { background: var(--pl2); }
.bkm-cal-cell.empty { background: transparent; cursor: default; }
.bkm-cal-cell.past { color: var(--fnt); cursor: not-allowed; background: transparent; }
.bkm-cal-cell.selected { background: var(--p); color: #fff; font-weight: 700; }

.bkm-chips { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.bkm-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--pl); color: var(--pd); border-radius: 20px;
  padding: 3px 6px 3px 10px; font-size: 12px; font-weight: 600;
}
.bkm-chip button {
  background: none; border: none; cursor: pointer; color: var(--pd);
  font-size: 11px; padding: 2px 4px; line-height: 1;
}
.bkm-chip button:hover { color: var(--err); }

.bkm-preview-wrap { max-height: 240px; overflow-y: auto; border: 1px solid var(--brd); border-radius: var(--radius-sm); }
.bkm-preview-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bkm-preview-tbl th {
  position: sticky; top: 0; background: var(--pl); color: var(--pd);
  text-align: left; padding: 6px 10px; font-weight: 700; font-size: 11px;
}
.bkm-preview-tbl td { padding: 6px 10px; border-top: 1px solid var(--brd); color: var(--txt); }

@media (max-width: 900px) {
  .bkm-cal-cell { padding: 6px 0; font-size: 11.5px; }
  .bkm-radio-row { flex-direction: column; gap: 6px; align-items: flex-start; }
}

/* ─── 반복 일정 수정 모달 (components/bookingGroupModal.js) ─────────── */
.bgm-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.bgm-count { font-size: 12px; color: var(--mut); }
.bgm-danger-box { background: var(--err-bg); }
.bgm-edit-box {
  background: var(--pl); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 12px;
}
.bgm-edit-actions { display: flex; gap: 8px; margin-top: 10px; }
.bgm-table-wrap table { min-width: 640px; }
.bgm-row { cursor: pointer; }
.bgm-row-disabled { opacity: .55; }
.bgm-row-disabled:hover td { background: transparent; }
.bgm-check-cell { cursor: default; }
.bgm-check-cell input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.bgm-check-cell input[type="checkbox"]:disabled { cursor: not-allowed; }

/* ─── 예약 확정 마법사 (components/bookingConfirmWizard.js) ─────────── */
.bcw-summary {
  background: var(--pl); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 18px;
}
.bcw-q { font-size: 14px; font-weight: 600; color: var(--txt); margin-bottom: 12px; }
.bcw-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.bcw-list-row { cursor: pointer; }
