:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2433; --muted: #6b7385; --line: #e3e6eb;
  --brand: #1f5f8b; --brand-soft: #e7f0f7; --ok: #1d7a4f; --ok-soft: #e4f4ec;
  --warn: #9a6a00; --warn-soft: #fff4d6; --bad: #b3261e; --bad-soft: #fde7e5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.5 "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", system-ui, sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
header.top { background: #17324a; color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 20px; min-height: 52px; position: sticky; top: 0; z-index: 10; }
header.top .logo { font-weight: 700; white-space: nowrap; }
header.top nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; align-items: stretch; }
header.top nav a { color: #cfe0ee; padding: 15px 11px; white-space: nowrap; border-bottom: 3px solid transparent; }
header.top nav a.on, header.top nav a:hover { color: #fff; border-bottom-color: #6fb3e0; text-decoration: none; }
header.top .me { display: flex; gap: 10px; align-items: center; white-space: nowrap; font-size: 13px; color: #cfe0ee; }
header.top .me a { color: #cfe0ee; }
header.top .me button { background: none; border: 1px solid #4b6d89; color: #cfe0ee; border-radius: 6px; padding: 3px 10px; cursor: pointer; font: inherit; }
main { max-width: 1320px; margin: 0 auto; padding: 20px; }
h1 { font-size: 20px; margin: 4px 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.sub { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.kpi .n { font-size: 26px; font-weight: 700; }
.kpi .l { color: var(--muted); font-size: 13px; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
th { background: #f0f3f6; font-weight: 600; font-size: 13px; white-space: nowrap; position: sticky; top: 52px; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #fafbfc; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tablewrap table th { top: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-brand { background: var(--brand-soft); color: var(--brand); }
/* 계약 · 회원 상태 색 (2026-10-26): 유효 초록 · 대기 파랑 · 휴회 노랑 · 만료 빨강 · 양도 · 양수 보라 · 무효 · 탈회 회색 줄 긋기 */
.badge[class*="st-"] { font-weight: 600; }
.st-유효 { background: var(--ok-soft); color: var(--ok); }
.st-대기 { background: var(--brand-soft); color: var(--brand); }
.st-휴회 { background: var(--warn-soft); color: var(--warn); }
.st-만료 { background: var(--bad-soft); color: var(--bad); }
.st-양도, .st-양수 { background: #f0ecfb; color: #6b4fbb; }
.st-무효, .st-탈회 { background: #e9ebef; color: #5b6475; text-decoration: line-through; }
.row-warn td { background: var(--warn-soft) !important; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.notice { background: var(--warn-soft); color: #5c4300; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
form.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
input, select, textarea { font: inherit; padding: 6px 9px; border: 1px solid #cdd2d9; border-radius: 6px; background: #fff; }
textarea { width: 100%; min-height: 70px; }
button, .btn { font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; display: inline-block; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost, button.ghost { background: #fff; color: var(--brand); }
.btn.danger, button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.form { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 14px; align-items: center; max-width: 760px; }
.form label { color: var(--muted); }
.form input[type=text], .form input[type=date], .form input[type=password], .form select { width: 100%; }
.actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 18px; max-width: 760px; }
.mini { font-size: 12px; color: var(--muted); }
.diff-bad { color: var(--bad); font-weight: 600; }
.diff-ok { color: var(--ok); }
.center { max-width: 380px; margin: 80px auto; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
.spark div { flex: 1; background: #8fb9d8; border-radius: 2px 2px 0 0; min-height: 1px; position: relative; }
.spark div.zero { background: #e3e6eb; }
.spark-l { display: flex; gap: 3px; font-size: 10px; color: var(--muted); }
.spark-l span { flex: 1; text-align: center; overflow: hidden; }
.stack > * + * { margin-top: 16px; }
.timeline td:first-child { white-space: nowrap; }
.wrap { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
/* 직원 계정·권한 표 */
table.perm th.pc { text-align: center; font-size: 12px; white-space: normal; word-break: keep-all; min-width: 62px; line-height: 1.3; cursor: help; }
table.perm td.pc { text-align: center; vertical-align: middle; }
table.perm td { vertical-align: middle; }
table.perm input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
table.perm input[type=checkbox]:disabled { cursor: not-allowed; }
table.perm .yes { color: var(--ok); font-weight: 700; }
table.perm .no { color: #c4c9d1; }
table.perm tr.off td { color: var(--muted); background: #fafafa; }
/* 권한 트리(묶음 → 화면 → 세부 권한) */
table.ptree { width: auto; }
table.ptree td.pt-name, table.ptree tr.pt-g td:first-child { min-width: 380px; max-width: 560px; }
table.ptree th.pc { text-align: center; font-size: 12px; min-width: 76px; }
table.ptree td.pc { text-align: center; vertical-align: middle; }
table.ptree tr.pt-g td { background: #f7f9fb; border-top: 1px solid var(--line); }
table.ptree td.pt-name { padding-left: 26px; }
table.ptree td.pt-sub { padding-left: 50px; color: #4b5563; }
table.ptree input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
table.ptree input[type=checkbox]:disabled { cursor: not-allowed; }
table.ptree .yes { color: var(--ok); font-weight: 700; }
table.ptree .no { color: #c4c9d1; }
.b-owner { background: #17324a; color: #fff; }
.dirty td { background: #fffbea !important; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
/* 위 메뉴: 카테고리 + 소메뉴 */
header.top nav .dd { position: relative; }
header.top nav .dd-btn { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #cfe0ee;
  padding: 15px 11px; font: inherit; cursor: pointer; white-space: nowrap; }
header.top nav .dd-btn::after { content: "▾"; font-size: 10px; margin-left: 5px; opacity: .7; }
header.top nav .dd.on > .dd-btn, header.top nav .dd:hover > .dd-btn, header.top nav .dd.open > .dd-btn { color: #fff; border-bottom-color: #6fb3e0; }
header.top nav .dd-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; padding: 6px; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(15, 30, 50, .18); }
header.top nav .dd:hover > .dd-menu, header.top nav .dd.open > .dd-menu { display: block; }
header.top nav .dd-menu a { display: block; color: var(--ink); padding: 8px 12px; border: 0; border-radius: 6px; white-space: nowrap; }
header.top nav .dd-menu a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
header.top nav .dd-menu a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
header.top nav .dd-menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
@media (max-width: 920px) {
  header.top { gap: 10px; padding: 0 10px; }
  header.top .logo, header.top .me .role { display: none; }
  header.top nav > a, header.top nav .dd-btn { padding: 15px 8px; }
}
.evl { margin-right: 10px; white-space: nowrap; }
.evl input { vertical-align: -2px; margin-right: 3px; }
/* 레슨 스케줄 */
table.sched th { text-align: center; min-width: 120px; }
table.sched td { padding: 4px 5px; min-width: 120px; }
table.sched .duty { font-size: 11px; color: #9aa1ad; padding: 1px 4px; }
.chip { font-size: 12px; border-radius: 6px; margin: 2px 0; background: var(--brand-soft); border-left: 3px solid var(--brand); }
.chip > summary { cursor: pointer; padding: 3px 6px; list-style: none; white-space: nowrap; }
.chip > summary::-webkit-details-marker { display: none; }
.chip[open] { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); padding-bottom: 6px; position: relative; z-index: 2; }
.chip[open] > div, .chip[open] > form { padding: 0 6px; }
.chip .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.k-HPT { background: #f0ecfb; border-left-color: #6b4fbb; }
.chip.k-2PT { background: #e3f4f6; border-left-color: #0f7c8a; }   /* 2:1 PT */
.chip.k-LS { background: var(--ok-soft); border-left-color: var(--ok); }
.chip.k-OT { background: var(--warn-soft); border-left-color: var(--warn); }
.chip.k-기타 { background: #f4f4f4; border-left-color: #8a8a8a; }   /* 수업 등록 '직접 입력' */
.chip.s-예정 { opacity: .75; border-left-style: dashed; }
.chip.s-노쇼 .st, .chip.s-취소 .st { color: var(--bad); font-size: 11px; }
.chip.s-취소 > summary { text-decoration: line-through; color: var(--muted); }
details.upl > summary { cursor: pointer; }
.diff-warn { color: var(--warn); }
tr.off td { color: var(--muted); }
/* 수업 완료 처리 */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 12px; }
.tabs a { padding: 5px 11px; border-radius: 999px; background: #eef0f3; color: var(--ink); font-size: 13px; }
.tabs a.on { background: var(--brand); color: #fff; }
.tabs a:hover { text-decoration: none; filter: brightness(.96); }
.dot { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font-size: 11px; text-align: center; }
.addf { margin: 0 0 12px; padding: 10px 14px; }
.mk { font-size: 11px; color: var(--muted); }
.mk.ok { color: var(--ok); font-weight: 700; }
.mk.bad { color: var(--bad); }
.mk.warn { color: #fff; background: var(--warn); border-radius: 4px; padding: 0 4px; }
.chip.od { border-left-color: var(--warn); background: var(--warn-soft); }
.chip.s-완료 { opacity: 1; }
.qb { display: flex; gap: 4px; margin: 6px 0 2px; flex-wrap: wrap; }
.qb button { font-size: 12px; padding: 2px 9px; background: #fff; color: var(--ink); border: 1px solid var(--line); }
.qb button.q-ok.on, .qb button.q-ok:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.qb button.q-bad.on, .qb button.q-bad:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.qb button.q-mute.on { background: #6b7385; border-color: #6b7385; color: #fff; }
.qb.big button { font-size: 14px; padding: 8px 14px; }
.qm { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.qm input, .qm select { font-size: 12px; padding: 2px 5px; }
.qm button { font-size: 12px; padding: 2px 8px; }
.mylist { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.lrow { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 10px; padding: 10px 12px; }
.lrow.k-HPT { border-left-color: #6b4fbb; } .lrow.k-2PT { border-left-color: #0f7c8a; } .lrow.k-LS { border-left-color: var(--ok); } .lrow.k-OT { border-left-color: var(--warn); }
.lrow.k-기타 { border-left-color: #8a8a8a; }
/* 레슨 스케줄 수업 칸의 '수업 수정' (눈에 띄게) */
details.sedit { margin-top: 6px; }
details.sedit > summary { display: inline-block; cursor: pointer; padding: 3px 10px; border: 1px solid var(--brand); border-radius: 6px;
  color: var(--brand); background: var(--brand-soft); }
details.sedit[open] > summary { margin-bottom: 6px; }
.lrow.od { background: var(--warn-soft); }
.lrow.s-완료 { background: var(--ok-soft); }
.lrow.s-취소 .ln > b { text-decoration: line-through; color: var(--muted); }
.lrow .lt { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 58px; }
.lrow .ln { flex: 1; min-width: 0; }
.lrow .la .qb { margin: 0; }
@media (max-width: 640px) {
  .lrow { flex-wrap: wrap; }
  .lrow .la { width: 100%; }
  .lrow .la .qb button { flex: 1; }
  main { padding: 12px; }
}
@media (max-width: 640px) {
  header.top { position: static; gap: 6px; padding: 0 6px; }
  header.top nav > a, header.top nav .dd-btn { padding: 10px 7px; font-size: 13px; }
  header.top .me { font-size: 12px; }
  header.top .me button { padding: 2px 6px; }
  th { top: 0; }
}
/* 회원 상세: 지금 이용 현황 */
.nowcard { display: flex; flex-direction: column; gap: 4px; }
.nowcard .nh { font-size: 13px; color: var(--muted); font-weight: 600; }
.nowcard .nb { margin: 2px 0 4px; }
.nowcard .nb .big { font-size: 28px; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.nowcard .nb.warn .big { color: var(--warn); }
.nowcard .nb.bad .big { color: var(--bad); }
/* 만료 안내 */
.weekstrip { display: flex; gap: 6px; flex-wrap: wrap; }
.weekstrip a { flex: 1; min-width: 92px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); }
.weekstrip a:hover { text-decoration: none; border-color: var(--brand); }
.weekstrip a.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.weekstrip a.all b { color: var(--ok); }
tr.row-done td { background: var(--ok-soft); }
.mk-sel { padding: 3px 6px; border-color: var(--warn); }
.mk-sel.done { border-color: var(--ok); color: var(--ok); font-weight: 600; }
/* 결제·상품별 조회 */
.payf { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.payf .pf-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.payf .pf-row > label { width: 92px; color: var(--muted); font-size: 13px; }
.payf .presets button { padding: 3px 9px; font-size: 12px; }
.sandbox-bar { background: #fff1c9; color: #6b4e00; text-align: center; font-size: 13px; padding: 6px 12px; border-bottom: 1px solid #ecd58a; }
.sched tr.grp th { text-align: center; font-size: 12px; letter-spacing: .02em; color: var(--muted, #6b7785); background: #f3f6f9; }
.sched tr.grp th.g-오전 { background: #fff7e6; color: #8a5a00; }
.sched tr.grp th.g-오후 { background: #eaf2fb; color: #2b5a8a; }
.sched .gs { border-left: 3px solid #c9d3dd !important; }
.tabs .tabgrp { align-self: center; padding: 0 4px 0 10px; color: var(--muted, #6b7785); }
.tpick select { padding: 4px 4px; }

/* 회원 상세 계약·결제 이력: 가로 스크롤 없이 칸 안에서 줄바꿈 */
table.hist { table-layout: fixed; }
table.hist td { word-break: keep-all; overflow-wrap: anywhere; }
/* 스케줄 칸 고르기 */
table.picking { user-select: none; }              /* 끌어서 여러 칸 고르기 (늘 켜짐 — 휴대폰은 끌면 화면이 움직이게 touch-action은 그대로) */
table.picking td.cell, table.picking td.hcell, table.picking th[data-t] { cursor: cell; }
table.picking td.cell:hover { outline: 1px dashed var(--brand); outline-offset: -2px; }
td.cell.psel { background: var(--brand-soft) !important; box-shadow: inset 0 0 0 2px var(--brand); }
/* 상품·기간 설정 → 패키지 추가·수정 칸: 라벨은 위, 칸은 한 줄로 넓게 · 가격은 입주사/개인 두 줄 표 */
.bgrid { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr 1.1fr 0.9fr; gap: 12px 16px; align-items: end; }
.bgrid .bf { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.bgrid .bf input, .bgrid .bf select { width: 100%; color: var(--ink); }
.bgrid .bf-row { display: flex; gap: 6px; }
.bgrid .bf-row input { width: 70px; flex: none; }
.bf-title { margin: 16px 0 6px; font-size: 13px; font-weight: 600; }
table.bprice { width: auto; }
table.bprice td, table.bprice th { padding: 4px 8px; }
table.bprice input { width: 130px; text-align: right; }
table.bprice td.op { color: var(--muted); padding: 4px 2px; }
.bactions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
@media (max-width: 1000px) { .bgrid { grid-template-columns: 1fr 1fr; } }
/* 등록 화면 위 탭 (회원 등록 / 일일권 등록) */
.regtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 14px; }
.regtabs a { padding: 8px 16px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.regtabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
/* 상품·기간 설정: 종류별 접는 칸 */
details.pcat { padding: 0; }
details.pcat > summary { cursor: pointer; padding: 14px 18px; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.pcat > summary::-webkit-details-marker { display: none; }
details.pcat > summary::before { content: '▸'; color: var(--muted); font-size: 12px; width: 12px; }
details.pcat[open] > summary::before { content: '▾'; }
details.pcat[open] > summary { border-bottom: 1px solid var(--line); }
details.pcat > form, details.pcat > div, details.pcat > h3 { margin-left: 18px; margin-right: 18px; }
details.pcat > form:last-child, details.pcat > div:last-child { margin-bottom: 16px; }
table.ptable tr.off td { color: var(--muted); }
table.ptable tr.off td input:not([type=checkbox]) { opacity: .6; }
input.pprice { width: 110px; text-align: right; }
form.padd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin: 4px 18px 16px; background: #f7f9fb; border-radius: 8px; font-size: 13px; }
/* 회원 등록: 회원 찾기 결과 목록 */
.presults { position: absolute; top: 100%; left: 0; z-index: 20; width: 640px; max-height: 360px; overflow: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.08); margin-top: 4px; }
.presults a { display: block; padding: 7px 10px; color: var(--ink); border-bottom: 1px solid var(--line); }
.presults a:hover { background: var(--brand-soft); }
.presults a:last-child { border-bottom: none; }
/* 분실물 등록 칸: 라벨은 위, 칸은 넓게 */
.lgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.lgrid .bf { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.lgrid .bf input, .lgrid .bf select { width: 100%; color: var(--ink); }
@media (max-width: 1000px) { .lgrid { grid-template-columns: 1fr 1fr; } }
/* 저장 전 확인 창 (base.html): 엔터 한 번에 바로 저장되지 않게 */
dialog.ask { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; width: calc(100% - 32px); max-width: 420px; color: var(--ink); box-shadow: 0 8px 28px rgba(23, 50, 74, .18); }
dialog.ask::backdrop { background: rgba(23, 50, 74, .25); }
dialog.ask h2 { margin: 2px 0 8px; }
dialog.ask p { margin: 0 0 16px; }
dialog.ask .ask-btns { display: flex; justify-content: flex-end; gap: 8px; }
dialog.ask.wide { max-width: 640px; }
dialog.ask th { position: static; }

/* 레슨 스케줄 한눈에 보기 (2026-10-26): 행·열 고정 없이 한 화면에 — 화면 폭 전체 · 06~21시 · 칸 여백 줄임 · 오전(~14시)/오후(15시~) 줄 색 ·
   수업 칸 두 줄(시간 / 이름) · 이 화면만 글씨 2px 크게 · 위쪽(제목·날짜·탭)은 한 줄, 칸 고르기는 스케줄 등록 줄 끝 */
body:has(.schedpage) main { max-width: none; padding-top: 12px; padding-bottom: 12px; }
.schedpage { font-size: 16px; }
.schedpage h1 { font-size: 20px; margin: 0; }
.schedpage h2 { font-size: 18px; }
.schedpage .mini, .schedpage .sub { font-size: 14px; }
.schedpage .tabs { margin: 0; }
.schedpage .tabs a { font-size: 15px; padding: 4px 10px; }
.schedpage input, .schedpage select, .schedpage button { font-size: 15px; }
.schedpage .btn, .schedpage button { padding-top: 5px; padding-bottom: 5px; }
.schedpage .mk, .schedpage .dot, .schedpage .badge { font-size: 13px; }
.schedpage .qb button { font-size: 14px; }
.schedtop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.schedpage .addf { margin: 0 0 8px; padding: 6px 12px; flex-wrap: wrap; gap: 6px; }
table.sched { table-layout: auto; width: auto; border-collapse: separate; border-spacing: 0; }   /* 칸마다 내용만큼 (2026-10-26) */
.schedwrap { width: fit-content; max-width: 100%; }
table.sched th, table.sched td { min-width: 0; }
table.sched thead th { position: static; font-size: 15px; padding: 3px 3px; background: #f0f3f6; line-height: 1.25; }
table.sched thead th .mini { font-size: 12px; }
.sched tr.grp th { padding: 1px 3px; font-size: 12px; }
table.sched th.hc { width: 44px; }
table.sched td.hcell { position: sticky; left: 0; z-index: 2; text-align: center; padding: 2px 1px; border-right: 1px solid var(--line); vertical-align: top; }
table.sched td.hcell b { font-size: 14px; }
table.sched td.cell { padding: 1px 3px; vertical-align: top; min-width: 64px; }
table.sched tr.am td { background: #fffdf7; }
table.sched tr.am td.hcell { background: #fff4dc; color: #8a5a00; }
table.sched tr.pm td { background: #f6f9fd; }
table.sched tr.pm td.hcell { background: #e6f0fb; color: #2b5a8a; }
table.sched tr.pm0 td { border-top: 2px solid #9fb3c8; }
table.sched td.cell.psel { background: var(--brand-soft) !important; }
.schedpage .chip { font-size: 14px; margin: 1px 0; }
.schedpage .chip > summary { white-space: normal; padding: 1px 4px; line-height: 1.2; word-break: keep-all; }
.schedpage .chip > summary .t { display: block; font-size: 12px; }
.schedpage .chip > summary .nm b { font-weight: 600; }
.schedpage .chip, .schedpage .dchip { max-width: 140px; }   /* 칸 하나 최대 폭 — 넘치는 이름 · 업무는 줄바꿈 */
/* 연 칸: 260px로 옆 칸 위에 펼침. 오른쪽 여백을 (열기 전 폭 --w − 260px)로 줘서 칸 폭 계산엔 열기 전 폭만 들어감(열어도 표가 안 출렁임) */
.schedpage .chip[open], .schedpage .dchip[open] { position: relative; z-index: 4; min-width: 0; max-width: none; width: 260px; margin-right: calc(var(--w, 60px) - 260px); opacity: 1; }   /* 예정 칸(반투명)도 열면 밑 칸이 비치지 않게 */
.dchip { font-size: 13px; color: #8d96a3; line-height: 1.25; }
.dchip > summary { cursor: pointer; list-style: none; padding: 0 3px; border-radius: 4px; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.dchip > summary::-webkit-details-marker { display: none; }
.dchip > summary:hover { background: #eef0f3; color: var(--ink); }
.dchip > summary .t { font-size: 12px; }
.dchip[open] { background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); border-radius: 6px; padding: 4px 6px 6px; position: relative; z-index: 4; min-width: 260px; color: var(--ink); }
.dchip[open] > summary { white-space: normal; }
.schedpage table.sched .duty { font-size: 13px; line-height: 1.25; }
.schedpage .chip > summary .t .mk { font-size: 11px; padding: 0 3px; }   /* 완료·미확인 표시는 시간 줄 끝 — 수업 칸이 늘 두 줄 */
.schedpage .chip > summary .t { white-space: normal; }
.schedpage .chip > summary .nm { display: block; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.schedpage .chip > summary { padding: 0 4px; line-height: 1.08; }
.schedpage .chip { margin: 0 0 1px; }   /* 칸 고르기 줄이 열려도 1440×800 노트북에서 21시까지 보이게 */
table.sched thead tr.hdr th { white-space: normal; }
table.sched thead tr.hdr th .tn { white-space: nowrap; }   /* 이름은 한 줄, 완료/전체 수는 좁으면 아래 줄 */
table.sched thead tr.hdr th.me { box-shadow: inset 0 -2px 0 var(--brand); }   /* 트레이너 계정: 전체 표에서 내 칸 */
body:has(.schedpage) main { padding-top: 6px; }
.schedtop { margin-bottom: 4px; }
.schedpage .addf { margin-bottom: 5px; padding: 4px 10px; }
.schedpage .addf input, .schedpage .addf select, .schedpage .addf button, .schedtop .btn, .schedtop input { padding-top: 3px; padding-bottom: 3px; }
.schedpage #pick_tools button { padding: 2px 9px; }
.schedpage #add_cells { display: none; }
/* 레슨 스케줄 (2026-10-26 오후): 제목 밑에 트레이너 드롭다운 · 날짜 / 표 폭 = 내용만큼 잡힌 폭의 1.5배(JS가 col로 고정, 화면보다 넓으면 화면 폭까지) */
.schedtop { flex-direction: column; align-items: flex-start; gap: 3px; }
.schedpage select.tsel { min-width: 200px; font-weight: 600; }
table.sched.wide { table-layout: fixed; }
table.sched.wide .chip, table.sched.wide .dchip { max-width: none; }
/* 레슨 스케줄 색 진하게 (2026-10-26 저녁): 오전 노랑 · 오후 파랑 줄을 또렷하게, 수업 칸은 종류별로 진하게(PT 파랑 · HALF PT 보라 · 골프 초록 · OT 주황 · 직접 입력 회색),
   미확인(시간이 지났는데 완료 안 함)은 빨강 — 오전 노랑 줄 위에서도 바로 보이게. 예정은 흐리게 하지 않고 점선 테두리로만 */
table.sched tr.am td { background: #fff3c4; }
table.sched tr.am td.hcell { background: #ffd24d; color: #5c3a00; }
table.sched tr.pm td { background: #dfecff; }
table.sched tr.pm td.hcell { background: #8fbaf3; color: #0b3570; }
table.sched tr.pm0 td { border-top: 2px solid #3f78c4; }
.schedpage .chip { background: #c9ddff; border-left: 4px solid #1b64d8; color: #0a2550; }
.schedpage .chip.k-HPT { background: #ddd0ff; border-left-color: #6532dc; color: #2a1268; }
.schedpage .chip.k-2PT { background: #c4ecf1; border-left-color: #0f7c8a; color: #083d44; }
.schedpage .chip.k-LS { background: #bff0d2; border-left-color: #0f9a4a; color: #0a4523; }
.schedpage .chip.k-OT { background: #ffd5b5; border-left-color: #ee6409; color: #682800; }
.schedpage .chip.k-기타 { background: #dfe2e7; border-left-color: #555c67; color: #23272e; }
.schedpage .chip .t { color: inherit; opacity: .8; }
.schedpage .chip.s-예정 { opacity: 1; border-left-style: dashed; }
.schedpage .chip.s-완료 .mk.ok { color: #0b7a3e; }
.schedpage .chip.od { background: #ffcfcf; border-left: 4px solid #dc2020; color: #6e0a0a; box-shadow: inset 0 0 0 1px #f08a8a; }
.schedpage .mk.warn { background: #dc2020; color: #fff; }
.schedpage .diff-warn { color: #dc2020; font-weight: 700; }
.schedpage .dchip { color: #5b6472; }
.lrow.od { background: #ffe1e1; border-left-color: #dc2020; }   /* 트레이너 한 명 화면 */
.lrow.k-OT { border-left-color: #ee6409; }
/* 회원 상세 (2026-10-26 저녁): 계약 줄 수정 · 양도 · 결제내역, 휴회 수정 · 추가를 글자 대신 작은 버튼으로 */
.actbtn { display: inline-block; margin: 2px 0; padding: 2px 10px; border: 1px solid var(--brand); border-radius: 6px; background: #fff;
  color: var(--brand); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.actbtn:hover { background: var(--brand-soft); text-decoration: none; }
table.hist td:last-child .actbtn { display: block; text-align: center; }
details.addpause { margin-top: 10px; }
details.addpause > summary { list-style: none; }
details.addpause > summary::-webkit-details-marker { display: none; }
details.addpause[open] > summary { background: var(--brand-soft); }
details.addpause form { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
/* 환불 계산표 (2026-10-27) */
table.refcalc { margin-bottom: 6px; }
table.refcalc tr.sum td { border-top: 2px solid var(--line); }
/* 레슨 스케줄 (2026-10-27): 오후 줄은 PT 칸(파랑)과 안 겹치게 회색 · 아직 완료 안 한 수업(예정)은 흰 바탕 + 종류 색 테두리(완료는 꽉 찬 색, 미확인은 빨강 그대로)
   · 지금 시간대 줄은 청록 */
table.sched tr.pm td { background: #eceff3; }
table.sched tr.pm td.hcell { background: #b9c1cc; color: #1f2630; }
table.sched tr.pm0 td { border-top: 2px solid #7d8794; }
.sched tr.grp th.g-오후 { background: #e3e7ec; color: #3a4350; }
.schedpage .chip.s-예정:not(.od) { background: #fff; border: 1.5px dashed #1b64d8; border-left: 4px solid #1b64d8; }
.schedpage .chip.k-HPT.s-예정:not(.od) { border-color: #6532dc; }
.schedpage .chip.k-2PT.s-예정:not(.od) { border-color: #0f7c8a; }
.schedpage .chip.k-LS.s-예정:not(.od) { border-color: #0f9a4a; }
.schedpage .chip.k-OT.s-예정:not(.od) { border-color: #ee6409; }
.schedpage .chip.k-기타.s-예정:not(.od) { border-color: #555c67; }
.lrow.s-예정:not(.od) { background: #fff; border-style: dashed; }
table.sched tr.now td { background: #d3f8ec; box-shadow: inset 0 2px 0 #0b9f7a, inset 0 -2px 0 #0b9f7a; }
table.sched tr.now td.hcell { background: #0b9f7a; color: #fff; }
table.sched td.hcell .nowt { font-size: 11px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
/* 회원권 정지 (2026-10-27) */
.st-정지 { background: #3d4452; color: #fff; }
.suspcard .susp-now { display: inline-block; background: #3d4452; color: #fff; border-radius: 6px; padding: 4px 10px; margin-bottom: 8px; }
/* 회원 상세 메모 · 회원 정보 (2026-10-28) */
.memo { border-top: 1px solid var(--line, #e5e8ec); padding: 8px 0; }
.memo .memo-edit { display: inline-block; margin-left: 6px; }
.memo .memo-edit summary { display: inline; cursor: pointer; color: var(--brand); list-style: none; }
.memo .memo-edit[open] { display: block; margin: 6px 0 0; }
.linkbtn { background: none; border: none; padding: 0 0 0 6px; color: var(--muted, #6b7785); font-size: 12px; cursor: pointer; }
.linkbtn:hover { color: var(--bad, #c62828); text-decoration: underline; }
table.kv th { width: 72px; color: var(--muted, #6b7785); font-weight: 500; text-align: left; background: none; }
/* 락커 번호 (2026-10-28): 회원 상세 사물함 칸 · 사물함 번호 화면 */
.lockno { display: inline-block; min-width: 26px; padding: 0 6px; border: 1px solid var(--line, #e5e8ec); border-radius: 4px; text-align: center; }
.lk-row { margin: 2px 0 6px; }
.lk-edit { display: inline-block; margin-left: 6px; }
.lk-edit summary { display: inline; cursor: pointer; color: var(--brand); list-style: none; }
.lk-edit[open] { display: block; margin: 4px 0 0; }
.lk-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.lk-form input { padding: 3px 6px; }
.lk-form button { padding: 3px 10px; }
.lk-hist { margin-top: 6px; }
.lk-hist summary { cursor: pointer; }
.lk-hist table td { padding: 2px 6px; }
/* 회원 안내 알림톡 보내기 칸 (2026-10-28) */
.sendbox { margin: 10px 0; padding: 10px 14px; }
.sendbox button:disabled, .sendbox select:disabled { opacity: .45; cursor: not-allowed; }   /* 템플릿이 없을 때 틀만 보이는 단추 */
.sendprev { white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; background: #f7f9fb; border: 1px solid var(--line, #e5e8ec); border-radius: 6px;
            padding: 8px 10px; margin-top: 4px; max-height: 220px; overflow: auto; }
.sendprev:empty { display: none; }

/* 담당 회원 찾기 칸(레슨 스케줄): 글자 치면 맞는 회원만 · 값은 숨긴 select가 보냄 */
.cb { position: relative; display: inline-block; vertical-align: middle; }
.cb > select.cb-sel { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cb-list { position: fixed; z-index: 1000; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(15, 30, 50, .12);
           max-height: 260px; max-width: min(460px, 94vw); overflow: auto; font-size: 13px; padding: 3px 0; }
.cb-list div { padding: 5px 11px; cursor: pointer; white-space: nowrap; }
.cb-list div.on, .cb-list div:hover { background: #eef3f8; }
.cb-list div.none { color: var(--muted); cursor: default; background: none; }

/* 현황(첫 화면): 큰 숫자 · 쉬운 말 · 막대(2026-11-02) */
.dash-l { color: var(--muted); font-size: 13px; }
.dash-n { font-size: 38px; font-weight: 700; line-height: 1.15; margin: 4px 0 6px; letter-spacing: -.5px; }
.dash-n small { font-size: 16px; font-weight: 600; margin-left: 3px; color: var(--muted); }
.dash-d { font-size: 13px; color: #3d4556; line-height: 1.55; }
.dash-say { font-size: 17px; margin: 4px 0 14px; line-height: 1.6; }
.dash-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dash-flow > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.dash-flow b { font-size: 22px; }
.dash-more { margin-top: 12px; }
.dash-more > summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.dash-seg { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dash-seg:last-of-type { border-bottom: none; }
.dash-seg-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.dash-seg-n { margin-left: auto; white-space: nowrap; }
.dash-track { display: flex; height: 10px; border-radius: 5px; background: #f0f2f5; overflow: hidden; margin-bottom: 4px; }
.dash-track i, .dash-legend i { display: block; height: 100%; background: #7f9cbf; }
.dash-track i.p { background: #c9d6e5; }
.dash-track i.o, .dash-legend i.o { background: #6fa58a; }
.dash-track i.b, .dash-legend i.b { background: #8fb0cf; }
.dash-track i.x, .dash-legend i.x { background: #d3a29c; }
.dash-track i.w, .dash-legend i.w { background: #e3e6eb; }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.dash-legend i:first-child { margin-left: 0; }
.dash-line { height: 8px; border-radius: 4px; background: #8fb0cf; }

/* 현황: 휴대폰 폭에서 표가 카드를 밀어내지 않게 */
.dash-g > * { min-width: 0; }
.dash-x { overflow-x: auto; }
.dash-two { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; margin-top: 10px; }
@media (max-width: 700px) { .dash-two { grid-template-columns: minmax(0, 1fr); } }
/* 현황 후속(2026-11-02 밤): 가로 스크롤 상자 안 표 제목이 내용 위에 겹치던 것(.tablewrap과 같게), 헬스장 남 · 여 막대 */
.dash-x th { top: 0; }
.spark.sx { height: 90px; }
.spark.sx > div { background: none; display: flex; flex-direction: column; overflow: hidden; }
.spark.sx > div.zero { background: #e3e6eb; }
.spark.sx > div:hover { filter: brightness(.92); }
.spark.sx i { display: block; flex: none; }
.spark.sx i.gm, .dash-legend i.gm { background: #84a7c9; }
.spark.sx i.gf, .dash-legend i.gf { background: #d9adb7; }
.spark.sx i.gx, .dash-legend i.gx { background: #c9cfd8; }
.spark-tip { position: fixed; z-index: 30; background: #1d2433; color: #fff; font-size: 12px; line-height: 1.5; padding: 6px 10px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
