/*
 * Imersiva — Custom styles
 */

:root {
  --imersiva-primary: #6366f1;
  --imersiva-primary-dark: #4f46e5;
  --imersiva-dark: #0f172a;
  --imersiva-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  --imersiva-surface: #f8fafc;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1e293b;
  background-color: var(--imersiva-surface);
}

.card {
  border-radius: 16px;
}

.btn {
  border-radius: 10px;
  font-weight: 500;
}

.form-control,
.form-select {
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--imersiva-primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

.breadcrumb {
  background: transparent;
  padding: 0;
}

/* Hero Section */
.hero-section {
  background: var(--imersiva-gradient);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.min-vh-75 {
  min-height: 75vh;
}

.text-gradient {
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card {
  padding: 0.5rem 0;
}

/* Hero Illustration */
.hero-illustration {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-circle {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.floating-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  animation: float 4s ease-in-out infinite;
}

.floating-card.card-1 { top: 10%; left: 5%; animation-delay: 0s; }
.floating-card.card-2 { top: 60%; right: 0; animation-delay: 1s; }
.floating-card.card-3 { bottom: 10%; left: 15%; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CTA Section */
.cta-section {
  background: var(--imersiva-gradient);
}

/* Course Cards */
.badge:empty {
  display: none !important;
}

.course-card {
  border-radius: 16px !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

.course-card-lessons-badge {
  background: rgba(99, 102, 241, 0.12) !important;
  color: #4338ca !important;
  font-weight: 600;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1) !important;
}

.course-card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4338ca 100%);
  position: relative;
}

.course-card-cover img,
.course-card-cover .course-cover-default-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.course-card-cover .course-cover-default {
  width: 100%;
  height: 100%;
}

.course-card:hover .course-card-cover img {
  transform: scale(1.04);
}

.course-card-meta {
  line-height: 1.35;
}

.welcome-banner {
  max-width: 40rem;
}

.welcome-banner .lead {
  font-size: 1.1rem;
}

.course-tabs .nav-link {
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  color: #475569;
  background: #e2e8f0;
  font-weight: 600;
}

.course-tabs .nav-link:hover {
  color: #0f172a;
  background: #cbd5e1;
}

.course-tabs .nav-link.active {
  color: #fff;
  background: var(--imersiva-primary);
}

.course-badge-bestseller {
  display: inline-flex;
  align-items: center;
  background: #c2e9eb;
  color: #1e6055;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.course-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.course-rating-pill .bi-star-fill {
  color: #f59e0b;
  font-size: 0.8rem;
}

.course-ratings-count {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.course-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.course-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.course-price--free {
  color: var(--imersiva-primary);
  font-size: 1.1rem;
}

.course-price-compare {
  font-size: 0.95rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.cart-thumb {
  width: 72px;
  height: 54px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4338ca 100%);
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 1.25rem;
}

.course-cover-preview {
  max-height: 220px;
  overflow: hidden;
}

.course-cover-preview img {
  max-height: 220px;
  object-fit: cover;
}

.course-show-cover {
  position: relative;
  max-height: 280px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4338ca 100%);
}

.course-show-cover img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

/* Course Header */
.course-header {
  background: var(--imersiva-gradient);
}

/* Course curriculum sidebar */
.course-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  top: 1.25rem;
}

.course-sidebar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.course-sidebar__nav {
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.course-sidebar__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  padding: 0.9rem 1rem;
  color: #0f172a;
  transition: background 0.15s ease, color 0.15s ease;
}

.course-sidebar__item:hover {
  background: #f8fafc;
}

.course-sidebar__item.active {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: inset 3px 0 0 var(--imersiva-primary);
}

.course-sidebar__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.course-sidebar__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.course-sidebar__title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.course-sidebar__done {
  color: #16a34a;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.course-sidebar__hints {
  display: flex;
  gap: 0.45rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.lesson-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--imersiva-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.lesson-number--sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

.course-lesson-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 280px;
}

.course-lesson-player__frame {
  position: relative;
}

.course-lesson-player__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(49, 46, 129, 0.72));
  z-index: 2;
}

.course-lesson-player__frame.is-playing .course-lesson-player__overlay {
  display: none;
}

.place-items-center {
  place-items: center;
}

.course-outline__list {
  max-height: 420px;
  overflow-y: auto;
}

.course-outline__topic {
  background: #f8fafc;
}

.course-outline__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #f1f5f9;
}

.course-outline__item:last-child {
  border-bottom: 0;
}

/* Full-screen classroom / study area */
.classroom-body {
  margin: 0;
  background: #0b1220;
  min-height: 100vh;
}

.classroom {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0b1220;
  color: #e2e8f0;
}

.classroom__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.classroom__topbar-left,
.classroom__topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.classroom__back {
  color: #cbd5e1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.classroom__back:hover {
  color: #fff;
}

.classroom__course-title {
  font-weight: 600;
  max-width: min(52vw, 640px);
}

.classroom__progress {
  color: #94a3b8;
  font-size: 0.9rem;
}

.classroom__body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 0;
}

.classroom--sidebar-collapsed .classroom__body {
  grid-template-columns: minmax(0, 1fr);
}

.classroom--sidebar-collapsed .classroom__sidebar {
  display: none;
}

.classroom__stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0b1220;
  overflow-y: auto;
}

.classroom__lesson {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.classroom__lesson.is-active {
  display: flex;
}

.classroom__lesson-head {
  padding: 1rem 1.25rem 0.5rem;
}

.classroom__player {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.5rem 1rem 0;
}

.classroom__player-frame {
  position: relative;
  flex: 1;
  min-height: min(62vh, 720px);
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.classroom__player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.classroom__player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.75), rgba(49, 46, 129, 0.7));
  z-index: 2;
}

.classroom__player.is-playing .classroom__player-overlay,
.classroom__player-overlay.d-none {
  display: none;
}

.classroom__materials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.5rem;
}

.classroom__sidebar {
  background: #111827;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.classroom__sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.classroom__sidebar-list {
  overflow-y: auto;
  flex: 1;
}

.classroom__item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.classroom__item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.classroom__item.is-active {
  background: rgba(99, 102, 241, 0.18);
  box-shadow: inset 3px 0 0 var(--imersiva-primary);
}

.classroom__item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.classroom__item-title {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
}

.classroom__item-hints {
  display: flex;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.classroom__empty {
  margin: 2rem 1.25rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  text-align: center;
  color: #94a3b8;
}

.classroom__empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.classroom__empty--full {
  margin: auto;
  max-width: 420px;
}

@media (max-width: 991.98px) {
  .classroom__body {
    grid-template-columns: 1fr;
  }

  .classroom__sidebar {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 42vh;
  }

  .classroom--sidebar-collapsed .classroom__sidebar {
    display: none;
  }

  .classroom__player-frame {
    min-height: 42vh;
  }
}

/* Legacy lesson list (kept for other pages if needed) */
.lesson-list {
  border-radius: 12px;
  overflow: hidden;
}

.lesson-list .list-group-item {
  border-left: none;
  border-right: none;
}

/* Upload Area */
.upload-area {
  border-style: dashed !important;
  transition: border-color 0.2s;
}

.upload-area:hover {
  border-color: var(--imersiva-primary) !important;
}

/* Quizzes */
.question-block {
  border-left: 4px solid var(--imersiva-primary) !important;
}

.quiz-option {
  border: 1px solid #e2e8f0;
  transition: border-color 0.15s, background-color 0.15s;
  cursor: pointer;
}

.quiz-option:hover {
  border-color: var(--imersiva-primary);
  background-color: rgba(99, 102, 241, 0.04);
}

.quiz-option:has(input:checked) {
  border-color: var(--imersiva-primary);
  background-color: rgba(99, 102, 241, 0.08);
}

.score-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.score-circle-lg {
  width: 110px;
  height: 110px;
  font-size: 1.9rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Bootstrap overrides */
.btn-primary {
  background-color: var(--imersiva-primary);
  border-color: var(--imersiva-primary);
}

.btn-primary:hover {
  background-color: var(--imersiva-primary-dark);
  border-color: var(--imersiva-primary-dark);
}

.text-primary {
  color: var(--imersiva-primary) !important;
}

.bg-primary {
  background-color: var(--imersiva-primary) !important;
}

.badge.bg-primary {
  background-color: var(--imersiva-primary) !important;
}

.access-log-table code {
  font-size: 0.8rem;
}

.navbar-brand {
  font-size: 1.35rem;
}

.navbar .nav-item.dropdown > .dropdown-toggle {
  color: rgba(255, 255, 255, 0.75);
}

.navbar .nav-item.dropdown > .dropdown-toggle:hover,
.navbar .nav-item.dropdown > .dropdown-toggle:focus,
.navbar .nav-item.dropdown > .dropdown-toggle.show {
  color: #fff;
}

.navbar .dropdown-menu {
  z-index: 1080;
}

.impersonation-banner {
  background: #b45309;
  color: #fff;
  font-size: 0.92rem;
  position: sticky;
  top: 0;
  z-index: 1070;
}

.instructor-sidebar__divider {
  height: 1px;
  margin: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.16);
}

.admin-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-nav-section + .admin-nav-section {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav-section__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.85rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.admin-nav-section__label i {
  font-size: 0.85rem;
  opacity: 0.9;
}

.admin-sidebar {
  background: linear-gradient(180deg, #111827 0%, #1f2937 55%, #3f1d1d 100%);
}

.admin-sidebar .instructor-sidebar__nav {
  gap: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.admin-sidebar .instructor-sidebar__link {
  font-weight: 500;
  padding: 0.58rem 0.85rem;
  border-radius: 0.65rem;
}

.admin-sidebar .instructor-sidebar__link i {
  width: 1.1rem;
  text-align: center;
  opacity: 0.9;
}

.admin-sidebar .instructor-sidebar__link.is-active {
  background: rgba(239, 68, 68, 0.18);
  box-shadow: inset 3px 0 0 #ef4444;
  font-weight: 600;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
}

.brand-logo--full {
  height: 2rem;
}

.brand-logo--icon {
  height: 2rem;
  width: auto;
}

.brand-logo--footer {
  height: 1.85rem;
}

.brand-wordmark--footer {
  font-size: 1.2rem;
  color: #fff;
}

.brand-logo--auth {
  height: 2.25rem;
  margin-inline: 0;
}

.brand-wordmark--auth {
  font-size: 1.35rem;
  color: #0f172a;
  background: none;
  -webkit-text-fill-color: unset;
}

.brand-logo--hero {
  height: 7.5rem;
  width: auto;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.35));
}

.navbar-brand .brand-logo--full {
  height: 2rem;
}

.navbar-brand .brand-logo--icon,
.brand-logo--nav {
  height: 1.85rem;
  width: auto;
}

.brand-wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #fff;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

@media (min-width: 992px) {
  .navbar-brand .brand-logo--nav {
    height: 1.5rem;
  }

  .brand-wordmark {
    font-size: 1.3rem;
  }
}

.classroom__brand {
  flex: 0 0 auto;
  margin-right: 0.25rem;
}

.classroom__brand .brand-logo--icon {
  height: 1.75rem;
}

.course-cover-default {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 85% 20%, rgba(129, 140, 248, 0.45), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(99, 102, 241, 0.25), transparent 40%),
    linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4338ca 100%);
}

.course-cover-default__mark {
  height: 42% !important;
  width: auto !important;
  max-width: 46%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.course-card-cover .course-cover-default,
.course-show-cover .course-cover-default,
.cart-thumb .course-cover-default {
  position: absolute;
  inset: 0;
}

.cart-thumb .course-cover-default__mark {
  height: 70% !important;
  max-width: 70%;
}

.classroom__accordion {
  overflow-y: auto;
  flex: 1;
}

.classroom__topic {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.classroom__topic-btn {
  background: #111827 !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
  font-weight: 600;
  padding: 0.85rem 1rem;
  gap: 0.75rem;
}

.classroom__topic-btn:not(.collapsed) {
  background: #1e293b !important;
}

.classroom__topic-btn::after {
  filter: invert(1);
}

.classroom__topic-title {
  flex: 1;
  text-align: left;
}

.classroom__topic-meta {
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
}

.classroom__sidebar-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.classroom__pdf {
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.classroom__pdf-frame {
  width: 100%;
  flex: 1;
  min-height: min(72vh, 860px);
  border: 0;
  border-radius: 0;
  background: #525659;
}

.classroom__tabs {
  margin: 0 1rem 1.25rem;
  background: #fff;
  color: #0f172a;
  border-radius: 14px;
  overflow: hidden;
}

.classroom__tabs-nav .nav-link {
  color: #64748b;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-weight: 600;
}

.classroom__tabs-nav .nav-link.active {
  color: var(--imersiva-primary);
  background: transparent;
  border-bottom-color: var(--imersiva-primary);
}

.classroom-panel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.classroom-chat {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: min(52vh, 480px);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.classroom-chat__thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.classroom-chat__empty {
  margin: auto;
  text-align: center;
  color: #64748b;
  padding: 1.5rem;
}

.classroom-chat__empty i {
  font-size: 1.75rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.5rem;
}

.classroom-chat__empty p {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: #334155;
}

.classroom-chat__row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(85%, 420px);
}

.classroom-chat__row--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.classroom-chat__row--theirs {
  align-self: flex-start;
}

.classroom-chat__avatar {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #cbd5e1;
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.classroom-chat__avatar--teacher {
  background: var(--imersiva-primary);
  color: #fff;
}

.classroom-chat__bubble-wrap {
  min-width: 0;
}

.classroom-chat__meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  padding: 0 0.25rem;
}

.classroom-chat__row--mine .classroom-chat__meta {
  justify-content: flex-end;
}

.classroom-chat__name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.classroom-chat__role {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--imersiva-primary);
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
}

.classroom-chat__time {
  font-size: 0.7rem;
  color: #94a3b8;
}

.classroom-chat__bubble {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px 14px 14px 4px;
  padding: 0.65rem 0.85rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.classroom-chat__bubble p {
  margin-bottom: 0.35rem;
}

.classroom-chat__bubble p:last-child {
  margin-bottom: 0;
}

.classroom-chat__bubble--mine {
  background: var(--imersiva-primary);
  border-color: transparent;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}

.classroom-chat__bubble--teacher {
  border-color: rgba(99, 102, 241, 0.25);
}

.classroom-chat__composer {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.classroom-chat__input {
  resize: none;
  min-height: 2.5rem;
  max-height: 7rem;
  border-radius: 1.25rem;
  padding: 0.55rem 0.9rem;
}

.classroom-chat__send {
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
}

@media (max-width: 991.98px) {
  .classroom__body {
    grid-template-columns: 1fr;
  }

  .classroom__sidebar {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 42vh;
  }
}

/* Instructor panel */
.instructor-body {
  margin: 0;
  background: #f1f5f9;
  min-height: 100vh;
}

.instructor-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.instructor-sidebar {
  background: #0f172a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.instructor-sidebar__brand {
  padding: 0.25rem 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.instructor-sidebar__role {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.instructor-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.instructor-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 600;
}

.instructor-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.instructor-sidebar__link.is-active {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}

.instructor-sidebar__foot {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.instructor-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.instructor-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.instructor-content {
  padding: 1.5rem;
}

.instructor-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  height: 100%;
}

.instructor-stat-card__label {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.instructor-stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

@media (max-width: 991.98px) {
  .instructor-shell {
    grid-template-columns: 1fr;
  }

  .instructor-sidebar {
    position: relative;
    height: auto;
  }

  .instructor-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Auth — Google OAuth */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-google-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 600;
  border-color: #cbd5e1 !important;
}

.auth-google-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.auth-google-btn__icon {
  flex-shrink: 0;
}

/* Course landing (Udemy-style) */
.udemy-page {
  position: relative;
  background: #fff;
  padding-bottom: 3rem;
}

.udemy-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 20rem;
  background: #1c1d1f;
  z-index: 0;
}

.udemy-page__inner {
  position: relative;
  z-index: 1;
}

.udemy-hero-copy {
  color: #fff;
  padding-bottom: 0.5rem;
}

.udemy-hero__title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.udemy-hero__lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 42rem;
}

.udemy-hero__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #f3ca8c;
  font-size: 0.92rem;
}

.udemy-hero__rating .bi-star-fill {
  color: #f3ca8c;
}

.udemy-hero__muted,
.udemy-hero__author {
  color: rgba(255, 255, 255, 0.82);
}

.udemy-section__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1c1d1f;
  margin-bottom: 1rem;
}

.udemy-learn-box {
  border: 1px solid #d1d7dc;
  border-radius: 0.25rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
}

.udemy-learn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
}

.udemy-learn-list li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: #2d2f31;
  font-size: 0.95rem;
  line-height: 1.45;
}

.udemy-learn-list .bi-check2 {
  color: #2d2f31;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.udemy-includes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.5rem;
}

.udemy-includes li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: #2d2f31;
  font-size: 0.95rem;
}

.udemy-includes .bi {
  color: #6a6f73;
  margin-top: 0.1rem;
}

.udemy-expand-link {
  color: #5624d0 !important;
  font-weight: 700;
  text-decoration: underline;
  font-size: 0.92rem;
}

.udemy-curriculum__item {
  border: 1px solid #d1d7dc !important;
  border-radius: 0 !important;
  margin-top: -1px;
  overflow: hidden;
}

.udemy-curriculum__item:first-child {
  border-radius: 0.25rem 0.25rem 0 0 !important;
}

.udemy-curriculum__item:last-child {
  border-radius: 0 0 0.25rem 0.25rem !important;
}

.udemy-curriculum .accordion-button {
  background: #f7f9fa;
  color: #1c1d1f;
  font-weight: 700;
  box-shadow: none !important;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
}

.udemy-curriculum .accordion-button:not(.collapsed) {
  background: #f7f9fa;
  color: #1c1d1f;
}

.udemy-curriculum .accordion-button::after {
  margin-left: 0;
  order: -1;
  margin-right: 0.75rem;
}

.udemy-curriculum__topic-title {
  flex: 1;
  text-align: left;
}

.udemy-curriculum__topic-meta {
  color: #6a6f73;
  font-weight: 400;
  font-size: 0.85rem;
  white-space: nowrap;
}

.udemy-curriculum__lesson {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem 0.85rem 2.5rem;
  border-top: 1px solid #d1d7dc;
  background: #fff;
}

.udemy-curriculum__lesson--preview {
  padding: 0;
}

.udemy-curriculum__lesson-hit {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.1rem 0.85rem 2.5rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  transition: background 0.15s ease;
}

.udemy-curriculum__lesson-hit:hover {
  background: #f7f9fa;
}

.udemy-curriculum__lesson-hit:hover .udemy-curriculum__lesson-title,
.udemy-curriculum__lesson-hit:hover .udemy-curriculum__preview-link {
  color: #5624d0;
}

.udemy-curriculum__lesson-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.udemy-curriculum__lesson-hit > .bi,
.udemy-curriculum__lesson-main > .bi {
  color: #6a6f73;
  margin-top: 0.2rem;
  flex-shrink: 0;
  line-height: 1;
}

.udemy-curriculum__lesson-body {
  flex: 1;
  min-width: 0;
}

.udemy-curriculum__lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.15rem;
}

.udemy-curriculum__lesson-title {
  font-size: 0.92rem;
  color: #2d2f31;
  line-height: 1.35;
  min-width: 0;
}

.udemy-curriculum__lesson-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.udemy-curriculum__preview-link {
  border: 0;
  background: transparent;
  color: #5624d0;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: underline;
  padding: 0;
  line-height: 1.35;
}

.udemy-curriculum__preview-badge {
  display: inline-block;
  margin-left: 0.35rem;
  color: #1e6055;
  background: #c2e9eb;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.udemy-buy-card {
  background: #fff;
  border: 1px solid #d1d7dc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.udemy-buy-card--sticky {
  position: sticky;
  top: 5.5rem;
  z-index: 20;
  align-self: flex-start;
  width: 100%;
}

.udemy-buy-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1c1d1f;
  overflow: hidden;
}

.udemy-buy-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.udemy-buy-card__media .course-cover-default {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.udemy-buy-card__media .course-cover-default__mark {
  height: 48% !important;
  max-width: 42%;
  margin: 0;
}

.udemy-buy-card__preview {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 29, 31, 0.45);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.udemy-buy-card__play {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c1d1f;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.udemy-buy-card__body {
  padding: 1.25rem;
}

.udemy-buy-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.udemy-buy-card__amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1c1d1f;
  letter-spacing: -0.02em;
}

.udemy-buy-card__amount--free {
  color: var(--imersiva-primary);
}

.udemy-buy-card__compare {
  color: #6a6f73;
  text-decoration: line-through;
  font-size: 1rem;
}

.udemy-preview-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 0.5rem;
  overflow: hidden;
}

.udemy-preview-player__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.udemy-preview-player__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
}

.udemy-preview-player.is-playing .udemy-preview-player__overlay {
  display: none;
}

.udemy-preview-pdf {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f8fafc;
  min-height: min(70vh, 640px);
}

.udemy-preview-pdf__frame {
  width: 100%;
  height: min(70vh, 640px);
  border: 0;
  display: block;
  background: #fff;
}

@media (max-width: 991.98px) {
  .udemy-page::before {
    height: 18rem;
  }

  .udemy-buy-card--sticky {
    position: sticky;
    top: 5.5rem;
  }

  .udemy-learn-list,
  .udemy-includes {
    grid-template-columns: 1fr;
  }

  .udemy-curriculum__lesson,
  .udemy-curriculum__lesson-hit {
    padding-left: 1.1rem;
  }

  .udemy-curriculum__lesson-top {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

/* —— Certificados —— */
.certificate-page {
  max-width: 920px;
}

.certificate-sheet {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.certificate-sheet__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.certificate-sheet__logo {
  width: 48px;
  height: 48px;
}

.certificate-sheet__platform {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.certificate-sheet__tag {
  color: #64748b;
  font-size: 0.9rem;
}

.certificate-sheet__lead {
  color: #64748b;
  margin-bottom: 0.35rem;
}

.certificate-sheet__name {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.certificate-sheet__body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #334155;
  max-width: 40rem;
  margin-bottom: 2rem;
}

.certificate-sheet__meta {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.25rem;
  align-items: end;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
}

.certificate-sheet__meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.certificate-sheet__meta-value {
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}

.certificate-sheet__qr {
  text-align: center;
}

.certificate-sheet__qr svg {
  width: 112px;
  height: 112px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.35rem;
}

.certificate-sheet__verify {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.company-sidebar {
  background: #0b3b4a;
}

@media print {
  .no-print,
  .navbar,
  .classroom__topbar,
  .instructor-sidebar,
  .instructor-topbar {
    display: none !important;
  }

  .certificate-page {
    max-width: none;
    padding: 0 !important;
  }

  .certificate-sheet {
    box-shadow: none;
    border: 2px solid #0f172a;
    border-radius: 0;
    min-height: 90vh;
  }
}

@media (max-width: 767.98px) {
  .certificate-sheet__meta {
    grid-template-columns: 1fr;
  }

  .certificate-sheet__qr {
    justify-self: start;
  }
}

