/* 보컬센세 관리자 — Confluence 풍 블루 테마 */
:root {
  --blue-900: #0747a6;
  --blue-800: #0a52bb;
  --blue-700: #0052cc;
  --blue-100: #deebff;
  --blue-50: #f0f6ff;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #dfe1e6;
  --text: #172b4d;
  --text-muted: #6b778c;
  --danger: #de350b;
  --success: #00875a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ── 좌측 사이드바 ── */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--blue-900), var(--blue-800));
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
}

.sidebar-subtitle {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 2px;
}

/* 사이드바 스크롤바 — 파란 배경 위 흰 기본 스크롤바가 떠 보이는 문제 → 테마 톤으로 통일 */
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-link-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
}

.sidebar-link-icon {
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
}

.sidebar-user-role {
  font-size: 11px;
  opacity: 0.75;
}

.sidebar-signout {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sidebar-signout:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ── 콘텐츠 영역 ── */
.content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1240px;
  /* 사이드바를 닫아도 본문이 왼쪽으로 쏠리지 않게 중앙 유지 */
  margin-inline: auto;
  width: 100%;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-700);
  border-radius: 10px;
  padding: 16px 18px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-700);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── 테이블 ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 9px 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  background: var(--blue-50);
}

.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.table tr:hover td {
  background: var(--blue-50);
}

.group-header {
  background: var(--blue-100);
  font-weight: 700;
  color: var(--blue-900);
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-blue {
  background: var(--blue-100);
  color: var(--blue-900);
}

.badge-green {
  background: #e3fcef;
  color: var(--success);
}

.badge-gray {
  background: #ebecf0;
  color: var(--text-muted);
}

.badge-red {
  background: #ffebe6;
  color: var(--danger);
}

/* ── 막대그래프 ── */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.bar-track {
  background: var(--blue-50);
  border-radius: 6px;
  height: 18px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-700), #2684ff);
  border-radius: 6px;
}

.bar-value {
  text-align: right;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-field input,
.form-field select {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
}

.btn-inline {
  background: var(--blue-700);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-inline:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-small {
  background: var(--blue-50);
  color: var(--blue-900);
  border: 1px solid var(--blue-100);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ── 학원비 청구 필터/액션 ── */
.invoice-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 160px 150px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.invoice-filter-control {
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.invoice-filter-search {
  padding-left: 12px;
}

.invoice-filter-clear {
  height: 38px;
  white-space: nowrap;
}

.invoice-bulk-send-button {
  height: 38px;
  padding: 0 14px;
  white-space: nowrap;
  background: #fee500;
  color: #191919;
}

.invoice-bulk-send-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.invoice-actions-header {
  width: 270px;
}

.invoice-actions-cell {
  min-width: 270px;
}

.invoice-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 86px);
  gap: 6px;
  align-items: center;
}

.invoice-actions-grid-single {
  grid-template-columns: repeat(3, 86px);
}

.invoice-actions-grid .btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  text-align: center;
  white-space: nowrap;
}

.invoice-action-placeholder {
  display: block;
  min-height: 32px;
}

.invoice-action-kakao {
  background: #fee500;
  border-color: #fee500;
  color: #191919;
  font-weight: 800;
}

.invoice-action-success {
  background: #e6f4ea;
  border-color: #b7e1c5;
  color: #0a7a3d;
  font-weight: 700;
}

.invoice-action-danger {
  background: #d92d20;
  border-color: #d92d20;
  color: #fff;
  font-weight: 800;
}

.invoice-action-danger:hover {
  background: #b42318;
  border-color: #b42318;
}

/* ── 세로 막대 랭킹 (불타는 학원 랭킹) ── */
.vbar-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 220px;
  padding: 26px 6px 0;
  overflow-x: auto;
}

.vbar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 58px;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.vbar-value {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.vbar-bar {
  width: 30px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #ff8b00, #ff5630);
  transition: height 0.3s ease, filter 0.15s;
  min-height: 4px;
}

.vbar-col:hover .vbar-bar {
  filter: brightness(1.12);
}

.vbar-bar-cool {
  background: linear-gradient(180deg, #4c9aff, #0052cc);
}

.vbar-bar-low {
  background: linear-gradient(180deg, #b3bac5, #8993a4);
}

.vbar-name {
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 5px;
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vbar-crown {
  position: absolute;
  top: -24px;
  font-size: 16px;
}

.vbar-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(9, 30, 66, 0.3);
}

.vbar-king-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #fff7e6, #ffeccc);
  border: 1px solid #ffd591;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ── 모달 ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  width: min(560px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(9, 30, 66, 0.35);
}

.reservation-day-modal {
  width: min(920px, 96vw);
  max-height: 90vh;
}

.reservation-day-list {
  max-height: min(62vh, 640px);
  overflow-y: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.reservation-modal-row {
  display: grid;
  grid-template-columns: 10px 122px minmax(180px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 13px;
}

.reservation-modal-row:last-child {
  border-bottom: 0;
}

.reservation-modal-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reservation-modal-student {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

/* ── 예약 캘린더 ── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}

.calendar-cell {
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 6px;
  cursor: pointer;
  background: var(--surface);
  overflow: hidden;
}

.calendar-cell:hover {
  background: var(--blue-50);
}

.calendar-cell-active {
  outline: 2px solid var(--blue-700);
}

.calendar-cell-blank {
  border: none;
  background: transparent;
  cursor: default;
}

.calendar-day {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}

.calendar-item {
  font-size: 11px;
  background: var(--blue-100);
  color: var(--blue-900);
  border-radius: 4px;
  padding: 1px 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-more {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 수업 확인 시간표 ── */
.lesson-confirm-controls {
  display: grid;
  gap: 12px;
}

.lesson-confirm-control-row,
.lesson-confirm-summary,
.lesson-confirm-subject-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lesson-confirm-check,
.lesson-confirm-today-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lesson-confirm-check {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.lesson-confirm-today-label {
  font-size: 14px;
  color: var(--text);
}

.lesson-confirm-summary {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.lesson-confirm-subject-filter {
  gap: 8px;
  font-size: 12px;
}

.lesson-confirm-subject-label {
  color: var(--text-muted);
  font-weight: 800;
  margin-right: 2px;
}

.lesson-confirm-subject-button {
  white-space: nowrap;
}

.assignment-subject-filter-card {
  display: grid;
  gap: 12px;
}

.assignment-subject-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assignment-subject-filter-caption {
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.assignment-subject-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.assignment-subject-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  white-space: nowrap;
}

.lesson-schedule-scroll {
  overflow: auto;
  max-height: 72vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.lesson-schedule-grid {
  display: grid;
  min-width: 760px;
  position: relative;
}

.lesson-schedule-corner,
.lesson-schedule-teacher,
.lesson-schedule-time {
  position: sticky;
  z-index: 3;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 6px 8px;
  font-size: 11.5px;
}

.lesson-schedule-corner {
  left: 0;
  top: 0;
  z-index: 5;
  font-weight: 800;
  color: var(--text-muted);
  justify-content: center;
  text-align: center;
}

.lesson-schedule-teacher {
  top: 0;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  line-height: 1.25;
}

.lesson-schedule-teacher b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-schedule-teacher span {
  color: var(--text-muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.lesson-schedule-time {
  left: 0;
  z-index: 4;
  justify-content: center;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 0 5px;
}

.lesson-schedule-slot {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.lesson-schedule-event {
  z-index: 2;
  margin: 3px;
  border: 1.5px solid;
  border-radius: 6px;
  padding: 5px 6px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(9, 30, 66, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.2px;
}

.lesson-schedule-event-clickable {
  cursor: pointer;
}

.lesson-schedule-event-clickable:hover {
  box-shadow: 0 4px 12px rgba(9, 30, 66, 0.16);
  transform: translateY(-1px);
}

.lesson-schedule-event-clickable:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 2px;
}

.lesson-schedule-event-top,
.lesson-schedule-event-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.lesson-schedule-event-top span {
  font-size: 10px;
  font-weight: 800;
}

.lesson-schedule-event-name {
  color: var(--text);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-schedule-event-meta {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-schedule-event .badge {
  padding: 1px 5px;
  font-size: 10px;
}

.lesson-schedule-event .btn-small {
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.15;
}

.lesson-confirm-detail-modal {
  width: min(560px, 94vw);
}

.lesson-confirm-detail-head,
.lesson-confirm-detail-status,
.lesson-confirm-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lesson-confirm-detail-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.lesson-confirm-detail-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.lesson-confirm-detail-status {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lesson-confirm-detail-grid {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.lesson-confirm-detail-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.lesson-confirm-detail-row span:first-child {
  color: var(--text-muted);
  font-weight: 800;
}

.lesson-confirm-detail-row b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lesson-confirm-detail-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.row-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.empty-state {
  padding: 36px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.error-banner {
  background: #ffebe6;
  border: 1px solid #ffbdad;
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

.subscription-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff8e8;
  border: 1px solid #f2d19a;
  border-left: 4px solid #d99a2b;
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 16px;
}

.subscription-notice-title {
  color: #704800;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.subscription-notice-copy {
  color: #6f5b38;
  font-size: 12.5px;
  line-height: 1.55;
}

.subscription-notice-action {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #e3bd78;
  border-radius: 8px;
  color: #704800;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 11px;
  text-decoration: none;
}

/* ── 로그인 화면 ── */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
}

.login-card {
  width: 380px;
  background: var(--surface);
  border-radius: 14px;
  padding: 34px 32px;
  box-shadow: 0 18px 50px rgba(7, 71, 166, 0.35);
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 22px;
}

.login-field {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}

.login-field:focus {
  outline: 2px solid var(--blue-700);
  border-color: transparent;
}

.btn-primary {
  width: 100%;
  background: var(--blue-700);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--blue-800);
}

.btn-secondary {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.btn-secondary:hover {
  background: var(--blue-50);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  margin: 14px 0;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.centered-note {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

/* ── 사이드바 토글 + 모바일 반응형 (2026-06-11) ── */
.nav-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 15px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle:hover {
  background: var(--blue-50);
}
.sidebar {
  transition: transform 0.22s ease, margin-left 0.22s ease;
}
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.45);
  z-index: 850;
}

/* 데스크톱 — 접으면 본문이 전체 폭 사용 */
@media (min-width: 901px) {
  .sidebar.sidebar-closed {
    margin-left: -248px;
  }
}

/* 모바일 — 오버레이 드로어 */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    width: 264px;
    transform: translateX(-105%);
    box-shadow: 4px 0 18px rgba(9, 30, 66, 0.3);
  }
  .sidebar.sidebar-open {
    transform: none;
  }
  .content {
    padding: 14px 12px !important;
    width: 100%;
  }
  .page-title {
    font-size: 19px;
  }
  .subscription-notice {
    align-items: flex-start;
    flex-direction: column;
  }
  .subscription-notice-action {
    width: 100%;
    text-align: center;
  }
  .invoice-filter-bar {
    grid-template-columns: 1fr;
  }
  .invoice-filter-clear,
  .invoice-bulk-send-button {
    width: 100%;
  }
  /* 표는 가로 스크롤로 보호 */
  .card {
    overflow-x: auto;
  }
  .table {
    min-width: 520px;
  }
  .vbar-chart {
    overflow-x: auto;
  }
  .modal-card {
    width: 94vw !important;
    max-height: 88vh;
    overflow-y: auto;
  }
  .reservation-day-modal {
    max-height: 90vh;
  }
  .reservation-modal-row {
    grid-template-columns: 10px 1fr auto;
    gap: 8px;
  }
  .reservation-modal-time,
  .reservation-modal-student {
    grid-column: 2 / -1;
  }
  .reservation-modal-row .badge,
  .reservation-modal-row .btn-small {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .calendar-grid {
    font-size: 11px;
  }
}

/* ── 리포트 PDF 다운로드(인쇄) — 사이드바/버튼 숨기고 본문만 (2026-06-12) ── */
@media print {
  .sidebar,
  .sidebar-backdrop,
  .nav-toggle,
  button,
  select,
  input {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .content {
    max-width: 100%;
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  body {
    background: #fff;
  }
}

/* 초대코드 만료 임박(≤10초) — OTP 스타일 반짝임 (2026-06-13) */
@keyframes vs-otp-blink {
  0%, 100% { background: #de350b; color: #fff; box-shadow: 0 0 0 0 rgba(222, 53, 11, 0.5); }
  50% { background: #fff0f0; color: #de350b; box-shadow: 0 0 0 5px rgba(222, 53, 11, 0.12); }
}
.badge-otp-blink {
  animation: vs-otp-blink 0.6s ease-in-out infinite;
  font-weight: 800;
}

/* ============================================================
   데모 전용 보강 — 실제 콘솔(styles.css) 위에 얹는 최소 레이어
   ============================================================ */

/* 상단 데모 리본 (ROH 데모임을 알림 + 실제 콘솔 링크) */
.demo-ribbon {
  position: sticky;
  top: 0;
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px clamp(14px, 3vw, 28px);
  background: var(--blue-900);
  color: #fff;
  font-size: 12.5px;
}
.demo-ribbon a.demo-ribbon-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #fff;
}
.demo-ribbon a.demo-ribbon-home img { width: 64px; height: auto; display: block; }
.demo-ribbon-note { opacity: .82; flex: 1; min-width: 0; }
.demo-ribbon-live {
  flex: 0 0 auto;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 7px;
  color: #fff;
  font-weight: 800;
  padding: 6px 11px;
  white-space: nowrap;
}
.demo-ribbon-live:hover { background: rgba(255,255,255,.26); }

/* 데모는 리본 높이만큼 사이드바 sticky 보정 */
.app-shell { min-height: calc(100vh - 38px); }
.sidebar { height: calc(100vh - 38px); top: 38px; }

/* 사이드바 그룹 토글 (Layout.tsx 인라인 스타일을 클래스화) */
.sidebar-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.sidebar-group-chevron {
  margin-left: auto;
  font-size: 10px;
  transition: transform .15s ease;
}
.sidebar-group-open .sidebar-group-chevron { transform: rotate(90deg); }

/* 발송·대기 노란 배지 (실제 콘솔 인라인 #FEE500) */
.badge-yellow { background: #fee500; color: #191919; }

/* 토스트 */
.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 18px 44px rgba(9,30,66,.4);
  transition: opacity .2s ease, transform .2s ease;
}
.demo-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* 2-컬럼 카드 그리드 (학생 상세 피드백/메모 등) */
.demo-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.demo-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* 상세 페이지 뒤로가기 */
.demo-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
}
.demo-back:hover { text-decoration: underline; }

/* 메모 카드 (학생 상세/피드백) */
.memo-card {
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  margin-bottom: 9px;
  font-size: 13px;
}
.memo-card-note { background: #fffaf0; border-color: #f2e0c0; }
.memo-card-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 6px; }

/* 빠른 링크 그리드 (대표쌤 리포트) */
.quicklink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.quicklink-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.quicklink-card:hover { background: var(--blue-50); border-color: var(--blue-100); }
.quicklink-card .ql-title { font-weight: 800; font-size: 13.5px; margin: 6px 0 3px; }
.quicklink-card .ql-desc { color: var(--text-muted); font-size: 12px; }

/* 도넛/막대 차트 보조 */
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.donut-legend-row { display: flex; align-items: center; gap: 8px; }
.donut-legend-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }

/* 스택 막대 (과목별 레벨 분포) */
.stack-bar { display: flex; height: 20px; border-radius: 6px; overflow: hidden; background: var(--blue-50); }
.stack-seg { height: 100%; }

/* 모바일 드로어 — 닫기 버튼 / 콘텐츠 상단 토글바 */
.sidebar-close {
  margin-left: auto;
  flex: 0 0 auto;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 7px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.sidebar-close:hover { background: rgba(255, 255, 255, 0.22); }
.demo-content-topbar { display: flex; align-items: center; }
.demo-content-topbar:empty { display: none; }
.demo-content-topbar:not(:empty) { margin-bottom: 12px; }

/* 상단 리본 메뉴 토글 — 항상 보이는 최상단 바에 배치(가려짐 방지) */
.demo-ribbon-menu {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.demo-ribbon-menu:hover { background: rgba(255, 255, 255, 0.26); }
