:root {
  --plum: #17402f; --plum-2: #2c6a50; --plum-soft: #e7f2ec; --ink: #1f2328; --muted: #6b7075; --line: #dbe5df; --line-soft: #e8efea;
  --bg: #f5f8f6; --card: #fff; --good: #1f8a4c; --warn: #b7791f; --bad: #c0392b; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: var(--plum-2); }
#topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--plum); color: #fff; }
#topbar .brand { font-weight: 700; flex: 1; white-space: nowrap; }
#topbar .brand small { font-weight: 400; opacity: .8; margin-left: 4px; }
#branch-select { max-width: 130px; border-radius: 8px; border: 0; padding: 6px 8px; }
.icon-btn { background: transparent; border: 0; color: inherit; font-size: 20px; cursor: pointer; position: relative; padding: 4px 6px; }
#notif-count { position: absolute; top: -2px; right: -4px; background: #e74c3c; color: #fff; border-radius: 10px; font-size: 11px; padding: 0 5px; }
#nav { position: fixed; top: 52px; bottom: 0; left: 0; width: 210px; background: #fff; border-right: 1px solid var(--line);
  overflow-y: auto; padding: 0 0 40px; z-index: 20; }
/* 대분류(매장 운영·핸드북·교육·관리·본사·가맹): 색 띠로 구분 */
#nav .grp { font-size: 12.5px; color: #fff; background: var(--plum-2); padding: 7px 16px; font-weight: 700; letter-spacing: .02em; margin-top: 10px; }
#nav .grp:first-child { margin-top: 0; }
#nav a { display: block; padding: 8px 16px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
#nav a.on { background: var(--plum-soft); border-left-color: var(--plum); font-weight: 600; }
#nav .me { padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 10px; }
main#view { padding: 18px 20px 60px; margin-left: 210px; max-width: 1280px; }
body.anon main#view { margin-left: auto; margin-right: auto; }   /* 로그인 화면: 넓은 모니터에서도 가운데 */
/* hidden 속성이 #topbar 의 display:flex 같은 지정보다 우선 (로그인 전 상단바·빈 지점 선택이 보이던 문제) */
[hidden] { display: none !important; }
@media (max-width: 900px) {
  #nav { transform: translateX(-100%); transition: transform .2s; width: 240px; box-shadow: 2px 0 12px rgba(0,0,0,.1); }
  #nav.open { transform: none; }
  main#view { margin-left: 0; padding: 14px 12px 60px; }
}
@media (min-width: 901px) { #menu-btn { display: none; } }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.sub { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; }
.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .v { font-size: 24px; font-weight: 700; }
.tile .l { font-size: 12px; color: var(--muted); }
.tile.alert { border-color: #f0b6ae; background: #fff6f5; }
.tile .t { font-size: 12px; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--plum-2); }
.btn.primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn.danger { color: var(--bad); border-color: #f0c2bc; }
.btn.sm { padding: 3px 8px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=month], input[type=search], input[type=time], input[type=url], select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; max-width: 100%; }
textarea { width: 100%; min-height: 80px; }
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
label.f input:not([type=checkbox]), label.f select, label.f textarea { width: 100%; }
.check { display: inline-flex; gap: 6px; align-items: center; margin-right: 12px; }
/* 설정 → 기준값 입력폼 */
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.srow.ev { grid-template-columns: minmax(0, 1fr) 80px 64px 34px; }
.srow input { width: 100%; }
.srow.head { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.pl-in { width: 100%; min-width: 80px; }
.set-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.set-foot .sub.bad { color: var(--bad); }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { border-collapse: collapse; width: 100%; background: #fff; font-size: 14px; }
/* 목록 표: 칸 사이 연한 구분선, 글자는 가운데, 숫자(.right)는 오른쪽 */
table.t { border: 1px solid var(--line-soft); }
table.t th { background: var(--plum-soft); text-align: center; padding: 7px 8px; font-weight: 600; white-space: nowrap; }
table.t td { padding: 7px 8px; border-top: 1px solid var(--line); vertical-align: top; text-align: center; }
table.t th + th { border-left: 1px solid var(--line); }
table.t td + td { border-left: 1px solid var(--line-soft); }
table.t th.right, table.t td.right { text-align: right; }
table.t th.left, table.t td.left { text-align: left; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #faf8fd; }
.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eee; white-space: nowrap; }
.chip.lead { background: #e8f0fe; color: #1a56db; } .chip.contacted { background: #eef2f7; }
.chip.booked { background: #fff4e0; color: #9a5b00; } .chip.noshow { background: #fde8e8; color: var(--bad); }
.chip.hold { background: #fff0f6; color: #a61e4d; } .chip.paid { background: #e6f6ec; color: var(--good); }
.chip.refunded, .chip.lost { background: #eee; color: #666; }
.chip.ad { background: #fff4e0; color: #9a5b00; } .chip.resume { background: #fde8e8; color: var(--bad); }
.list .item { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.list .item .main { flex: 1; min-width: 0; }
.list .item .m { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); padding: 14px 0; text-align: center; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 10px 0 14px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { border-bottom-color: var(--plum); font-weight: 600; }
.modal-bg { position: fixed; inset: 0; background: rgba(20,15,30,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 40px 12px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; padding: 18px; }
.modal h2 { margin-top: 0; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 9px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.show { opacity: .95; }
.login { max-width: 360px; margin: 80px auto; }
.login h1 { text-align: center; color: var(--plum); }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md table { border-collapse: collapse; } .md td, .md th { border: 1px solid var(--line); padding: 5px 8px; }
.md blockquote { border-left: 3px solid var(--plum-2); margin: 8px 0; padding: 4px 12px; color: var(--muted); background: var(--plum-soft); }
.timer { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.steps .s { padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; background: #f6f5f8; display: flex; justify-content: space-between; }
.steps .s.on { background: var(--plum); color: #fff; } .steps .s.done { color: var(--muted); text-decoration: line-through; }
.cal { display: grid; gap: 0; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.cal .h { background: var(--plum-soft); font-weight: 600; padding: 6px; text-align: center; position: sticky; top: 0; }
.cal .tm { color: var(--muted); padding: 4px 6px; border-top: 1px solid var(--line); text-align: right; }
.cal .slot { border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-height: 34px; padding: 2px; cursor: pointer; }
.cal .slot:hover { background: #faf8fd; }
.cal .bk { background: var(--plum-soft); border-left: 3px solid var(--plum); border-radius: 4px; padding: 2px 4px; margin-bottom: 2px; cursor: pointer; }
.cal .bk.trial { border-left-color: #d97706; background: #fff7ea; } .cal .bk.noshow { opacity: .5; text-decoration: line-through; } .cal .bk.done { opacity: .6; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos figure { margin: 0; width: 120px; } .photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.photos figcaption { font-size: 12px; color: var(--muted); }
pre.report { white-space: pre-wrap; background: #f6f5f8; padding: 10px; border-radius: 8px; font-family: inherit; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pill { display: inline-block; background: var(--plum-soft); color: var(--plum); border-radius: 10px; padding: 0 8px; font-size: 12px; }
@media print { #topbar, #nav, .no-print { display: none !important; } main#view { margin: 0; } }

/* 아카데미: 시간표 카드 · 모듈 진도 · 출석부 */
.tk { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 5px; text-align: left; cursor: pointer; font-size: 13px; }
.tk:hover { background: var(--plum-soft); }
table.tt td { min-width: 118px; }
.mods { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; max-width: 640px; }
.mod { height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; color: var(--muted); cursor: pointer; }
.mod.on { background: var(--plum-2); border-color: var(--plum-2); color: #fff; }
@media (max-width: 600px) { .mods { grid-template-columns: repeat(6, 1fr); } }
.print-only { display: none; }
.wk { font-size: 12px; border-radius: 6px; padding: 2px 6px; margin: 2px 0; white-space: nowrap; text-align: left; border-left: 3px solid #999; background: #f1f1f1; }
.wk.plan { border-left-style: dashed; color: var(--muted); background: #f7f7f7; }
.wk.ok { border-left-color: #0a7d4f; background: #e6f6ec; } .wk.on { border-left-color: #ea7a00; background: #fff4e0; font-weight: 700; } .wk.fix { border-left-color: #2563eb; background: #e8f0fe; }
table.wb td { vertical-align: top; min-width: 112px; } table.wb .td { background: #fbfdf4; }
.sheet { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; overflow-x: auto; }
.sheet-t { text-align: center; margin: 0 0 10px; font-size: 20px; }
.sheet table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sheet th, .sheet td { border: 1px solid #555; padding: 4px 5px; text-align: center; }
.sheet-h { margin-bottom: 8px; } .sheet-h th { background: #f1f1f1; white-space: nowrap; width: 1%; } .sheet-h td { text-align: left; }
.sheet-b th { background: #f1f1f1; } .sheet-b td { height: 26px; min-width: 24px; } .sheet-b .nm { text-align: left; min-width: 84px; white-space: nowrap; }
.sheet-b .mo { font-size: 10px; font-weight: 400; height: 16px; } .sheet-b .ab { color: #c0392b; } .sheet-b .sg { height: 34px; }
.sheet-f { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; } .print-only { display: block; } main#view { padding: 0 !important; }
  .sheet { border: 0; padding: 0; overflow: visible; } .sheet-b .ab { color: #000; }
  .card { break-inside: avoid; } table.t { font-size: 12px; } a { color: inherit; text-decoration: none; }
}

/* v1.1 프랜차이즈 */
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.alert { display: inline-block; font-size: 12px; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 10px; background: #fff4e0; color: #9a5b00; }
.alert.bad { background: #fde8e8; color: var(--bad); }
.chip.draft { background: #eee; color: #555; } .chip.issued { background: #e8f0fe; color: #1a56db; } .chip.confirmed { background: #e6f6ec; color: var(--good); }
.chip.disputed { background: #fde8e8; color: var(--bad); } .chip.st-paid { background: #d8f0e0; color: var(--good); }
.chip.requested { background: #fff4e0; color: #9a5b00; } .chip.approved, .chip.shipped { background: #e8f0fe; color: #1a56db; } .chip.delivered { background: #e6f6ec; color: var(--good); }
.chip.rejected, .chip.cancelled { background: #eee; color: #666; }
.notice { border-left: 4px solid var(--brand, #4b3a6b); }
/* 발주: 외상 사용 막대, 월별 막대 그래프 */
.sbar { height: 10px; background: #eef1ef; border-radius: 6px; overflow: hidden; display: flex; min-width: 120px; }
.sbar i { background: var(--good, #1f8a4c); } .sbar i.p { background: #f0b849; }
.sbar2 { height: 7px; background: #f3f5f4; border-radius: 4px; overflow: hidden; margin: 2px 0; }
.sbar2 i { display: block; height: 100%; background: var(--good, #1f8a4c); } .sbar2 i.p { background: #b9d8c6; }
.schart { position: relative; display: flex; align-items: flex-end; gap: 14px; height: 200px; padding-top: 6px; }
.schart .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.schart .col i { width: 60%; max-width: 64px; background: #b9d8c6; border-radius: 5px 5px 0 0; min-height: 2px; }
.schart .col i.on { background: var(--good, #1f8a4c); }
.schart .lim { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--bad, #c0392b); opacity: .6; margin-bottom: 22px; }
tr.me td { background: #f6f2fb; }

/* 태블릿·휴대폰 (좁은 화면 또는 터치 기기) */
.cal .tm { position: sticky; left: 0; z-index: 1; background: #fff; }            /* 예약 캘린더 가로 스크롤 시 시간 열 고정 */
.cal > .h:first-child { left: 0; z-index: 2; }
#nav-dim { display: none; }
@media (max-width: 900px), (pointer: coarse) {
  input[type=text], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
  input[type=month], input[type=search], input[type=time], input[type=url], select, textarea { font-size: 16px; } /* iOS 입력 시 화면 확대 방지 */
  .btn { min-height: 40px; }
  .btn.sm { min-height: 34px; padding: 6px 10px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: none; }
  .check { min-height: 36px; }
  .list .item a, .t td a { display: inline-block; padding: 6px 0; }                /* 목록 안 링크 누르는 영역 */
  #nav a { padding: 11px 16px; }
  .tabs button { padding: 10px 14px; }
  .tw { scrollbar-width: thin; }
}
@media (max-width: 900px) {
  #nav-dim { position: fixed; inset: 52px 0 0 0; background: rgba(20,15,30,.35); z-index: 19; }
  #nav.open ~ #nav-dim { display: block; }
  .modal-bg { padding: 16px 8px; }
  .modal { padding: 14px; }
  .modal .actions { position: sticky; bottom: -14px; background: #fff; padding: 10px 0 4px; }
}
@media print { .tw { overflow: visible; } .modal .actions { position: static; } }

/* 고객 상세 > 문자: 실제 발송 문구 */
.msg-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--bg, #f7f5f8); border: 1px solid var(--line, #e6e1ea); border-radius: 8px; padding: 10px 12px; margin-top: 8px; word-break: break-word; }

/* ---------- 예약 캘린더 (월·주·일·리스트) ---------- */
main#view:has(.cv) { max-width: none; }
.cv .red { color: #e5484d; }
.cv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cv-top h1 { margin: 0; }
.cv-title { font-size: 17px; font-weight: 700; flex: 1; min-width: 180px; white-space: nowrap; }
.cv-nav, .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.cv-nav button, .seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: var(--ink); }
.cv-nav button + button { border-left: 1px solid var(--line); }
.cv-nav button:hover, .seg button:hover { background: var(--plum-soft); }
.seg { padding: 3px; gap: 2px; }
.seg button { border-radius: 6px; padding: 4px 14px; color: var(--muted); }
.seg button.on { background: var(--plum-soft); color: var(--plum); font-weight: 700; }
.cv-top select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; }
.cv-body { display: flex; gap: 14px; align-items: flex-start; }
.cv-main { flex: 1; min-width: 0; }
.cv-side { width: 236px; flex: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; position: sticky; top: 64px; }
.mc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-top b { background: var(--plum-soft); border-radius: 14px; padding: 2px 14px; font-size: 14px; }
.mc-nav { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 8px; }
.mc-w, .mc-r { display: grid; grid-template-columns: repeat(7, 1fr); }
.mc-w span { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.mc-r { border-top: 1px solid var(--line-soft); }
.mc-d { border: 0; background: transparent; cursor: pointer; padding: 2px 0 5px; font-size: 13px; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mc-d i { font-style: normal; font-size: 10px; line-height: 15px; min-width: 15px; height: 15px; border-radius: 8px; background: #d5d3da; color: #fff; padding: 0 3px; visibility: hidden; }
.mc-d i:not(:empty) { visibility: visible; }
.mc-d.today i:not(:empty) { background: #f0569a; }
.mc-d.today { font-weight: 800; color: var(--plum-2); }
.mc-d.dim { color: #b9b6c0; } .mc-d.dim i { opacity: .6; }
.mc-d.red:not(.dim) { color: #e5484d; }
.mc-d.sel { background: #6f8fe8; color: #fff; } .mc-d.sel.red { color: #fff; }
.mc-r .mc-d.sel:first-child { border-radius: 6px 0 0 6px; } .mc-r .mc-d.sel:last-child { border-radius: 0 6px 6px 0; }
.mc-d:not(.sel):hover { background: var(--plum-soft); }
.cv-leg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); align-items: center; }
.cv-leg .ev { position: static; display: inline-block; padding: 1px 8px; height: auto; }

/* 예약 카드 색: 종류(체험·관리·상담) + 상태 */
.ev, .mv-e, .lv-row { --c: #5b7be0; --bg: #e3e9fb; }
.ev.trial, .mv-e.trial, .lv-row.trial { --c: #d98a0b; --bg: #fff2d9; }
.ev.consult, .mv-e.consult, .lv-row.consult { --c: #1f9d8b; --bg: #dff5f0; }
.ev { position: absolute; background: var(--bg); border-left: 3px solid var(--c); border-radius: 6px; padding: 2px 6px; font-size: 12.5px; line-height: 1.35; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px #fff; }
.ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { display: block; color: #565a66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev:hover { filter: brightness(.96); z-index: 3; }
.ev.done, .mv-e.done { opacity: .62; }
.ev.noshow, .mv-e.noshow, .lv-row.noshow { --c: #e5484d; --bg: #fde8e8; }
.ev.noshow b, .mv-e.noshow, .ev.cancelled b, .mv-e.cancelled, .lv-row.cancelled .n, .lv-row.cancelled .t { text-decoration: line-through; }
.ev.cancelled, .mv-e.cancelled { background: #fff; border: 1px dashed #b9b6c0; color: #9a97a3; }
.nv { display: inline-block; width: 15px; height: 15px; line-height: 15px; border-radius: 50%; background: #03c75a; color: #fff; font-size: 10px; font-weight: 800; text-align: center; margin-right: 4px; vertical-align: 1px; font-style: normal; }
.chip.bk-confirmed { background: #e8f0fe; color: #1a56db; } .chip.bk-done { background: #e6f6ec; color: var(--good); }
.chip.bk-noshow { background: #fde8e8; color: var(--bad); } .chip.bk-cancelled { background: #eee; color: #666; }

/* 시간표 (주·일) */
.tg-wrap { overflow: auto; max-height: calc(100vh - 246px); min-height: 320px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.tg { display: grid; min-width: 100%; }
.tg-hd { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line-soft); padding: 8px 6px 6px; text-align: center; font-size: 13.5px; min-height: 46px; }
.tg-hd span { display: block; font-size: 11.5px; color: #e5484d; }
.tg-hd .cnt { display: inline-block; margin-left: 6px; background: var(--plum-soft); color: var(--plum); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.tg-hd.day { cursor: pointer; } .tg-hd.day:hover { background: var(--plum-soft); }
.tg-hd.today b { color: #f0569a; }
.tg-hd.corner { left: 0; z-index: 6; border-left: 0; }
.tg-gut { position: sticky; left: 0; z-index: 4; background: #fff; }
.tg-h { font-size: 11.5px; color: var(--muted); text-align: right; padding: 2px 8px 0 0; border-top: 1px solid var(--line-soft); }
.tg-h:first-child { border-top: 0; }
.tg-col { position: relative; border-left: 1px solid var(--line-soft); cursor: cell;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(#f3f1f6 1px, transparent 1px); background-size: 100% 68px, 100% 34px; }
.tg-col.today { background-color: #fbfaff; }
.tg-col .now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #f0569a; z-index: 2; pointer-events: none; }
.tg-col .now::before { content: ''; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #f0569a; }

/* 월간 */
.mv { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mv-hd, .mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mv-hd div { text-align: center; padding: 8px 0; font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.mv-c { min-height: 104px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); padding: 3px 3px 5px; cursor: pointer; overflow: hidden; }
.mv-c:nth-child(7n + 1) { border-left: 0; }
.mv-c.dim { background: #f6f5f8; } .mv-c.dim .mv-d b, .mv-c.dim .mv-e { opacity: .55; }
.mv-c:hover { background: #faf8fd; }
.mv-d { display: flex; align-items: baseline; gap: 6px; padding: 0 3px 2px; font-size: 13px; }
.mv-d span { font-size: 11.5px; }
.mv-c.today .mv-d b { background: #f0569a; color: #fff; border-radius: 10px; padding: 0 7px; }
.mv-e { background: var(--bg); border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-e i { font-style: normal; font-weight: 700; }
.mv-more { text-align: center; color: #5b7be0; font-size: 12.5px; font-weight: 600; }

/* 리스트 */
.lv { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lv-day { background: #f1f0f4; font-weight: 700; padding: 8px 12px; border-top: 1px solid var(--line); }
.lv-day:first-child { border-top: 0; } .lv-day.today { color: #f0569a; }
.lv-row { display: grid; grid-template-columns: 250px 150px 190px 70px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line-soft); border-left: 4px solid var(--c); font-size: 13.5px; cursor: pointer; }
.lv-row:hover { background: #faf8fd; }
.lv-row .t { font-weight: 600; } .lv-row .memo { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row.cancelled { opacity: .55; }

/* 예약 상세 작은 창 */
.bk-pop { position: absolute; z-index: 60; width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(40, 30, 70, .22), 0 0 0 1px var(--line); padding: 14px 16px; font-size: 13.5px; }
.bk-pop .hd { display: flex; align-items: center; justify-content: space-between; }
.bk-pop .hd a { font-size: 18px; color: var(--ink); text-decoration: none; }
.bk-pop .x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.bk-pop .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.bk-pop dl { display: grid; grid-template-columns: 62px 1fr; gap: 5px 8px; margin: 0 0 12px; }
.bk-pop dt { color: var(--muted); } .bk-pop dd { margin: 0; } .bk-pop dd.memo { white-space: pre-wrap; max-height: 110px; overflow: auto; }
.bk-pop .acts { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 10px; }

@media (max-width: 1100px) { .cv-side { display: none; } }
@media (max-width: 760px) {
  .cv-title { flex-basis: 100%; order: 5; }
  .lv-row { grid-template-columns: 1fr; gap: 2px; }
  .mv-c { min-height: 70px; } .mv-e i { display: none; }
  .tg-wrap { max-height: none; }
}

/* 예약 캘린더: 보기 설정 줄, 칸 크기, 관리사 색, 마우스 올리면 펼쳐 보기 */
.cv-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 13.5px; }
.cv-opt .lbl { color: var(--muted); margin-left: 6px; }
.cv-opt select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; }
.seg.sm button { padding: 2px 11px; font-size: 13px; }
.tg-col { background-size: 100% var(--hh, 72px), 100% calc(var(--hh, 72px) / 2); background-image: linear-gradient(#d9d5e2 1px, transparent 1px), linear-gradient(#f0eef4 1px, transparent 1px); }
.tg-col.off { background-color: #fdf7f8; } .tg-col.today { background-color: #f8f6ff; }
.tg-hd { font-size: 14px; } .tg-hd.today { background: #f8f6ff; } .tg-hd.today b { background: #f0569a; color: #fff; border-radius: 12px; padding: 1px 10px; }
.tg-h { font-size: 12px; color: #55596a; font-weight: 600; }
.ev { font-size: 13px; padding: 3px 7px; border-left-width: 4px; }
.ev b { font-size: 13.5px; color: #1f2328; }
.ev span em { font-style: normal; font-weight: 700; color: #3a3f4d; }
.ev .x1, .ev .x2 { display: block; color: #6b7075; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .x2 { display: none; white-space: normal; }
.ev.tight { padding: 2px 4px; } .ev.tight b { font-size: 12.5px; }
.ev .ok { font-style: normal; color: var(--good); font-weight: 800; margin-right: 3px; }
.ev.done { opacity: 1; filter: saturate(.45); } .ev.done b { color: #5d6170; font-weight: 600; }
.tg-col .ev:hover { z-index: 9; min-width: 190px; height: auto !important; min-height: 64px; overflow: visible; filter: none; box-shadow: 0 6px 20px rgba(40, 30, 70, .25), 0 0 0 1px var(--c); padding: 5px 9px 7px; }
.tg-col .ev:hover b, .tg-col .ev:hover span { white-space: normal; overflow: visible; }
.tg-col .ev:hover .x2 { display: block; }
.ev.sc0, .mv-e.sc0, .lv-row.sc0 { --c: #5b7be0; --bg: #e3e9fb; } .ev.sc1, .mv-e.sc1, .lv-row.sc1 { --c: #d98a0b; --bg: #fff2d9; }
.ev.sc2, .mv-e.sc2, .lv-row.sc2 { --c: #1f9d8b; --bg: #dff5f0; } .ev.sc3, .mv-e.sc3, .lv-row.sc3 { --c: #9b5de5; --bg: #f0e6fd; }
.ev.sc4, .mv-e.sc4, .lv-row.sc4 { --c: #e0559b; --bg: #fde6f1; } .ev.sc5, .mv-e.sc5, .lv-row.sc5 { --c: #3b9fd8; --bg: #e0f1fb; }
.ev.sc6, .mv-e.sc6, .lv-row.sc6 { --c: #7a9a2b; --bg: #eef5da; } .ev.sc7, .mv-e.sc7, .lv-row.sc7 { --c: #c7663a; --bg: #fbe9df; }
.ev.sc-none, .mv-e.sc-none, .lv-row.sc-none { --c: #9a97a3; --bg: #efeef2; }
.cv-leg .ev .ok { margin-right: 2px; }
.bk-pop dl.cinfo { border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: -4px; }

/* ---------- 왼쪽 메뉴: 짙은 초록 바탕 (아카데미) + 아이콘 + 선택한 메뉴 강조 (콜라보살롱 화면 참고) ---------- */
#nav { top: 0; z-index: 35; width: 224px; background: #123a2b; border-right: 0; padding: 0 0 24px; color: #cfe6da; scrollbar-width: thin; scrollbar-color: #2f6b54 transparent; }
#nav .nav-brand { padding: 17px 20px 13px; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
#nav .nav-brand small { font-weight: 500; opacity: .65; font-size: 12px; margin-left: 4px; }
#nav .grp { background: transparent; color: #7fb39b; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 16px 22px 5px; margin-top: 0; }
#nav a { display: flex; align-items: center; gap: 11px; margin: 1px 10px; padding: 8px 11px; border-radius: 9px; border-left: 0; color: #dbeee4; font-size: 14.5px; }
#nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
#nav a span:first-of-type { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
#nav a.on { background: #2f9e6e; color: #fff; font-weight: 700; border-left: 0; box-shadow: 0 2px 8px rgba(47, 158, 110, .35); }
#nav a.on svg { opacity: 1; }
#nav .me { color: #9cc7b2; border-top: 1px solid rgba(255, 255, 255, .12); margin: 14px 10px 0; padding: 14px 11px 0; }
#nav .me a { display: inline; margin: 0; padding: 0; color: #cfe6da; text-decoration: underline; font-size: 13px; }
#nav .me a:hover { background: none; }
#topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); min-height: 52px; }
#topbar .icon-btn { color: var(--ink); }
#branch-select { border: 1px solid var(--line); background: #fff; }
main#view { margin-left: 224px; }
@media (min-width: 901px) { #topbar { padding-left: 244px; } #topbar .brand { visibility: hidden; } }
@media (max-width: 900px) { #nav { width: 250px; } main#view { margin-left: 0; } #nav-dim { inset: 0; z-index: 34; } }
body.anon #topbar .brand { visibility: visible; }

/* ---------- 예약 카드 색: 서로 확실히 구분되게 (색각 차이까지 검증한 조합) ---------- */
.ev, .mv-e, .lv-row { --c: #2563eb; --bg: #d3e2ff; }
.ev.care, .mv-e.care, .lv-row.care { --c: #2563eb; --bg: #d3e2ff; }
.ev.trial, .mv-e.trial, .lv-row.trial { --c: #ea7a00; --bg: #ffe0b0; }
.ev.consult, .mv-e.consult, .lv-row.consult { --c: #0a7d4f; --bg: #c6eeda; }
.ev.sc0, .mv-e.sc0, .lv-row.sc0 { --c: #2563eb; --bg: #d3e2ff; } .ev.sc1, .mv-e.sc1, .lv-row.sc1 { --c: #ea7a00; --bg: #ffe0b0; }
.ev.sc2, .mv-e.sc2, .lv-row.sc2 { --c: #7c3aed; --bg: #e4d6fe; } .ev.sc3, .mv-e.sc3, .lv-row.sc3 { --c: #0a7d4f; --bg: #c6eeda; }
.ev.sc4, .mv-e.sc4, .lv-row.sc4 { --c: #0ea5c4; --bg: #c8eef7; } .ev.sc5, .mv-e.sc5, .lv-row.sc5 { --c: #c81e6a; --bg: #fbd0e3; }
.ev.sc6, .mv-e.sc6, .lv-row.sc6 { --c: #4f46a5; --bg: #dcd9f6; } .ev.sc7, .mv-e.sc7, .lv-row.sc7 { --c: #a64d1c; --bg: #f6dbc9; }
.ev.sc-none, .mv-e.sc-none, .lv-row.sc-none { --c: #7b7f8c; --bg: #e6e7ec; }
.ev { border-left-width: 5px; box-shadow: 0 0 0 1.5px #fff; }
.ev.noshow, .mv-e.noshow, .lv-row.noshow { --c: #dc2626; --bg: #ffd3d3; }
/* 완료: 색은 그대로 두고 옅게 + ✓ (전에는 회색에 가까워져 종류가 구분되지 않았다) */
.ev.done { filter: none; opacity: 1; background: color-mix(in srgb, var(--bg) 42%, #fff); border-left-color: color-mix(in srgb, var(--c) 55%, #fff); }
.mv-e.done { opacity: 1; background: color-mix(in srgb, var(--bg) 42%, #fff); color: #6b7075; }
.ev .ok { color: var(--c); }
.cv-leg .ev { border-left-width: 5px; }

/* ---------- 매출 통계 ---------- */
main#view:has(.st) { max-width: 1500px; }
.st .tabs { margin-top: 2px; }
.st-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.st-grid .card { margin-bottom: 0; }
.st-grid.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .st-grid.g3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .st-grid.g2, .st-grid.g3 { grid-template-columns: minmax(0, 1fr); } }
.st h3 { margin: 0 0 10px; font-size: 15.5px; } .st h3 .sub { font-weight: 400; margin-left: 4px; }
.st-cap { font-weight: 600; }
.st-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 2px; }
.dl { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; border-radius: 7px; padding: 3px 9px; letter-spacing: 0; color: #fff; }
.dl.up { background: #e5343b; } .dl.down { background: #2563eb; } .dl.flat { background: #8b8f9a; } .dl.new { background: #0a7d4f; }
.st-goal { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.st-meter { position: relative; height: 14px; border-radius: 8px; background: #ebe8f1; margin: 8px 0 6px; }
.st-meter > div { height: 100%; border-radius: 8px; background: #2f9e6e; min-width: 0; }
.st-meter.full > div { background: #0a7d4f; }
.st-meter > i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #1f2328; border-radius: 1px; }
.st-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.st-mini div { background: #f6f4fa; border-radius: 9px; padding: 9px 10px; }
.st-mini b { display: block; font-size: 20px; line-height: 1.2; } .st-mini span { font-size: 12px; color: var(--muted); }
/* 세로 막대 */
.sb { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 2px; }
.sb-c { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; cursor: default; }
.sb-v { height: 20px; font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sb-t { width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.sb-b { width: 62%; max-width: 46px; background: #a996f5; border-radius: 4px 4px 0 0; transition: background .12s; }
.sb-c.on .sb-b { background: #2f9e6e; }
.sb-c:hover .sb-b { background: #4a2fd0; }
.sb-l { height: 24px; line-height: 24px; font-size: 12px; color: var(--muted); white-space: nowrap; margin-bottom: -25px; }
.sb { margin-bottom: 26px; }
.sb.thin { gap: 1px; } .sb.thin .sb-b { width: 76%; border-radius: 3px 3px 0 0; }
.sb-c.on .sb-l { color: var(--ink); font-weight: 700; }
.sb-tip { position: absolute; z-index: 80; background: #1f2328; color: #fff; font-size: 12.5px; padding: 5px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
/* 순위·비율 */
.rk-r { display: grid; grid-template-columns: 26px minmax(90px, 1.1fr) minmax(40px, 1fr) auto; gap: 10px; align-items: center; padding: 7px 4px; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.rk-r:first-child { border-top: 0; } .rk-r:hover { background: #faf8fd; }
.rk-n { width: 24px; height: 24px; border-radius: 50%; background: #ebe8f1; color: #55596a; font-size: 12.5px; font-weight: 800; text-align: center; line-height: 24px; }
.rk-n.n1 { background: #f5b301; color: #fff; } .rk-n.n2 { background: #9aa3b2; color: #fff; } .rk-n.n3 { background: #c5895b; color: #fff; }
.rk-name b { display: block; } .rk-name .sub { font-size: 12px; }
.rk-bar { height: 8px; background: #ebe8f1; border-radius: 4px; overflow: hidden; } .rk-bar i { display: block; height: 100%; background: #a996f5; border-radius: 4px; }
.rk-a { font-weight: 700; white-space: nowrap; }
.sh-r { display: grid; grid-template-columns: minmax(84px, auto) 1fr auto; gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line-soft); }
.sh-r:first-child { border-top: 0; }
.sh-t { height: 10px; background: #ebe8f1; border-radius: 5px; overflow: hidden; } .sh-b { height: 100%; background: #2f9e6e; border-radius: 5px; }
.sh-a { font-weight: 700; white-space: nowrap; }
#nav .me a.on { background: none; box-shadow: none; font-weight: 400; }

/* 왼쪽 메뉴: 큰 분류 사이에 옅은 선, 폭은 예전(210px)과 같게 해 본문 배치가 달라지지 않게 */
#nav { width: 210px; }
main#view { margin-left: 210px; }
@media (min-width: 901px) { #topbar { padding-left: 230px; } }
@media (max-width: 900px) { #nav { width: 250px; } main#view { margin-left: 0; } }
#nav .grp { border-top: 1px solid rgba(255, 255, 255, .14); margin: 12px 14px 0; padding: 14px 8px 5px; }
#nav .nav-brand + .grp { border-top: 0; margin-top: 0; padding-top: 6px; }
#nav a { margin: 1px 8px; }

/* 모바일 다듬기: 월간 "더보기" 줄바꿈, 주간 매출 막대 이름 겹침, 고객 순위·표 글자 쪼개짐 */
@media (max-width: 760px) {
  .mv-more { white-space: nowrap; } .mv-more span { display: none; }
  .sb:not(.thin) .sb-l { white-space: normal; word-break: keep-all; text-align: center; line-height: 12px; font-size: 10.5px; }
  .rk-r { grid-template-columns: 26px minmax(108px, 1.4fr) minmax(24px, 1fr) auto; gap: 8px; } .rk-name .sub { white-space: nowrap; }
  .t.prod { min-width: 600px; }
  #list .t td:first-child { white-space: nowrap; }
}

/* 모바일 표: 칸이 좁아져 글자가 한 자씩 세로로 쪼개지지 않게 표를 내용만큼 넓히고 좌우로 민다. 긴 글은 칸 너비 안에서 두세 줄로 */
@media (max-width: 760px) {
  .tw > table.t { width: max-content; min-width: 100%; }
  .tw > table.t th { white-space: nowrap; }
  .tw > table.t td { max-width: 230px; word-break: keep-all; overflow-wrap: anywhere; }
  .tw > table.t td[style*="pre-wrap"] { max-width: 300px; min-width: 260px; text-align: left; } /* 문자 문구처럼 원래 여러 줄인 칸 */
}

/* 예약 말풍선 (카드형): 아바타·이름, 요약 칩, 아이콘 줄, 메모 인용, 금액·취소 */
.bk-pop { width: 330px; padding: 0; border-radius: 16px; overflow: hidden; }
.bk-pop .hd { padding: 16px 16px 8px; gap: 12px; justify-content: flex-start; }
.bk-pop .hd .av { width: 44px; height: 44px; border-radius: 50%; background: #d9cdfb; color: #fff; display: grid; place-items: center; flex: none; }
.bk-pop .hd .av svg { width: 26px; height: 26px; stroke-width: 2.2; }
.bk-pop .hd a.nm { font-size: 19px; display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.bk-pop .hd a.nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bk-pop .hd a.nm i { font-style: normal; color: var(--muted); }
.bk-pop .tags { margin: 0; padding: 0 16px 12px; }
.bk-pop .pc { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.bk-pop .pc.v { background: #dcebff; color: #1c57b8; } .bk-pop .pc.pp { background: #d5f3f1; color: #0b6f6a; } .bk-pop .pc.ms { background: #ece6ff; color: #5b34d6; }
.bk-pop .bd { border-top: 1px solid var(--line-soft); padding: 12px 16px; max-height: 250px; overflow-y: auto; display: grid; gap: 9px; }
.bk-pop .ln { display: flex; gap: 9px; align-items: flex-start; color: #5d6470; font-size: 14px; line-height: 1.45; }
.bk-pop .ln svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: #9aa0ab; }
.bk-pop .ln.cur { color: var(--ink); font-size: 15px; } .bk-pop .ln.bad { color: var(--bad); }
.bk-pop blockquote { margin: 0 0 0 26px; padding: 2px 0 2px 10px; border-left: 3px solid #e2e4ea; color: #8a909b; font-weight: 600; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bk-pop .acts { padding: 10px 16px; border-top: 1px solid var(--line-soft); }
.bk-pop .ft { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line-soft); }
.bk-pop .ft .grow { flex: 1; }
.bk-pop .amt { background: #ece6ff; color: #5b34d6; font-weight: 800; font-size: 14px; padding: 5px 11px; border-radius: 8px; }
.bk-pop .del { border: 0; background: transparent; color: #8a909b; cursor: pointer; padding: 4px; border-radius: 8px; display: grid; place-items: center; }
.bk-pop .del svg { width: 26px; height: 26px; } .bk-pop .del:hover { background: #fdecec; color: var(--bad); }

.bk-pop .amt.paid { background: #dff5e8; color: #0a7d4f; } .bk-pop .ft .std { font-size: 12.5px; }
