/* 내강의실 */
:root {
  --primary: #FF6B00;
  --primary-hover: #E55C00;
  --primary-light: #FFF4EB;
  --navy-dark: #0F172A;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-600: #475569;
  --slate-700: #334155;
  --white: #FFFFFF;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

body {
  background: #F8FAFC;
}

.page-wrapper {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  flex-grow: 1;
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--slate-400);
  margin-bottom: 1.2rem;
  font-weight: 600;
  flex-wrap: wrap;
}
.breadcrumb-row a { color: var(--slate-600); text-decoration: none; }
.breadcrumb-row a:hover { color: var(--primary); }

.page-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2.5rem;
  color: var(--white);
  margin-bottom: 1.4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
}
.page-hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.18) 0%, rgba(255, 107, 0, 0) 70%);
  pointer-events: none;
}
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 0, 0.2);
  border: 1px solid rgba(255, 107, 0, 0.4);
  color: #FF944D;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin-bottom: 0.7rem;
}
.page-hero p {
  font-size: 1.02rem;
  color: #94A3B8;
  max-width: 720px;
  line-height: 1.6;
}

.class-tabs {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}
.class-tabs a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  font-weight: 800;
  font-size: 0.98rem;
}
.class-tabs a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 107, 0, 0.28);
}

.section-card {
  background: #FFFFFF;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 2rem 2.1rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-subtle);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid var(--slate-100);
}
.section-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.section-title {
  font-size: 1.28rem;
  font-weight: 900;
  color: var(--navy-dark);
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.4px;
}
.section-subtitle { font-size: 0.88rem; color: var(--slate-600); font-weight: 500; }
.remain-count { font-size: 0.9rem; color: var(--slate-600); font-weight: 700; }
.remain-count strong { color: var(--primary); font-size: 1.1rem; }

.course-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1rem;
  margin-bottom: 1.2rem;
}
.course-top label {
  font-weight: 800;
  color: var(--navy-dark);
  font-size: 0.95rem;
}
.course-select {
  flex: 1;
  min-width: 240px;
  border: 1.5px solid var(--slate-200);
  background: var(--slate-50);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-dark);
}
.left-days { font-weight: 700; color: var(--slate-600); font-size: 0.92rem; }
.left-days em { color: #EF4444; font-style: normal; font-weight: 900; }

.course-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem 1.2rem;
  margin-bottom: 1.2rem;
}
.course-meta-item {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.course-meta-item span {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--slate-400);
  margin-bottom: 0.2rem;
}
.course-meta-item strong { color: var(--navy-dark); font-size: 0.95rem; font-weight: 800; }

.course-actions, .video-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.btn-course, .btn-tool, .btn-mini, .btn-feedback {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-course, .btn-tool {
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
}
.btn-course.primary, .btn-tool.primary {
  background: var(--primary);
  color: #fff;
}
.btn-course.line, .btn-tool.line {
  background: #fff;
  color: var(--slate-700);
  border: 1.5px solid var(--slate-200);
}
.btn-course:disabled, .btn-tool.is-disabled {
  background: var(--slate-100);
  color: var(--slate-400);
  cursor: default;
  border: 1.5px solid var(--slate-200);
}

.live-class-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFBF7 100%);
  border: 1.5px solid #FED7AA;
  border-radius: var(--radius-lg);
  padding: 2rem 2.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 28px -6px rgba(255, 107, 0, 0.12);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.6rem;
  align-items: center;
}
.live-class-card.is-empty {
  display: block;
  background: #fff;
  border-color: var(--slate-200);
  box-shadow: var(--shadow-subtle);
  color: var(--slate-600);
  font-weight: 700;
}
.class-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.class-info-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--navy-dark);
  margin-bottom: 0.55rem;
  letter-spacing: -0.4px;
}
.class-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.3rem;
  font-size: 0.94rem;
  color: var(--slate-700);
  font-weight: 600;
}
.class-info-meta span { display: flex; align-items: center; gap: 7px; }
.btn-enter-room {
  background: linear-gradient(135deg, #FF6B00 0%, #FF852D 100%);
  color: #FFFFFF;
  padding: 1rem 1.6rem;
  border-radius: 18px;
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 107, 0, 0.35);
}
.phone-note { font-size: 0.88rem; color: var(--slate-600); font-weight: 700; max-width: 220px; }

.view-toggle { display: flex; gap: 0.4rem; }
.view-toggle a {
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-600);
  font-weight: 800;
  font-size: 0.84rem;
  background: #fff;
}
.view-toggle a.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}
.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--navy-dark);
}
.month-nav a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--slate-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  text-decoration: none;
  background: #fff;
}

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
}
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}
.custom-table th {
  background: var(--slate-50);
  color: var(--slate-700);
  font-weight: 800;
  padding: 1rem 1.1rem;
  border-bottom: 1.5px solid var(--slate-200);
  white-space: nowrap;
}
.custom-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  vertical-align: middle;
}
.custom-table tr:last-child td { border-bottom: none; }
.schedule-list th:nth-child(1),
.schedule-list td:nth-child(1),
.schedule-list th:nth-child(2),
.schedule-list td:nth-child(2) {
  width: 1%;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  white-space: nowrap;
}
.status-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge-status.pending { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
.badge-status.completed { background: #ECFDF5; color: #10B981; border: 1px solid #A7F3D0; }
.badge-status.absent { background: #FEF2F2; color: #EF4444; border: 1px solid #FECACA; }
.badge-status.cancel { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }
.badge-status.delay { background: #FFF7ED; color: #EA580C; border: 1px solid #FED7AA; }
.badge-status.makeup { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.badge-status.holiday { background: #F8FAFC; color: #64748B; border: 1px solid #CBD5E1; }

.btn-mini, .btn-feedback {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid #FDBA74;
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}
.btn-feedback { color: #0F766E; border-color: #99F6E4; background: #F0FDFA; }

.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-table th, .cal-table td {
  border: 1px solid var(--slate-200);
  vertical-align: top;
  padding: 0.45rem;
  font-size: 0.82rem;
}
.cal-table th { background: var(--slate-50); text-align: center; font-weight: 800; color: var(--slate-700); }
.cal-table .sun { color: #EF4444; }
.cal-table .sat { color: #2563EB; }
.cal-table td { height: 108px; background: #fff; }
.cal-table td.today { background: #FFF7ED; }
.cal-table td.cal-empty { background: var(--slate-50); }
.cal-date { font-weight: 800; margin-bottom: 0.25rem; color: var(--navy-dark); }
.cal-item { margin-top: 0.3rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; }
.cal-time, .cal-tutor { font-size: 0.75rem; color: var(--slate-600); font-weight: 700; }

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--slate-600);
  font-weight: 600;
}
.calendar-legend p { display: flex; align-items: center; gap: 0.35rem; margin: 0; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.guide-item-card {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}
.guide-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}
.guide-item-card h4 { font-size: 1rem; font-weight: 800; color: var(--navy-dark); margin-bottom: 0.4rem; }
.guide-item-card p { font-size: 0.86rem; color: var(--slate-600); line-height: 1.5; }

.empty-copy { color: var(--slate-600); font-weight: 700; padding: 0.4rem 0 0.2rem; }

.class-layer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}
.class-layer[hidden] { display: none; }
.class-layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.class-layer-panel {
  position: relative;
  width: min(920px, 100%);
  height: min(86vh, 860px);
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
}
.class-layer-panel.is-text {
  height: auto;
  max-height: 86vh;
}
#classLayer .class-layer-panel.is-delay {
  width: min(852px, 100%);
}
#classLayer .class-layer-panel.is-feedback {
  width: min(868px, 100%);
}
#classLayer .is-feedback .class-layer-close {
  right: 26px;
  width: 32px;
  height: 32px;
}
.class-layer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--navy-dark);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.class-layer-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.class-layer-frame { min-height: 0; }
.class-layer-close:hover { background: #ffdfc7; color: var(--primary-hover); }
.class-layer-close:focus-visible, .info-ok:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.info-panel h3 { padding-right: 40px; }
.info-panel .info-ok:hover { background: var(--primary-hover); }
.info-panel { padding: 1.6rem 1.5rem 1.3rem; overflow: auto; }
.info-panel h3 { font-size: 1.15rem; font-weight: 900; margin-bottom: 0.8rem; color: var(--navy-dark); }
.info-panel li { margin: 0.35rem 0 0.35rem 1.1rem; color: var(--slate-700); font-weight: 600; font-size: 0.92rem; line-height: 1.55; }
.info-panel .info-ok {
  display: block;
  margin: 1rem auto 0;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 1.4rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 992px) {
  .live-class-card { grid-template-columns: 1fr; }
  .guide-grid, .course-meta-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 2rem 1.4rem; }
  .page-hero h1 { font-size: 1.65rem; }
  .class-tabs { flex-direction: column; }
  .cal-table td { height: auto; min-height: 72px; }
}

@media (max-width: 600px) {
  #scheduleSection { padding: 1.2rem 0.7rem; }
  #scheduleSection .month-nav a { width: 44px; height: 44px; }
  .calendar-table-container { overflow: visible; }
  .calendar-table-container .cal-table { width: 100%; min-width: 0; table-layout: fixed; }
  .calendar-table-container .cal-table th,
  .calendar-table-container .cal-table td { padding: 4px 2px; text-align: center; font-size: 0.72rem; }
  .calendar-table-container .cal-table td { height: 54px; min-height: 54px; cursor: pointer; }
  .calendar-table-container .cal-table td.cal-empty { cursor: default; }
  .calendar-table-container .cal-date { margin: 0; font-size: 0.78rem; }
  .calendar-table-container .cal-item,
  .calendar-table-container .cal-table td > .badge-status.holiday { display: none; }
  .calendar-table-container .cal-day-marker {
    display: block;
    width: 7px;
    height: 7px;
    margin: 5px auto 0;
    border-radius: 50%;
    background: var(--primary);
  }
  .calendar-table-container .has-holiday:not(.has-schedule) .cal-day-marker { background: #94A3B8; }
  .calendar-table-container .cal-table td.is-selected {
    background: #FFF7ED;
    box-shadow: inset 0 0 0 2px var(--primary);
  }
  .calendar-table-container .cal-table td:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
  .mobile-calendar-detail:not([hidden]) {
    display: block;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: #fff;
  }
  .mobile-calendar-detail-heading { margin: 0 0 10px; color: var(--navy-dark); font-size: 0.95rem; font-weight: 800; }
  .mobile-calendar-detail-content { display: grid; gap: 10px; }
  .mobile-calendar-detail-content .cal-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
  }
  .mobile-calendar-detail-content .cal-time,
  .mobile-calendar-detail-content .cal-tutor { overflow-wrap: anywhere; }
  .mobile-calendar-detail-content .btn-mini,
  .mobile-calendar-detail-content .btn-feedback { min-height: 44px; padding: 8px 12px; }
  .mobile-calendar-detail-empty { margin: 0; color: var(--slate-600); font-size: 0.85rem; }
}
