/* ============================================================================
   오늘(관리자 홈) — 시안 proto/today.html <style> 을 옮긴 것(BRIEF_v1 6-2 · IMPL_PLAN_B B2).
   새 색·새 크기 0: 값은 tokens.css 변수 또는 components.css 에 이미 있는 수치다. 인라인 style 은 CSP 로 막혀 있어
   시안의 style="…" 자리는 클래스로, 동적 값(막대 높이·수업 위치·'지금' 선)은 CSS 변수(CSSOM setProperty)로 받는다.
   B 와 다른 점(시안 대비): 신호등 3칸(회원권 보유 칸 없음 — 서버 값 없음), 방법별 한 줄·입구 태블릿·캘린더 링크 없음(C·D),
   폰에서는 최근 입장을 숨긴다(IMPL_PLAN_B B2 폰 배치).
   ========================================================================== */

/* ── ① 신호등 띠 3칸 — 첫 칸(지금 센터 안)이 이 화면의 주인공 ───────────── */
.today-strip { overflow: hidden; }
.stat-strip.is-today { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.stat-strip.is-today .stat:not(.is-lead) .kpi { font-size: var(--fs-28); line-height: var(--lh-28); }   /* 보조 칸 = 폰 큰 숫자 크기(28) */
a.stat:hover, .stat.is-lead:hover { background: var(--paper); }
.stat.is-lead > .ico { top: 20px; margin-top: 0; }
.stat.is-lead > .stretch { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.lead-in { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; pointer-events: none; }
.lead-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lead-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-in button, .lead-in a { pointer-events: auto; }
.lead-sub { flex: 1 0 100%; margin-top: -8px; }

/* 시간대별 인원 — 한 계열 action, 지금 칸만 navy(매출 일별 막대와 같은 규칙) */
.hour-bars { flex: none; width: 132px; display: flex; flex-direction: column; gap: 6px; }
.hb-cols { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 2px; height: 40px; border-bottom: 1px solid var(--line-input); pointer-events: auto; }
.hb-cols > span { position: relative; height: calc(var(--h) * 1%); min-height: 2px; border-radius: 2px 2px 0 0; background: var(--action); transition: opacity var(--t-micro) var(--ease-micro); }
.hb-cols > span.is-now { background: var(--navy); }
.hb-cols:hover > span:not(:hover) { opacity: .45; }
.hb-cols > span:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: var(--fs-12); line-height: var(--lh-12); font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 3; }
.hb-axis { display: flex; justify-content: space-between; }

/* ── ② 오늘 챙길 회원(전광판) — PC 에선 머리 칩을 두 줄로 접는다 ─────────── */
.board-title .n { font-variant-numeric: tabular-nums; opacity: .9; margin-left: 4px; }
.board-body { transition: opacity var(--t-set) var(--ease-set); }
.board-body.is-swap { opacity: 0; }
.board-row .br-main { color: inherit; border-radius: 6px; }
a.br-main:hover .br-name { text-decoration: underline; text-underline-offset: .22em; text-decoration-color: rgba(255,255,255,.5); }
.board-btn:disabled { opacity: .4; cursor: default; }
.board-btn[aria-busy="true"] > :not(.drop-loader) { visibility: hidden; }
.board-empty { padding: 28px 16px; text-align: center; font-size: var(--fs-14); line-height: var(--lh-14); font-weight: 600; }
.board-empty .t-sub { color: inherit; opacity: .85; margin-top: 4px; }
.board-empty .drop-loader { margin: 0 auto; }
.board-empty-act { display: flex; justify-content: center; margin-top: 12px; }
/* 쪽 표시 = 단추(키보드로도 넘긴다). 막대 모양은 components.css .board-pages i 그대로 */
.board-pages .bp { display: inline-flex; align-items: center; padding: 6px 0; border-radius: 2px; }
/* 자동 넘김(폰)일 때만 지금 쪽 막대가 5초 동안 찬다 — PC 데스크는 멈춰 두고 점을 눌러 넘긴다(시안) */
.board:not(.is-rotating) .board-pages i.is-now::after { animation: none; transform: none; }
@media (min-width: 1280px) { .board-chips { flex-wrap: wrap; overflow: visible; } }

/* ── ③ 오늘 수업 — 강사별 미니 막대(오전 6시~오후 11시) ──────────────────── */
.mt { --mt-name: 112px; --mt-cnt: 76px; --mt-chev: 20px; --mt-gap: 12px; --mt-from: 6; --mt-hours: 17; position: relative; }
.mt-grid { display: grid; grid-template-columns: var(--mt-name) minmax(0,1fr) var(--mt-cnt) var(--mt-chev); column-gap: var(--mt-gap); align-items: center; }
.mt-head { height: 28px; }
.mt-head .mt-cnt-head { text-align: right; }
.mt-axis { position: relative; height: 100%; }
.mt-axis > span { position: absolute; bottom: 6px; left: calc(var(--x) * 100%); transform: translateX(-50%); font-size: var(--fs-11); line-height: var(--lh-11); font-weight: 600; color: var(--muted); white-space: nowrap; }
.mt-axis > span:first-child { transform: none; }
.mt-axis > span.is-near { visibility: hidden; }
.mt-row { width: 100%; min-height: 44px; text-align: left; border-top: 1px solid var(--line); border-radius: 0; transition: background-color var(--t-micro) var(--ease-micro); }
.mt-row:hover { background: var(--paper); }
.mt-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-name .t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-track { position: relative; height: 22px; border-radius: 4px; background: var(--paper);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--mt-hours) * 3)); }
.mt-b { position: absolute; top: 3px; bottom: 3px; left: calc((var(--s) - var(--mt-from)) / var(--mt-hours) * 100%); width: calc(var(--d) / var(--mt-hours) * 100% - 2px); border-radius: 3px; }
.mt-b.is-done { background: var(--sky-7); box-shadow: inset 0 0 0 1px var(--action); }   /* 완료 = 연한 채움(캘린더와 같은 문법) */
.mt-b.is-now { background: var(--navy); }
.mt-b.is-planned { background: var(--surface); box-shadow: inset 0 0 0 1px var(--action); }
.mt-b.is-requested { background: var(--surface); outline: 1px dashed var(--action); outline-offset: -1px; }
.mt-b.is-unconfirmed { background: var(--sky-1); box-shadow: inset 0 0 0 1px var(--action); }
.mt-b.is-unconfirmed::after { content: ""; position: absolute; top: -3px; right: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 1px var(--surface); }
.mt-b.is-noshow { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--stop); }   /* 노쇼 = 빨간 테두리(캘린더와 같음) */
.mt-cnt { display: flex; flex-direction: column; align-items: flex-end; gap: 0; white-space: nowrap; }
.mt-cnt .t-value { font-variant-numeric: tabular-nums; }
.mt-cnt .t-sub b { font-weight: 700; }
.mt-row > .ico { width: 20px; height: 20px; color: var(--faint); }
/* '지금' 선 — 모든 강사 줄을 관통, 위 끝에 물방울 */
.mt-now { position: absolute; top: 4px; bottom: 0; z-index: 2; width: 2px; margin-left: -1px; background: var(--drop-deep); pointer-events: none;
  left: calc(var(--mt-name) + var(--mt-gap) + (100% - var(--mt-name) - var(--mt-cnt) - var(--mt-chev) - 3 * var(--mt-gap)) * (var(--now) - var(--mt-from)) / var(--mt-hours)); }
.mt-now .droplet { position: absolute; top: -4px; left: 50%; width: 10px; height: 14px; max-width: none; margin-left: -5px; color: var(--drop-deep); }
.mt-now .mt-now-t { position: absolute; top: -3px; left: 8px; padding: 0 4px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-11); line-height: var(--lh-11); font-weight: 700; color: var(--ink); white-space: nowrap; }
.mt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; }
.mt-legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); line-height: var(--lh-12); color: var(--muted); }
.mt-legend .mt-b { position: relative; display: inline-block; top: auto; bottom: auto; left: auto; width: 16px; height: 10px; }
.mt-more { display: flex; justify-content: center; padding-top: 8px; border-top: 1px solid var(--line); }
.mt-more .ico.is-flip { transform: rotate(180deg); }

/* ── ⑤ 최근 입장 피드 — 칩(지금 센터 안이면 캡슐) ───────────────────────── */
.feed-tabs { padding: 12px 24px 4px; }
.feed { padding: 4px 24px 0; }
.feed > li { border-top: 1px solid var(--line); }
.feed > li:first-child { border-top: 0; }
.feed > li.feed-none { padding: 16px 0 20px; }
.feed-row { display: grid; grid-template-columns: 32px minmax(0,1fr) 20px; align-items: center; column-gap: 12px; min-height: 64px; padding: 10px 0; border-radius: 0; color: inherit; transition: background-color var(--t-micro) var(--ease-micro); }
a.feed-row:hover { background: var(--paper); }
.fr-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fr-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.fr-line .t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-line .t-caption { flex: none; font-variant-numeric: tabular-nums; }
.fr-line2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.feed-row > .ico { width: 20px; height: 20px; color: var(--faint); }
.panel-foot { display: flex; justify-content: center; padding: 8px 24px 16px; border-top: 1px solid var(--line); margin-top: 4px; }

/* ── ④ 매출과 미납 — 네 줄. 큰 숫자는 폰 보조 칸 숫자 크기(20) ────────────── */
.money-list { display: flex; flex-direction: column; }
.money-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 10px 0; border-top: 1px solid var(--line); }
.money-row:first-child { border-top: 0; padding-top: 0; }
.money-row .mr-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.money-row .mr-val { flex: none; display: flex; align-items: baseline; gap: 2px; }
.money-row .mr-val .num { font-size: var(--fs-20); line-height: var(--lh-20); }
.money-row .mr-val .unit { font-size: var(--fs-14); line-height: var(--lh-14); font-weight: 600; color: var(--muted); }
.money-row.is-due .mr-val .num { color: var(--stop); }
a.money-row { color: inherit; margin: 0 -8px; padding-left: 8px; padding-right: 4px; border-radius: var(--r-input); transition: background-color var(--t-micro) var(--ease-micro); }
a.money-row:hover { background: var(--paper); }
a.money-row > .ico { flex: none; width: 18px; height: 18px; margin-left: -6px; color: var(--faint); }
.money-row.is-yday { min-height: 72px; background: var(--sky-1); margin: 0 -8px 4px; padding: 12px 4px 12px 12px; border-top: 0; }
.money-row.is-yday + .money-row { border-top: 0; }
.money-row.is-yday .mr-val .num { font-size: var(--fs-24); line-height: var(--lh-24); }
.money-row .nw { white-space: nowrap; }

/* ── 블록 안 빈 상태·오류 ─────────────────────────────────────────────────── */
.today-grid .panel .empty { padding: 24px 16px 28px; }

/* ── 강사 수업 시트 ─────────────────────────────────────────────────────── */
.sheet-title { min-width: 0; }
.trs-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.trs-head .dot { width: 10px; height: 10px; }
.trs-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-13); line-height: var(--lh-13); font-weight: 600; color: var(--muted); }
.trs-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.trs-sum .is-stop b { color: var(--stop); }
.trs-list > li { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); }
.trs-list > li:first-child { border-top: 0; }
.trs-list .tl-when { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.trs-list .tl-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trs-list .tl-who-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.trs-list .tl-who-line .t-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-link { color: inherit; }
.tl-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.trs-list .tl-state { font-size: var(--fs-12); line-height: var(--lh-12); font-weight: 600; color: var(--muted); white-space: nowrap; }
.trs-list .tl-state.is-now { color: var(--navy); font-weight: 700; }
.trs-list .tl-state.is-noshow { color: var(--ink); font-weight: 700; }
.trs-list li.is-now { background: linear-gradient(90deg, var(--sky-1), var(--surface) 70%); margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.trs-mini { padding: 4px 0 0; }
.mt.is-mini { --mt-name: 0px; --mt-cnt: 0px; --mt-chev: 0px; --mt-gap: 0px; }
.mt-mini-row { min-height: 30px; }

/* ── 메모 시트 ──────────────────────────────────────────────────────────── */
.memo-sheet, .trs-sheet { display: contents; }
.memo-open { align-self: flex-start; }
.memo-past > li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.memo-past > li:first-child { border-top: 0; padding-top: 0; }
.memo-past .t-value { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── 배치 ──────────────────────────────────────────────────────────────── */
.today-side { min-width: 0; }
.today-grid.is-no-side .today-main, .today-grid.is-no-main .today-side { grid-column: 1 / -1; }
@media (max-width: 1279px) {
  .today-main { grid-column: 1 / -1; }
  .today-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--gap); align-items: start; }
}
@media (max-width: 767px) {
  /* 폰: 두 묶음을 풀어 순서를 다시 정한다 — ① 신호등 / ④ 돈 / ② 할 일 3명 / ③ 수업 5명. ⑤ 최근 입장은 숨긴다(회원 탭이 대신한다) */
  .today-main, .today-side { display: contents; }
  .today-main > *, .today-side > * { min-width: 0; }
  .o-1 { order: 1; } .o-2 { order: 2; } .o-3 { order: 3; } .o-4 { order: 4; } .o-5 { order: 5; }
  .today-money.is-am { order: 0; }   /* 오전 11시 전에는 돈 칸이 신호등 위 */
  .today-feed { display: none; }
  .stat-strip.is-today { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-strip.is-today .stat.is-lead { grid-column: 1 / -1; border-radius: var(--r-card) var(--r-card) 0 0; border-bottom: 1px solid var(--line); padding: 16px 44px 16px 20px; }
  .stat.is-lead > .ico { top: 16px; right: 16px; }
  .lead-in { gap: 12px 16px; }
  .stat-strip.is-today .stat:nth-child(2) { border-left: 0; border-radius: 0 0 0 var(--r-card); }
  .stat-strip.is-today .stat:last-child { border-radius: 0 0 var(--r-card) 0; }
  .stat-strip.is-today .stat:not(.is-lead) { padding: 14px 24px 14px 14px; gap: 2px; }
  .stat-strip.is-today .stat:not(.is-lead) .kpi { font-size: var(--fs-20); line-height: var(--lh-20); }
  .stat-strip.is-today .stat:not(.is-lead) .unit { font-size: var(--fs-14); line-height: var(--lh-14); }
  .stat-strip.is-today .stat:not(.is-lead) > .ico { top: 14px; right: 6px; margin-top: 0; width: 16px; height: 16px; }
  .hour-bars { width: 104px; }
  .board-row .br-why { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }   /* 앱 전광판처럼 사유 최대 2줄 */
  .board-btn .lbl { display: none; }
  .board-btn { padding: 0 10px; }
  .mt { --mt-name: 72px; --mt-cnt: 48px; --mt-chev: 16px; --mt-gap: 8px; }
  .mt.is-mini { --mt-name: 0px; --mt-cnt: 0px; --mt-chev: 0px; --mt-gap: 0px; }
  .mt-row > .ico { width: 16px; height: 16px; }
  .mt-row[data-rank="6"] { display: none; }
  .mt.is-all .mt-row[data-rank="6"] { display: grid; }
  .mt-axis > span.is-pc { display: none; }
  .feed-tabs { padding: 12px 20px 4px; }
  .feed { padding: 4px 20px 0; }
  .panel-foot { padding: 8px 20px 14px; }
  .trs-list li.is-now { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
}
