:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --line: #e3e8e6;
  --text: #1b2423;
  --muted: #6c7876;
  --primary: #0e6b67;
  --primary-hover: #0b5854;
  --primary-weak: #e2f0ee;
  --danger: #b93b1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 38, .04), 0 4px 16px rgba(20, 40, 38, .04);
  --sidebar: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Pretendard', -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- 레이아웃 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700;
}
.brand-name { font-weight: 700; font-size: 16px; }
#nav { flex: 1; overflow-y: auto; }
.nav-group { font-size: 12px; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px; color: #3c4846;
  transition: background .15s;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: var(--primary); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.me strong { display: block; font-size: 13px; }
.me small { color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-weak); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

.content { min-width: 0; }
.topbar { display: none; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 16px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; }
.page-head h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { color: var(--danger); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; margin-top: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi-hint { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }

/* ---------- 검색 ---------- */
.toolbar { padding: 14px 16px; }
.search { display: flex; align-items: center; gap: 8px; max-width: 480px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font: inherit; color: var(--text); }
.search:focus-within { border-color: var(--primary); }

/* ---------- 표 ---------- */
.table-wrap { padding: 4px 0 8px; overflow: hidden; }
.table-meta { padding: 12px 18px; color: var(--muted); font-size: 13px; }
.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 18px; border-top: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.clip { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge.green { background: #e2f3e8; color: #1d6b3a; }
.badge.blue { background: #e3edfa; color: #1f4f8f; }
.badge.amber { background: #fbf0d9; color: #8a5a07; }
.badge.red { background: #fbe5df; color: #9d3217; }
.badge.gray { background: #eef1f0; color: #56625f; }

.empty { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- 차트 ---------- */
.chart { padding: 18px 20px; }
.chart h2 { font-size: 15px; margin-bottom: 14px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 160px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-col span { font-size: 11px; color: var(--muted); }
.bar-track { flex: 1; width: 100%; max-width: 32px; display: flex; align-items: flex-end; }
.bar { width: 100%; background: #b9d9d5; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar.cur { background: var(--primary); }

/* ---------- 명함 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bcard { padding: 18px; cursor: pointer; }
.bcard:hover { border-color: #c8d4d1; }
.bcard-top { display: flex; align-items: baseline; gap: 8px; }
.bcard-top strong { font-size: 16px; }
.bcard-co { color: var(--primary); font-weight: 600; margin: 4px 0 12px; }
.bcard dl { display: grid; grid-template-columns: 48px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.bcard dt { color: var(--muted); }
.bcard dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 자료실 ---------- */
.posts { display: flex; flex-direction: column; gap: 12px; }
.post { padding: 20px 22px; cursor: pointer; }
.post:hover { border-color: #c8d4d1; }
.post-title { display: flex; align-items: center; gap: 8px; }
.post-title h3 { font-size: 17px; }
.post-excerpt { margin: 8px 0 10px; color: #4a5654; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: 12px; color: var(--muted); }
.md h2, .md h3, .md h4 { margin: 12px 0 6px; }
.md h3 { font-size: 16px; } .md h4 { font-size: 14px; }
.md p { margin: 4px 0; }
.md li { margin-left: 18px; }
.md .chk { display: flex; gap: 6px; align-items: center; }

/* ---------- 캘린더 ---------- */
.cal { padding: 16px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { font-size: 17px; min-width: 120px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-w { padding: 8px; font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-w:first-child { color: #b43c2a; }
.cal-cell { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: #fafbfb; }
.cal-cell.other .cal-d { color: #b3bcba; }
.cal-d { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.today .cal-d { background: var(--primary); color: #fff; }
.ev { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--primary-weak); color: #0b4f4b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev b { font-weight: 700; }
.ev-more { font-size: 11px; color: var(--muted); padding-left: 4px; }

/* ---------- 기능 소개 / 템플릿 ---------- */
.feature-grid, .tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.feature { padding: 20px; }
.feature h3 { font-size: 15px; margin: 10px 0 4px; }
.feature p { margin: 0; color: var(--muted); }
.feature-ic { width: 26px; height: 26px; color: var(--primary); }
.tpl { padding: 16px 18px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.tpl span { color: var(--muted); font-size: 13px; }
.tpl.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }

/* ---------- PT 운영 ---------- */
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; }
.spacer { flex: 1; }
.btn-row.end .spacer + .btn { margin-left: 0; }
.ev.blue { background: #e3edfa; color: #1f4f8f; }
.ev.green { background: #e2f3e8; color: #1d6b3a; }
.ev.red { background: #fbe5df; color: #9d3217; }
.ev.amber { background: #fbf0d9; color: #8a5a07; }
.ev.gray { background: #eef1f0; color: #56625f; }
.ev.strike { text-decoration: line-through; color: #8a9491; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-legend .ev { cursor: default; }
.cal-head.pad { padding: 14px 18px 4px; }
tbody.static tr { cursor: default; }
tbody.static tr:hover { background: none; }
th.num { text-align: right; }
tfoot th { border-top: 2px solid var(--line); background: var(--surface); color: var(--text); }
.mini li .right { margin-left: auto; }
.small { font-size: 12px; margin: -4px 0 6px; }
.field small { font-size: 12px; }

/* ---------- 양식 문서 ---------- */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-form { padding: 20px; }
.doc-form-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.doc-form-head h2 { font-size: 16px; }
.doc-preview { position: sticky; top: 16px; }
.a4 { background: #fff; color: #1b2423; aspect-ratio: 210 / 297; padding: 8% 9%; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; font-size: 12px; display: flex; flex-direction: column; }
.a4-top { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .08em; color: var(--primary); font-weight: 700; border-bottom: 2px solid var(--primary); padding-bottom: 8px; }
.a4 h1 { font-size: 20px; margin: 18px 0 12px; }
.a4 h3 { font-size: 12px; color: var(--primary); margin: 14px 0 4px; }
.a4 p { margin: 0; overflow-wrap: anywhere; }
.a4-meta { width: auto; font-size: 11px; }
.a4-meta th, .a4-meta td { border: 0; padding: 2px 16px 2px 0; background: none; }
.a4-meta th { color: var(--muted); }
.a4-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); text-align: right; }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field[hidden] { display: none; }
.field label { font-size: 13px; font-weight: 600; }
.field em { color: var(--danger); font-style: normal; margin-left: 2px; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary-weak); border-color: var(--primary); }

/* ---------- 설정 ---------- */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.set-block { padding: 20px; }
.set-block h2 { font-size: 16px; margin-bottom: 4px; }
.set-block > p { margin: 0 0 14px; font-size: 13px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row div { flex: 1; display: flex; flex-direction: column; }
.set-row .ic { color: var(--primary); }

/* ---------- 대시보드 ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-block { padding: 18px 20px; }
.dash-block.wide { grid-column: 1 / -1; }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dash-head h2 { font-size: 15px; }
.dash-head a { color: var(--primary); font-size: 13px; font-weight: 600; }
/* 서버 모드: 로그인 화면 · 저장 상태 · 접속 관리 */
.auth { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--bg, #f4f6f5); }
.auth[hidden] { display: none; } /* display:grid 가 hidden 을 덮어써서 빈 화면이 ERP를 가리던 문제 */
body.auth-on { overflow: hidden; }
.auth-box { width: min(400px, 100%); background: var(--surface); border-radius: 16px; padding: 28px 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .08); display: grid; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.auth-google { width: 100%; justify-content: center; height: 44px; font-size: 15px; }
.sync-status { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sync-status.bad { color: #B42318; font-weight: 700; }
.me-out { display: inline; padding: 0; color: var(--muted); text-decoration: underline; }
.acc-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.acc-req, .acc-staff { flex-direction: column; align-items: stretch; }

/* 트레이너 월간 리포트 (출석앱 형식) */
.trp-preview { max-height: 70vh; overflow-y: auto; background: #fff; color: #1b2423; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.trp { background: #fff; color: #1b2423; }
.trp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid #1b2423; }
.trp-center { font-size: 20px; }
.trp-title { color: #1D4ED8; font-weight: 800; font-size: 16px; margin-top: 2px; }
.trp-h { font-size: 13px; margin: 14px 0 6px; }
.trp-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.trp-t th { background: #1D4ED8; color: #fff; padding: 7px 6px; font-weight: 700; }
.trp-t td { padding: 7px 6px; border-bottom: 1px solid #E5E7EB; text-align: center; }
.trp-t th, .trp-t td { white-space: normal; } /* 회원 칩이 여러 줄로 넘어가게 (칩 하나는 안 끊김) */
.trp-t tbody tr:nth-child(odd) td { background: #F8FAFC; }
.trp-days td:nth-child(2) { text-align: left; }
.trp-d { white-space: nowrap; font-weight: 700; width: 70px; }
.trp-n { white-space: nowrap; font-weight: 700; width: 50px; }
.trp-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.trp-chip.t-ok { background: #DCFCE7; color: #166534; } .trp-chip.t-bad { background: #FEE2E2; color: #991B1B; } .trp-chip.t-warn { background: #FEF3C7; color: #92400E; }
td.t-ok { color: #16A34A; } td.t-bad { color: #DC2626; } td.t-warn { color: #D97706; }
.cal-head .btn { margin-left: auto; }
@media (max-width: 600px) {
  .trp-preview { padding: 6px; }
  .trp-t { font-size: 11px; } .trp-t th, .trp-t td { padding: 5px 2px; }
  .trp-head { flex-direction: column; } .trp-center { font-size: 16px; } .trp-title { font-size: 14px; }
  .trp-d, .trp-n { width: auto; }
}

/* 표 제목 칸 정렬 */
th.th-sort { cursor: pointer; user-select: none; }
th.th-sort:hover { color: var(--primary); }
th.th-sort.on { color: var(--primary); }

/* 트레이너 순서 */
.order-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; counter-reset: ord; }
.order-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; counter-increment: ord; }
.order-list li::before { content: counter(ord); color: var(--muted); font-weight: 700; width: 18px; }

/* 신발장 7×7 */
.locker-wrap { padding: 18px 20px; }
.locker-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 6px; margin: 8px 0; max-width: 720px; }
.locker { aspect-ratio: 1 / 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font: inherit; text-align: center; overflow: hidden; }
.locker b { font-size: 13px; line-height: 1.2; word-break: keep-all; overflow-wrap: anywhere; }
.locker span { font-size: 11px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.locker.on { background: var(--primary-weak, #e6f2f1); border-color: var(--primary); }
.locker.staff { border-color: var(--c, var(--primary)); box-shadow: inset 0 4px 0 var(--c, var(--primary)); }
button.locker:hover { border-color: var(--primary); }
@media (max-width: 600px) { .locker-grid { gap: 3px; } .locker { padding: 2px; border-radius: 6px; } .locker b { font-size: 10px; } .locker span { font-size: 9px; } }
#printArea .locker-grid { gap: 2mm; } #printArea .locker { border: 1px solid #999; background: #fff; box-shadow: none; } #printArea .locker b { font-size: 10pt; }

/* 문자 일괄 발송 */
.msg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.msg-col { padding: 18px 20px; min-width: 0; }
.msg-col.wide { grid-column: 1 / -1; }
.msg-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.msg-filters .search { flex: 1 1 140px; min-width: 0; }
.msg-listhead { padding: 6px 0; border-bottom: 1px solid var(--line); }
.msg-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.msg-list li { padding: 6px 2px; border-bottom: 1px solid var(--line); }
.msg-list .chk-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-who { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; flex: 1; min-width: 0; }
.msg-vars { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.msg-vars .chip { height: 26px; font-size: 12px; }
#msgBody { width: 100%; resize: vertical; }
.msg-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 13px; }
.msg-warn { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #FDF4E5; border: 1px solid #F3D9A8; color: #8A5A12; font-size: 13px; }
.msg-prev { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.msg-prev li { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); min-width: 0; }
.msg-prev pre { margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; font: inherit; font-size: 13px; }
.msg-li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.msg-send { flex-wrap: wrap; margin: 12px 0 6px; }
@media (max-width: 900px) { .msg-grid { grid-template-columns: minmax(0, 1fr); } }

/* 대시보드 편집 */
.dash-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-bar select { width: auto; min-width: 140px; }
.dash-help { margin: -4px 0 12px; }
.dash-grid.editing .dash-block { outline: 2px dashed var(--line); outline-offset: -2px; cursor: grab; }
.dash-grid.editing .dash-block.dragging { opacity: .4; }
.dash-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px -8px 12px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.dash-tools .drag { cursor: grab; color: var(--muted); font-size: 16px; }
.dash-hidden { margin-top: 16px; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.ck-row .linklike { display: inline-flex; margin-right: 6px; }
.mini .linklike { display: inline-flex; font-size: inherit; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.mini-date { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 96px; }

/* ---------- 모달 ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 25, 24, .4); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; z-index: 50; }
.modal.two #box1 { width: min(480px, 100%); }
.modal-box.side { width: min(520px, 100%); }
.modal-box[hidden] { display: none; }
.modal:not(.two) .modal-box.side { width: min(560px, 100%); }
.modal:not(.two) .modal-box.side.wide { width: min(720px, 100%); }
@media (max-width: 1040px) {
  /* 좁은 화면: 두 창을 위아래로, 새로 연 회원권 창이 위에 */
  .modal.two { flex-direction: column; justify-content: flex-start; overflow-y: auto; }
  .modal.two .modal-box { width: min(560px, 100%); max-height: none; flex: none; }
  .modal.two .modal-box.side { order: -1; }
  .modal.two.pair .modal-box.side { order: 0; }
}
/* 나눠 띄운 창(Daily 작성 등): 오른쪽 창을 조금 넓게 */
.modal.two.pair .modal-box.side.wide { width: min(640px, 100%); }
/* 창 3개: 세로로 긴 창 3개를 나란히 — 왼쪽 #box3 · 가운데 #box1 · 오른쪽 #box2 */
.modal.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 480px)); grid-template-rows: minmax(0, 1fr); justify-content: center; align-content: stretch; align-items: stretch; }
.modal.trio #box1, .modal.trio #box2, .modal.trio #box3 { width: auto; max-height: none; min-height: 0; grid-row: 1; }
.modal.trio #box3 { grid-column: 1; }
.modal.trio #box1 { grid-column: 2; }
.modal.trio #box2 { grid-column: 3; }
@media (max-width: 1040px) {
  /* 좁은 화면: 위아래로 (상태·메모 → Exercise → 프로그램) */
  .modal.trio { display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; }
  .modal.trio #box1, .modal.trio #box2, .modal.trio #box3 { width: min(640px, 100%); align-self: center; flex: none; }
  .modal.trio #box1 { order: 0; } .modal.trio #box2 { order: 1; } .modal.trio #box3 { order: 2; }
}
.d-top { grid-template-columns: auto minmax(90px, 1fr); }
.modal.trio .d-top .seg.radio span { padding: 7px 12px; }
@media (max-width: 600px) { .d-top { grid-template-columns: 1fr; } }
.dp-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pass-card { padding: 14px 16px; border-radius: 12px; background: var(--primary-weak); margin-bottom: 12px; }
.pass-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pass-head strong { font-size: 17px; }
/* 요일 선택 (월수금 / 화목토) */
.seg.radio { display: inline-flex; }
.seg.radio label { position: relative; cursor: pointer; }
.seg.radio input { position: absolute; opacity: 0; width: 1px !important; height: 1px; }
.seg.radio span { display: block; padding: 7px 18px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.seg.radio input:checked + span { background: var(--primary); color: #fff; }
.seg.radio input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 기간제 수업일 달력 */
.plan-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-head .muted b { color: var(--primary); }
.plan-empty { background: #fbf0d9; color: #8a5a07; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.pcal-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.pcal-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.pcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pw { font-size: 11px; color: var(--muted); text-align: center; }
.pd { position: relative; height: 28px; border-radius: 7px; border: 1px solid transparent; background: none; font-size: 12px;
  display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; padding: 0; }
button.pd:hover { border-color: var(--primary); }
.pd.out { color: #c9d0ce; }
.pd.hol { color: #c62828; }
.pd.plan { background: var(--primary); color: #fff; font-weight: 700; }
.pd.off { background: #fbe5df; color: #9d3217; text-decoration: line-through; }
.pd.extra { background: #e2f3e8; color: #1d6b3a; border-color: #1d8a4a; font-weight: 700; }
.pd.holi { background: repeating-linear-gradient(45deg, #fbe5df, #fbe5df 3px, #fff 3px, #fff 6px); color: #c62828; }
.pd.is-today { box-shadow: inset 0 0 0 2px #1b2423; }
.pd i { position: absolute; top: -3px; right: -2px; font-style: normal; font-size: 10px; background: #fff; color: #1d8a4a; border-radius: 50%; width: 13px; height: 13px; line-height: 13px; box-shadow: 0 0 0 1px #1d8a4a; }
.plan-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.plan-legend .pd { height: 20px; padding: 0 8px; }
.hist { list-style: none; margin: 0 0 6px; padding: 0; }
.hist-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hist-item:last-child { border-bottom: 0; }
.hist-item .btn-sm { height: 26px; flex: none; }
.pass-meta { margin-top: 6px; font-size: 13px; color: #3c4846; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border-radius: var(--radius); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.detail { margin: 0; }
.detail-row { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.detail dt { color: var(--muted); font-size: 13px; }
.detail dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 모바일 ---------- */
.scrim { display: none; }
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar-title { font-weight: 700; }
  main { padding: 16px 16px 40px; }
  .page-head { flex-direction: column; padding: 18px; }
  .doc-wrap, .dash-grid { grid-template-columns: 1fr; }
  .doc-preview { position: static; }
  .cal-cell { min-height: 64px; }
  .ev { font-size: 10px; padding: 1px 3px; }
  .ev b { display: none; }
  .bars { gap: 3px; }
}

/* ---------- 공통 입력 요소 ---------- */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .12); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0; }
.checks label { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; font-size: 14px; white-space: nowrap; }
.field .checks input[type=checkbox] { width: 16px; height: 16px; padding: 0; flex: none; }
.checks .chk-all { font-weight: 600; }
.color-inp { width: 64px !important; height: 38px; padding: 3px !important; }
.palette { display: flex; gap: 6px; margin-top: 6px; }
.pal { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .15); }
.form-error { color: var(--danger); background: #fbe5df; padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 0 0 8px; }
.modal-box.wide { width: min(760px, 100%); }
.center { text-align: center; }
h2.mt { margin-top: 18px; margin-bottom: 8px; font-size: 16px; }
.cal-d.red { color: #c62828; }
.cal-cell.today .cal-d.red { color: #fff; }
.hol { font-size: 11px; color: #c62828; margin-top: -2px; }
option.dim { color: #9aa5a3; }

/* ---------- 횟수 −/+ ---------- */
.counter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.counter .btn { width: 38px; justify-content: center; padding: 0; font-size: 18px; }
.field .counter input { width: 80px; text-align: center; font-weight: 700; }
.counter .chip { height: 30px; }
.adj-box { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 24px; padding: 12px 14px; margin-bottom: 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.adj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adj > span { color: var(--muted); font-size: 13px; }
.adj b { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }
.adj b.big { font-size: 18px; color: var(--primary); }
.adj .btn-sm { width: 30px; justify-content: center; padding: 0; font-size: 16px; }
.adj .btn:disabled { opacity: .35; cursor: default; }
.skip-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
@media (max-width: 600px) { .adj-box { grid-template-columns: 1fr; } }

/* ---------- 출석 버튼 (예약 창) ---------- */
.att-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 6px; }
.att-btns .btn { justify-content: center; height: 46px; font-size: 15px; }
.att-btns .btn.green.on { background: #1d8a4a; border-color: #1d8a4a; color: #fff; }
.att-btns .btn.amber.on { background: #c7870a; border-color: #c7870a; color: #fff; }
.att-btns .btn.red.on { background: #c0392b; border-color: #c0392b; color: #fff; }

/* ---------- PT 주간 시간표 ---------- */
.tt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 16px; }
.tt-toolbar .cal-nav h2 { font-size: 16px; min-width: 110px; text-align: center; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tt-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; }
.chip i, .tt-tr i, .tl-name i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0, 0, 0, .15); }
.chip.off { opacity: .4; text-decoration: line-through; }
.tt-select { height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font: inherit; font-weight: 600; background: var(--surface); }
.tt-sum { font-size: 13px; color: var(--muted); }
.tt-sum b { color: var(--text); }
.tt-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.lg { padding: 2px 7px; border-radius: 5px; --c: #8fa3a0; }
.lg.booked { background: color-mix(in srgb, var(--c) 35%, #fff); border-left: 3px solid var(--c); }
.lg.done { background: var(--c); color: #fff; }
.lg.absent { background: #f1f3f2; color: #56625f; }
.lg.noshow { background: #fff; border: 1.5px dashed #c0392b; color: #c0392b; }
.lg.personal { background: repeating-linear-gradient(45deg, #eceff0, #eceff0 4px, #f8f9f9 4px, #f8f9f9 8px); color: #56625f; }
.lg.common { background: #dfe6e5; color: #33403e; font-weight: 700; }

.tt-wrap { padding: 0; overflow: hidden; }
.tt-scroll { overflow: auto; max-height: calc(100vh - 150px); }
.tt-grid { display: grid; position: relative; min-width: max-content; font-size: 12px; }
.tt-grid > div { min-width: 0; }
.tt-corner, .tt-day, .tt-tr, .tt-time, .tt-foot { background: var(--surface); display: flex; align-items: center; justify-content: center; }
.tt-corner { position: sticky; top: 0; left: 0; z-index: 6; font-weight: 700; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tt-day { position: sticky; top: 0; z-index: 4; height: 32px; font-weight: 700; font-size: 13px; border-left: 2px solid #9fb0ad; border-bottom: 1px solid var(--line); background: var(--surface-2); gap: 4px; }
.tt-day.red { color: #c62828; }
.tt-day.is-today { background: var(--primary-weak); color: var(--primary); }
.tt-day.red.is-today { color: #c62828; }
.tt-day small { font-weight: 600; font-size: 11px; }
.tt-tr { position: sticky; top: 32px; z-index: 4; height: 28px; gap: 4px; font-weight: 600; border-bottom: 1px solid #b8c5c2; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; padding: 0 2px; }
.tt-tr.ds { border-left: 2px solid #9fb0ad; }
.tt-time { position: sticky; left: 0; z-index: 3; font-variant-numeric: tabular-nums; font-weight: 700; border-right: 1px solid var(--line); border-top: 1px solid #f0f2f1; }
.tt-time.hour { border-top-color: #d5dcda; }
.tt-time small { font-weight: 400; color: #a3adab; font-size: 10px; }
.tt-cell { border-left: 1px solid #eef1f0; border-top: 1px solid #f3f5f4; cursor: pointer; }
.tt-cell.hour { border-top-color: #dfe5e3; }
.tt-cell.ds { border-left: 2px solid #9fb0ad; }
.tt-cell:hover { background: var(--primary-weak); }
.tt-cell.closed { background: #f4f1f0; }
.tt-cell.closed:hover { background: #efe7e5; }
.tt-block { z-index: 2; margin: 1px 2px; border-radius: 5px; padding: 2px 4px; display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; line-height: 1.2; overflow: hidden; cursor: pointer; word-break: keep-all; }
.tt-res { --c: #8fa3a0; --fg: #fff; }
.tt-res.booked { background: color-mix(in srgb, var(--c) 38%, #fff); border-left: 4px solid var(--c); color: #1b2423; }
.tt-res.done { background: var(--c); color: var(--fg); }
.tt-res.absent { background: #f1f3f2; border-left: 4px solid var(--c); color: #7a8583; }
.tt-res.noshow { background: #fff; border: 2px dashed #c0392b; color: #c0392b; }
.tt-res:hover { filter: brightness(.95); box-shadow: 0 0 0 2px rgba(0, 0, 0, .15); }
/* 정담당 체크: 칸 오른쪽 좁은 띠, 같은 시간 본인 PT는 왼쪽으로 줄여 나란히 */
.tt-res { position: relative; }
.tt-res.shrink { margin-right: 44%; }
.tt-check { z-index: 3; justify-self: end; width: 42%; margin: 1px 2px 1px 0; padding: 1px 2px; font-size: 10px; font-weight: 700;
  background: var(--c); color: var(--fg); border: 1.5px solid #1b2423; border-radius: 4px; line-height: 1.1; }
.tt-check.done { opacity: .6; border-style: dashed; }
.chk-mark { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.lg.check { background: #6B7FD7; color: #fff; border: 1.5px solid #1b2423; }
.dir-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 8px; }
.sync-msg { font-size: 12px; padding: 8px 12px; border-radius: 10px; background: #e3edfa; color: #1f4f8f; margin-bottom: 10px; }
.chk-line { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; font-size: 14px !important; }
.field .chk-line input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.daychecks label[hidden] { display: none; }
.tt-sch.personal { background: repeating-linear-gradient(45deg, #eceff0, #eceff0 5px, #f8f9f9 5px, #f8f9f9 10px); color: #56625f; font-weight: 600; border: 1px solid #dfe5e3; }
.tt-sch.common { background: #dfe6e5; color: #33403e; font-size: 13px; border: 1px solid #c9d3d1; }
.tt-foot { position: sticky; bottom: 0; z-index: 3; border-top: 2px solid var(--line); border-left: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; background: var(--surface-2); }
.tt-foot.ds { border-left: 2px solid #9fb0ad; }
.tt-foot.label { left: 0; z-index: 5; font-size: 10px; color: var(--muted); }

/* ---------- 대시보드: 오늘 트레이닝 현황 ---------- */
.tl { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.tl-row { display: grid; grid-template-columns: 90px 1fr 160px; align-items: center; gap: 12px; }
.tl-name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.tl-bar { position: relative; height: 22px; background: var(--surface-2); border-radius: 6px; border: 1px solid var(--line); overflow: hidden; }
.tl-seg { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; --c: #8fa3a0; }
.tl-seg.booked { background: color-mix(in srgb, var(--c) 45%, #fff); border-left: 3px solid var(--c); }
.tl-seg.done { background: var(--c); }
.tl-seg.miss { background: #e3e7e6; }
.tl-seg.sch { background: repeating-linear-gradient(45deg, #dfe4e3, #dfe4e3 4px, #f4f6f5 4px, #f4f6f5 8px); }
.tl-info { font-size: 12px; color: var(--muted); line-height: 1.5; }
.tl-info b { color: var(--text); }
.tl-row { align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.tl-row:first-child { border-top: 0; padding: 0; }
.tl-name { padding-top: 2px; }
.tl-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-seg.chk { width: 4px; top: 0; bottom: 0; background: var(--c); border: 1px solid #1b2423; border-radius: 2px; }
.tl-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #c62828; }
.tchips { display: flex; flex-wrap: wrap; gap: 5px; }
.tchip { --c: #8fa3a0; --fg: #fff; border: 0; border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.tchip b { font-variant-numeric: tabular-nums; }
.tchip.booked { background: color-mix(in srgb, var(--c) 35%, #fff); border-left: 4px solid var(--c); color: #1b2423; }
.tchip.done { background: var(--c); color: var(--fg); }
.tchip.absent { background: #f1f3f2; color: #7a8583; border-left: 4px solid var(--c); }
.tchip.noshow { background: #fff; border: 1.5px dashed #c0392b; color: #c0392b; }
.tchip.check { background: #fff; border: 1.5px solid var(--c); box-shadow: inset 3px 0 0 var(--c); color: #1b2423; }
.tchip.sch { background: repeating-linear-gradient(45deg, #eceff0, #eceff0 4px, #f8f9f9 4px, #f8f9f9 8px); color: #56625f; }
.tchip.next { outline: 2px solid #1b2423; outline-offset: 1px; }
.tchip:hover { filter: brightness(.95); }
.chk-dot { width: 7px; height: 7px; transform: rotate(45deg); display: inline-block; border: 1px solid rgba(0, 0, 0, .35); }
.tl-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.tl-ticks span { position: absolute; transform: translateX(-50%); }

@media (max-width: 900px) {
  .tl-row { grid-template-columns: 64px 1fr; }
  .tl-info { grid-column: 2; margin-top: -6px; }
  .tt-legend { margin-left: 0; }
  .tt-scroll { max-height: calc(100vh - 120px); }
}

/* ---------- 평가 ---------- */
.modal-box.side.wide { width: min(680px, 100%); }
.ev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ev-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ev-card-head { display: flex; flex-direction: column; }
.ev-card .btn-sm { justify-content: center; }
.ev-last { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surface-2); border: 0; border-radius: 8px; padding: 6px 8px; text-align: left; }
.ev-last:hover { background: var(--primary-weak); }
.ev-pct { font-size: 22px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.ev-pct small { font-size: 12px; font-weight: 600; margin-left: 1px; }
.ev-list-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.ev-list-head h4 { margin: 0; font-size: 15px; }
.ev-list-head .seg button { padding: 4px 8px; font-size: 12px; }
.linklike { border: 0; background: none; padding: 0; text-align: left; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.linklike:hover { color: var(--primary); }
.ev-live { position: sticky; top: -18px; z-index: 2; background: var(--primary-weak); padding: 8px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 14px; }
.ev-live b { font-size: 18px; color: var(--primary); }
.ev-group { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 10px; margin: 0 0 10px; }
.ev-group legend { font-weight: 700; font-size: 13px; padding: 0 6px; color: var(--primary); }
.ev-item { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ev-item:last-child { border-bottom: 0; }
.ev-label { font-size: 13px; font-weight: 600; }
.ev-lr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-lr label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.ev-lr input, .ev-item > input { width: 90px; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ev-item > input[type=text] { width: 100%; }
.ev-scale span { padding: 5px 10px !important; font-size: 13px; }
.ev-side { font-size: 12px; font-weight: 700; color: var(--muted); }
.ev-lr .ev-scale + .ev-side { margin-left: 6px; }
.ev-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; background: var(--primary-weak); border-radius: 12px; margin-bottom: 12px; }
.ev-big { display: flex; align-items: center; gap: 8px; }
.ev-big .ev-pct { font-size: 34px; }
.ev-meta { font-size: 13px; color: #3c4846; line-height: 1.6; }
.ev-table td, .ev-table th { padding: 7px 10px; white-space: normal; font-size: 13px; }
/* 평가 보기 페이지 (바디맵 스타일) */
.gch { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 7px; font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--muted); }
.gch.big { min-width: 44px; height: 40px; font-size: 18px; border-radius: 10px; }
.g-A { background: #E3F2E1; color: #1E6B2B; } .g-B { background: #DDF2EE; color: #0F6357; } .g-C { background: #FCEFD6; color: #7A5300; }
.g-D { background: #FBE3D3; color: #973F0B; } .g-F { background: #FBE4E4; color: #9B1C1C; }
.sbar { display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.sbar i.g-A { background: #2E9E4F; } .sbar i.g-B { background: #1BA08C; } .sbar i.g-C { background: #E8A317; } .sbar i.g-D { background: #E07020; } .sbar i.g-F { background: #D93025; }
.g-bd-A { border-color: #9CCFA4 !important; } .g-bd-B { border-color: #8FD3C7 !important; } .g-bd-C { border-color: #EBC77A !important; } .g-bd-D { border-color: #EDAA7E !important; } .g-bd-F { border-color: #E9A0A0 !important; }
.ev-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.ev-tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.ev-tabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.dom-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dom-head h4 { font-size: 17px; margin: 0; flex: 1; }
.sec-sub { margin: 20px 0 8px; font-size: 13px; letter-spacing: .02em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #E8F0FB; color: #1F4E8C; font-size: 12px; font-weight: 700; }
.lr-t { width: 100%; border-collapse: collapse; }
.lr-t th { font-size: 12px; color: var(--muted); font-weight: 700; text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lr-t td { padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
.lr-t td b { display: block; font-weight: 600; }
.lr-t .c { text-align: center; white-space: nowrap; }
.lr-t th.dom { color: #1F4E8C; background: #E8F0FB; border-radius: 8px 8px 0 0; }
.lr-t td.dom { color: #1F4E8C; font-weight: 800; background: #F1F6FD; }
.lr-t tr.lr-sum td { background: var(--surface-2); font-weight: 700; }
.scard { margin: 12px 0 4px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.scard-top { display: flex; gap: 16px; align-items: center; }
.scard-top > .gch.big { min-width: 72px; height: 72px; font-size: 32px; border-radius: 16px; }
.scard-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.scard-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.scard-score b { font-size: 34px; font-weight: 800; line-height: 1; } .scard-score small { color: var(--muted); font-size: 15px; margin-left: 2px; }
.scard-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sbox { display: grid; justify-items: center; gap: 4px; padding: 10px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.sbox-v { font-weight: 800; }
.scard-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.icards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.icard { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.icard p { margin: 4px 0 0; color: var(--text); }
.icard-v { font-size: 13px; color: var(--muted); }
.photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.photo-slot { display: grid; place-items: center; text-align: center; min-height: 90px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--muted); padding: 6px; }
.photo-slot.sm { min-height: 64px; margin: 6px 0; }
.pcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pcat { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.pcat-h { display: flex; gap: 10px; align-items: center; }
.pcat-r { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.pcat-r > span:first-child { flex: 1 1 120px; }
.cap-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.cap { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.cap-align { background: #E5F4E3; color: #2F6B25; } .cap-rom { background: #E3EDFB; color: #1F4E8C; } .cap-stab { background: #DFF3EF; color: #0F6357; }
.cap-coord { background: #EEE6FA; color: #5B3A99; } .cap-str { background: #FCEFD6; color: #7A5300; } .cap-perf { background: #FBE3D3; color: #973F0B; } .cap-react { background: #FBE4E4; color: #9B1C1C; }
.phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.phase-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; align-content: start; }
.phase-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.phase-h b { font-size: 15px; }
.caps { display: flex; flex-wrap: wrap; gap: 4px; }
.phase-d { margin: 0; font-size: 13px; color: var(--muted); }
.mbox { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; }
.mbox span.muted { display: block; }
.mbox-v { font-size: 20px; font-weight: 800; }
.mbox-st { font-size: 16px; width: 18px; text-align: center; }
.ptype { justify-self: start; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); }
.mrow { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; font-size: 13px; padding-top: 6px; border-top: 1px dashed var(--line); }
.mrow .sbar { grid-column: 1 / -1; }
.mrow.qual { grid-template-columns: 1fr auto; }
.recent-tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rt { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.rt.off { opacity: .55; }
a.bm-dom { color: inherit; } a.bm-dom:hover { border-color: var(--primary); }
.ev-pick { display: grid; gap: 8px; }
.ev-pick-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; }
.ev-pick-item .muted { grid-column: 1; } .ev-pick-item > span:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.ev-pick-item:hover { border-color: var(--primary); }
@media (max-width: 600px) { .scard-top > .gch.big { min-width: 54px; height: 54px; font-size: 24px; } .scard-score b { font-size: 26px; } .lr-t td { font-size: 13px; padding: 8px 4px; } .mbox-v { font-size: 16px; } }

/* 변화 · 리포트 */
.cmp-sec { margin-bottom: 22px; }
.cmp-sec h4 { margin: 0 0 10px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.round-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rs { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.rs-arrow { color: var(--muted); font-size: 18px; }
.trend-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.trend { width: 100%; max-width: 680px; display: block; }
.tr-line { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.tr-pt { fill: var(--primary); }
.tr-val { font-size: 12px; font-weight: 800; fill: var(--text); }
.rd-before { fill: none; stroke: #9AA5A3; stroke-width: 2; stroke-dasharray: 5 4; }
.cmp-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.cmp-head, .cmp-dom > summary { display: grid; grid-template-columns: minmax(90px, 1.4fr) 1fr 1fr 0.9fr 0.8fr; gap: 6px; align-items: center; }
.cmp-head { font-size: 12px; color: var(--muted); padding: 0 10px 4px; }
.cmp-dom { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; }
.cmp-dom > summary { cursor: pointer; padding: 8px 10px; list-style: none; }
.cmp-dom > summary::-webkit-details-marker { display: none; }
.cmp-dom[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: 10px 10px 0 0; }
.cmp-t { margin: 0; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.top-grid h5 { margin: 0 0 6px; font-size: 14px; }
.top3 { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
/* 보고서 미리보기 (A4 종이 모양) */
.rp-preview { max-height: 70vh; overflow-y: auto; background: var(--surface-2); padding: 12px; border-radius: 10px; }
.rp-page { background: #fff; color: #1b2423; max-width: 210mm; margin: 0 auto 14px; padding: 18px 22px 30px; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0, 0, 0, .06); position: relative; font-size: 13px; }
.rp-page .rp-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #0e6b67; border-bottom: 2px solid #0e6b67; padding-bottom: 6px; }
.rp-page .rp-title { font-size: 22px; margin: 12px 0 4px; }
.rp-meta { color: #6c7876; font-size: 12px; margin: 0 0 12px; }
.rp-h2 { font-size: 16px; margin: 14px 0 8px; padding-left: 8px; border-left: 4px solid #0e6b67; }
.rp-overall { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.rp-radar .radar { max-width: 260px; }
.rp-doms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rp-doms > div { display: flex; justify-content: space-between; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.rp-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; margin: 8px 0; }
.rp-top3 { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rp-top3 h3, .rp-comment h3 { font-size: 14px; margin: 0 0 6px; }
.rp-top3 ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rp-comment { margin-top: 12px; }
.rp-comment textarea { width: 100%; font: inherit; }
.rp-ctext { white-space: pre-wrap; min-height: 40mm; border: 1px solid #d9e0de; border-radius: 6px; padding: 8px; }
.rp-comment.tall .rp-ctext { min-height: 90mm; }
.rp-t { font-size: 12px; }
.rp-disc { font-size: 11px; color: #6c7876; margin-top: 12px; }
.rp-pfoot { margin-top: 14px; padding-top: 6px; border-top: 1px solid #d9e0de; font-size: 11px; color: #6c7876; text-align: right; }
@media (max-width: 600px) { .cmp-head, .cmp-dom > summary { grid-template-columns: minmax(70px, 1.2fr) 1fr 1fr 0.8fr; } .cmp-head span:last-child, .cmp-dom > summary > span:last-child { display: none; } .rp-doms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 바디맵 평가 */
.bm-g { min-width: 22px; justify-content: center; font-weight: 800; }
.ev-gl { margin-left: 6px; font-weight: 400; }
.ev-memo { flex: 1 1 160px; min-width: 0; }
.ev-grade { flex-wrap: wrap; }
.ev-auto { font-weight: 800; }
.tag-temp { display: inline-block; font-size: 11px; font-weight: 700; color: #8A5A12; background: #FDF4E5; border: 1px solid #F3D9A8; border-radius: 6px; padding: 0 5px; }
.sig { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sig.green { background: #E6F4EA; color: #1E7B34; } .sig.amber { background: #FFF4E0; color: #9A5B00; } .sig.red { background: #FDE8E8; color: #B42318; }
.bm-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 0; font-size: 13px; }
.ev-dash-title { font-size: 16px; }
.bm-overall { display: flex; gap: 18px; align-items: center; }
.bm-pct { font-size: 44px; font-weight: 800; line-height: 1; }
.bm-pct small { font-size: 18px; }
.bm-pct.green { color: #1E7B34; } .bm-pct.amber { color: #B26A00; } .bm-pct.red { color: #B42318; } .bm-pct.gray { color: var(--muted); }
.bm-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.bm-domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bm-dom { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.bm-dom.off { opacity: .55; }
.bm-dom .prog { width: 100%; }
.bm-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.bm-box { display: grid; gap: 4px; justify-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.radar { width: 100%; max-width: 300px; display: block; margin: 0 auto; }
.rd-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.rd-target { fill: none; stroke: var(--muted); stroke-dasharray: 4 3; stroke-width: 1; }
.rd-val { fill: rgba(16, 122, 106, .18); stroke: var(--primary); stroke-width: 2; }
.rd-lbl { font-size: 10px; fill: var(--text); font-weight: 700; }
.bm-cat td { font-weight: 700; background: var(--surface-2); }
.pyr { display: grid; justify-items: center; gap: 4px; margin: 6px 0 8px; }
.pyr-step { width: var(--w); min-width: 0; display: grid; gap: 1px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); text-align: center; font-size: 12px; }
.pyr-step span { color: var(--muted); font-size: 11px; }
.pyr-step.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pyr-step.on span { color: rgba(255, 255, 255, .85); }
.bm-xy { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.xy-map { width: 150px; flex: none; }
.xy-pt { fill: var(--primary); }
.pitch { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pitch-ph { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }
.pitch-row { display: grid; grid-template-columns: 1fr; gap: 2px; }
.pbar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--muted); }
.pbar i.ok { background: #2E9E4F; } .pbar i.warn { background: #E8A317; } .pbar i.bad { background: #D93025; }
.ev-table tr.ev-grp th { background: var(--surface-2); text-align: left; font-weight: 700; color: var(--primary); }
.up { color: #1d7a42; font-weight: 700; }
.down { color: #b93b1c; font-weight: 700; }
.ev-comment { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--primary); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 13px; }
.ev-comment p { margin: 4px 0 0; }
@media (max-width: 600px) { .ev-item { grid-template-columns: 1fr; gap: 4px; } }
#printArea { display: none; }
.eval-tag { display: inline-block; font-size: 9px; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 4px;
  background: #1b2423; color: #fff; margin-right: 3px; vertical-align: 1px; letter-spacing: -.02em; }
.eval-notice { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: #fbf0d9; color: #6b4705; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.dir-line.eval-need { background: #fbf0d9; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px 8px; }
.sec-head h2 { font-size: 15px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.small-pad { padding: 20px; box-shadow: none; border: 0; }
.list-select { padding: 4px !important; }
.list-select option { padding: 5px 6px; }

/* ---------- 회원 상세 페이지 ---------- */
.mhead { display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.mhead .back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.mhead .back:hover { color: var(--primary); }
.mhead-main { flex: 1; min-width: 220px; }
.mhead-main h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.mhead-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 13px; color: #3c4846; }
.mlayout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.mnav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 16px; }
.mtab { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 9px; font-weight: 600; color: #3c4846; }
.mtab:hover { background: var(--surface-2); }
.mtab.on { background: var(--primary); color: #fff; }
.mtab .eval-tag { margin-left: auto; }
.cnt { margin-left: auto; font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.mtab.on .cnt { background: rgba(255, 255, 255, .25); color: #fff; }
.mtab-sub { display: flex; flex-direction: column; margin: 0 0 4px 14px; border-left: 2px solid var(--line); }
.mtab-sub a { display: flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 13px; color: #3c4846; border-radius: 0 8px 8px 0; }
.mtab-sub a:hover { background: var(--surface-2); }
.mtab-sub a.on { color: var(--primary); font-weight: 700; background: var(--primary-weak); }
.mbody { padding: 18px 20px; min-height: 420px; }
.tab-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tab-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-h { font-size: 15px; margin: 18px 0 8px; }
.ov-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.ov-card { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ov-card span { font-size: 12px; color: var(--muted); font-weight: 600; }
.ov-card b { font-size: 14px; }
.ov-card:hover { border-color: var(--primary); }
.inj-list { display: grid; gap: 8px; }
.inj-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.inj-card:hover { border-color: var(--primary); }
.inj-card p { margin: 4px 0 0; font-size: 13px; }
.proto-text { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical; }

/* 회원정보 양식 (개요) */
.sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.sheet-col { display: flex; flex-direction: column; gap: 12px; }
.sheet { border: 1px solid #cfd8d6; border-radius: 10px; overflow: hidden; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #e7ecea; padding: 8px 12px; font-weight: 800; font-size: 14px; border-left: 4px solid #1b2423; }
.sheet dl { display: grid; grid-template-columns: 110px 1fr; margin: 0; }
.sheet dt, .sheet dd { padding: 7px 12px; border-top: 1px solid #edf1f0; font-size: 13px; margin: 0; }
.sheet dt { background: var(--surface-2); color: #3c4846; text-align: center; font-weight: 600; }
.sheet dd { overflow-wrap: anywhere; }
.sheet-t { width: 100%; font-size: 13px; }
.sheet-t th, .sheet-t td { padding: 7px 10px; white-space: normal; }
.pad { padding: 10px 12px; margin: 0; }
/* 입력 창 구역 */
.form-group { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 2px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.form-group legend { font-weight: 800; font-size: 13px; padding: 0 6px; color: var(--primary); }
.form-group .field:has(textarea) { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-group { grid-template-columns: 1fr; } }

/* 자료실 · 운동 프로그램 */
.lib-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
.lib-tabs.plain { padding: 0 0 10px; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.on .cnt { background: rgba(255, 255, 255, .25); color: #fff; }
.chip .cnt { margin-left: 2px; }
.lib-add { display: grid; gap: 10px; }
.lib-add-opt { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.lib-add-opt:hover { border-color: var(--primary); background: var(--primary-weak); }
.lib-add-opt span { color: var(--muted); font-size: 13px; }
.pick-list { list-style: none; margin: 0; padding: 0; }
.pick-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.prog-wrap { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; min-width: 0; }
.prog-title { background: #0f2a5c; color: #fff; text-align: center; font-weight: 800; font-size: 17px; padding: 8px; border-radius: 8px; }
.prog-info { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.prog-goals { background: #f8e3e3; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.prog-goals ul { margin: 4px 0 0; padding-left: 18px; }
.prog-rx { width: 100%; font-size: 13px; border: 1px solid #cfd8d6; border-radius: 8px; border-collapse: separate; overflow: hidden; }
.prog-rx th { background: #dde7f3; padding: 5px 6px; white-space: nowrap; }
.prog-rx td { padding: 6px; text-align: center; background: #fff; border-top: 1px solid #cfd8d6; }
.prog-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.prog-tabs .chip:not(.on) { background: var(--c, var(--surface)); }
.prog-t { --c: #fff2cc; width: auto; min-width: 100%; border-collapse: collapse; font-size: 12px; }
.prog-t th { background: #0f2a5c; color: #fff; padding: 5px 6px; border: 1px solid #2b467a; white-space: nowrap; }
.prog-t .date-row th { background: #fff; color: #1b2423; border-color: #cfd8d6; }
.prog-t td { border: 1px solid #d5dcda; padding: 0; white-space: nowrap; }
.prog-t td:first-child { text-align: center; padding: 0 6px; background: #fff; }
.prog-t td.ex { background: var(--c); font-weight: 700; padding: 6px 10px; text-align: center; min-width: 130px; }
.prog-t td.pc { background: #eef0f0; min-width: 44px; text-align: center; padding: 0; }
.prog-t td.pc input, .prog-t .date-row input { width: 100%; min-width: 44px; border: 0; background: transparent; text-align: center; font: inherit; padding: 6px 2px; }
.prog-t .date-row input { font-size: 11px; min-width: 110px; }
.prog-t td.pc input:focus { outline: 2px solid var(--primary); background: #fff; }
.prog-t.total td.pc { padding: 6px 4px; }
.prog-t.dp { min-width: 0; width: 100%; }
.prog-t.dp td.pc input { min-width: 60px; }
.mp-card, .ref-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.mp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-start { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.mp-start input { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.dprog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.form-group.one { grid-template-columns: 1fr; }
.prog-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 10px; }
.prog-day { background: var(--c); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.prog-day[hidden] { display: none; }
.prog-day input, .prog-day textarea { font: inherit; border: 1px solid #cfd8d6; border-radius: 8px; padding: 6px 8px; background: #fff; width: 100%; }
.prog-day .day-name { font-weight: 700; }
@media (max-width: 700px) { .prog-info { grid-template-columns: 1fr; } }

/* Daily */
.phase { --c: #8fa3a0; display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; background: var(--c); color: #fff; }
.phase.off { background: #eef1f0; color: #a3adab; }
.phases { display: flex; gap: 3px; }
.prog { display: inline-block; width: 80px; height: 8px; background: #eef1f0; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.prog i { display: block; height: 100%; background: var(--primary); }
.daily-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; }
.daily-head > div { display: flex; flex-direction: column; gap: 3px; }
.dlist { display: flex; flex-direction: column; gap: 10px; }
.dcard { display: grid; grid-template-columns: 92px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dcard.empty-d { border-style: dashed; }
.dcard-side { background: var(--surface-2); padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.dcard-side b { font-size: 16px; }
.dcard-main { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dcond { font-size: 13px; color: #3c4846; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dn { margin-bottom: 6px; font-size: 13px; }
.dn p { margin: 2px 0 0; }
.dx { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 6px; font-size: 13px; }
.dx-g { --c: #8fa3a0; display: inline-block; min-width: 92px; padding: 2px 8px; border-radius: 6px; background: var(--c); color: #fff; font-weight: 800; font-size: 12px; text-align: center; }
.dx-i { background: var(--surface-2); padding: 1px 7px; border-radius: 5px; }
.dx-etc { flex-basis: 100%; padding-left: 100px; color: #1b2423; font-weight: 600; }
.dx-edit { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.dx-edit:last-child { border-bottom: 0; }
.dx-edit .checks { padding: 2px 0; }
.etc-inp { grid-column: 2; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cond-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cond-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; }
.cond-row input { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100%; }
@media (max-width: 900px) {
  .mlayout { grid-template-columns: minmax(0, 1fr); }
  .mnav { position: static; flex-direction: row; overflow-x: auto; }
  .mtab { white-space: nowrap; }
  .mtab-sub { display: none; }
  .dcard { grid-template-columns: 1fr; }
  .dcard-side { flex-direction: row; justify-content: flex-start; gap: 8px; }
  .dx-etc { padding-left: 0; }
  .dx-edit { grid-template-columns: 1fr; }
  .etc-inp { grid-column: 1; }
  .cond-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 인쇄 ---------- */
@media print {
  body { background: #fff; }
  /* 양식 문서: A4 미리보기만 */
  body.print-a4 * { visibility: hidden; }
  body.print-a4 .a4, body.print-a4 .a4 * { visibility: visible; }
  body.print-a4 .a4 { position: fixed; inset: 0; width: 210mm; height: 297mm; border: 0; border-radius: 0; box-shadow: none; font-size: 11pt; }
  /* 평가 리포트: A4 한 장 */
  body.print-report > *:not(#printArea) { display: none !important; }
  body.print-report #printArea { display: block; }
  .rp { padding: 14mm 14mm; font-size: 10.5pt; color: #1b2423; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-top { display: flex; justify-content: space-between; font-size: 9pt; font-weight: 700; color: #0e6b67; border-bottom: 2px solid #0e6b67; padding-bottom: 6px; }
  .rp-title { font-size: 18pt; margin: 14px 0 10px; }
  .rp .ev-table { width: 100%; border-collapse: collapse; }
  .rp .ev-table th, .rp .ev-table td { border: 1px solid #d9e0de; padding: 5px 8px; }
  .rp-foot { margin-top: 16px; padding-top: 6px; border-top: 1px solid #d9e0de; font-size: 8.5pt; color: #6c7876; text-align: right; }
  /* 평가 보고서(여러 장): 영역마다 새 페이지, 표는 줄 단위로만 넘김 */
  .rp.rp-print { padding: 0; }
  .rp-print .rp-page { break-after: page; page-break-after: always; padding: 12mm 14mm 16mm; min-height: 268mm; position: relative; box-shadow: none; border: 0; margin: 0; }
  .rp-print .rp-page:last-child { break-after: auto; page-break-after: auto; }
  .rp-print .rp-pfoot { position: absolute; left: 14mm; right: 14mm; bottom: 6mm; }
  .rp-print tr, .rp-print .rp-top3, .rp-print .rp-comment { break-inside: avoid; page-break-inside: avoid; }
  /* 트레이너 월간 리포트: 트레이너마다 새 페이지 */
  .trp-print { padding: 10mm 12mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .trp-print .trp { break-after: page; page-break-after: always; }
  .trp-print .trp:last-child { break-after: auto; page-break-after: auto; }
  .trp-print tr { break-inside: avoid; page-break-inside: avoid; }
  /* PT 시간표: 가로 방향 한 장 */
  body.print-tt .sidebar, body.print-tt .topbar, body.print-tt .page-head, body.print-tt .kpis,
  body.print-tt .tt-toolbar .seg, body.print-tt .tt-toolbar .btn, body.print-tt .tt-toolbar .icon-btn, body.print-tt .chip { display: none !important; }
  body.print-tt .app { display: block; }
  body.print-tt main { max-width: none; padding: 0; gap: 4px; }
  body.print-tt .panel { box-shadow: none; border: 0; }
  body.print-tt .tt-wrap { page: tt; }
  body.print-tt .tt-scroll { overflow: visible; max-height: none; }
  body.print-tt .tt-grid { min-width: 0; font-size: 7pt; grid-template-columns: 34px repeat(var(--cols), minmax(0, 1fr)) !important;
    grid-template-rows: 18px 16px repeat(var(--rows), 11px) 14px !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-tt .tt-grid > div { position: static !important; }
  body.print-tt .tt-day, body.print-tt .tt-tr { height: auto; font-size: 7pt; }
}
@page { size: A4; margin: 0; }
@page tt { size: A3 landscape; margin: 8mm; }
