/* main.css - Estilos visuales de la plataforma educativa AstroCode Edu */
:root {
  /* Paleta Cósmica AstroCode Edu: Azul Espacial Profundo / Índigo Cósmico / Cian Neón */
  --sidebar-bg: #0f172a;           /* Azul pizarra noche profunda */
  --sidebar-hover: #1e293b;        /* Resalte azul cósmico */
  --sidebar-active: #2563eb;       /* Azul real activo espacial */
  --sidebar-text: #94a3b8;         /* Texto plateado estelar */
  --sidebar-active-text: #ffffff;  /* Texto blanco brillante */
  --sidebar-border-active: #38bdf8;/* Píldora cian neón */
  
  --header-bg: #0b1120;            /* Cabecera cósmica profunda */
  --header-text: #e2e8f0;          /* Texto cabecera */
  --logo-yellow: #38bdf8;          /* Acento cian estelar */
  
  --banner-yellow: #f59e0b;
  --banner-dark-green: #1e293b;
  --banner-text: #0f172a;
  
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  
  --color-primary: #2563eb;        /* Azul espacial */
  --color-primary-hover: #1d4ed8;
  --color-accent: #0ea5e9;         /* Cian */
  --color-danger: #ef4444;
  --color-info: #0284c7;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ============================================================
   LAYOUT PRINCIPAL: SIDEBAR + CONTENIDO
   ============================================================ */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* =======================================================
   SIDEBAR LATERAL MODERNO: PASTILLAS, GLOW & CATEGORÍAS
   ======================================================= */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 90;
}

.sidebar-header {
  height: 62px;
  background-color: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-logo .monkey-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.btn-toggle-sidebar {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-toggle-sidebar:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: #38bdf8;
}

/* MINI TARJETA DE MISIÓN EN CURSO */
.sidebar-mission-card {
  margin: 12px 12px 6px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.sidebar-mission-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.2);
}

.mission-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.mission-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.mission-card-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #38bdf8;
  text-transform: uppercase;
}

.mission-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mission-card-sub {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.mission-card-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  margin: 8px 0;
}

.mission-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.btn-resume-mission {
  width: 100%;
  padding: 6px 10px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.btn-resume-mission:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* NAVEGACIÓN Y SECCIONES */
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #64748b;
  padding: 10px 18px 4px 18px;
  text-transform: uppercase;
}

/* PASTILLAS FLOTANTES & GLOW */
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 10px;
  padding: 9px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: none;
  border: 1px solid transparent;
}

.nav-item .nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.38);
  border-color: rgba(56, 189, 248, 0.4);
}

/* BADGES DE COLOR DINÁMICOS */
.nav-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.badge-blue { background: rgba(30, 58, 138, 0.7); color: #93c5fd; border: 1px solid rgba(147, 197, 253, 0.3); }
.badge-cyan { background: rgba(12, 74, 110, 0.7); color: #7dd3fc; border: 1px solid rgba(125, 211, 252, 0.3); }
.badge-green { background: rgba(6, 78, 59, 0.7); color: #6ee7b7; border: 1px solid rgba(110, 231, 183, 0.3); }
.badge-live { background: #0284c7; color: #ffffff; box-shadow: 0 0 8px rgba(2, 132, 199, 0.6); }
.badge-orange { background: rgba(124, 45, 18, 0.7); color: #fdba74; border: 1px solid rgba(253, 186, 116, 0.3); }
.badge-purple { background: rgba(88, 28, 135, 0.7); color: #d8b4fe; border: 1px solid rgba(216, 180, 254, 0.3); }
.badge-gold { background: linear-gradient(135deg, #d97706, #b45309); color: #fef3c7; box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3); }

/* TARJETA DE PERFIL Y RANGO ESCOLAR */
.sidebar-user-card {
  margin: 6px 10px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-user-card:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-rank {
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-school {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FOOTER DEL SIDEBAR */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-theme-toggle {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: #facc15;
}

.help-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
  text-decoration: none;
}

.help-link:hover {
  color: #ffffff;
}

/* =======================================================
   ESTADO PLEGADO / COLAPSADO (SIDEBAR-COLLAPSED)
   ======================================================= */
.sidebar.sidebar-collapsed {
  width: 72px;
}

.sidebar.sidebar-collapsed .logo-text,
.sidebar.sidebar-collapsed .sidebar-mission-card,
.sidebar.sidebar-collapsed .nav-section-title,
.sidebar.sidebar-collapsed .nav-label,
.sidebar.sidebar-collapsed .nav-badge,
.sidebar.sidebar-collapsed .sidebar-user-info,
.sidebar.sidebar-collapsed .theme-toggle-text,
.sidebar.sidebar-collapsed .help-text {
  display: none !important;
}

.sidebar.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 0 8px;
}

.sidebar.sidebar-collapsed .sidebar-logo {
  justify-content: center;
}

.sidebar.sidebar-collapsed .btn-toggle-sidebar {
  position: absolute;
  top: 17px;
  right: -13px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.sidebar.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 11px 0;
  margin: 4px 8px;
}

.sidebar.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
  padding: 8px 0;
  margin: 6px 8px;
}

.sidebar.sidebar-collapsed .btn-theme-toggle {
  justify-content: center;
  padding: 8px 0;
}

.sidebar.sidebar-collapsed .help-link {
  justify-content: center;
}

/* =======================================================
   TEMA AULA PROYECTOR (LIGHT CLASSROOM THEME)
   ======================================================= */
body.theme-classroom-light {
  --sidebar-bg: #f8fafc;
  --sidebar-hover: #e2e8f0;
  --sidebar-active: #0284c7;
  --sidebar-text: #475569;
  --sidebar-active-text: #ffffff;
  --header-bg: #ffffff;
  background-color: #f1f5f9;
}

body.theme-classroom-light .sidebar {
  background-color: #f8fafc;
  border-right: 1px solid #e2e8f0;
  color: #334155;
}

body.theme-classroom-light .sidebar-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-classroom-light .sidebar-logo {
  color: #0284c7;
}

body.theme-classroom-light .btn-toggle-sidebar {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

body.theme-classroom-light .sidebar-mission-card {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

body.theme-classroom-light .mission-card-title {
  color: #0f172a;
}

body.theme-classroom-light .mission-card-sub {
  color: #64748b;
}

body.theme-classroom-light .nav-section-title {
  color: #94a3b8;
}

body.theme-classroom-light .nav-item {
  color: #334155;
}

body.theme-classroom-light .nav-item:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.theme-classroom-light .nav-item.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
}

body.theme-classroom-light .sidebar-user-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.theme-classroom-light .sidebar-user-name {
  color: #0f172a;
}

body.theme-classroom-light .sidebar-user-avatar {
  background: #f0f9ff;
  border-color: #0284c7;
}

body.theme-classroom-light .sidebar-footer {
  border-top: 1px solid #e2e8f0;
}

body.theme-classroom-light .btn-theme-toggle {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

body.theme-classroom-light .help-link {
  color: #64748b;
}

body.theme-classroom-light .top-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
}

body.theme-classroom-light .top-navbar #header-user-greeting {
  color: #1e293b;
}

.help-link:hover {
  color: #ffffff;
}

/* ÁREA DE CONTENIDO CENTRAL */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f7f9f4;
}

/* TOP NAVBAR */
.top-navbar {
  height: 60px;
  background-color: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #ffffff;
  border-bottom: 2px solid rgba(0,0,0,0.15);
}

.nav-role-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-tag {
  background-color: #4f46e5;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.user-profile-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.user-profile-badge:hover {
  transform: scale(1.05);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  background: #5b8296;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-hamburger {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 6px 4px;
}

.btn-hamburger span {
  display: block;
  width: 22px;
  height: 3.5px;
  background-color: #fab538;
  border-radius: 2px;
  transition: all 0.2s;
}

.btn-hamburger:hover span {
  background-color: #f59e0b;
}

/* DROPDOWN FLOTANTE EXACTO A LA CAPTURA */
.user-profile-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  border: 1px solid #e2e8f0;
  display: none;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  min-width: 320px;
  z-index: 1000;
  animation: fadeInDown 0.15s ease-out;
}

.user-profile-dropdown.active {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-avatar-box {
  width: 78px;
  height: 78px;
  min-width: 78px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5b8296;
}

.dropdown-divider {
  width: 1px;
  height: 75px;
  background-color: #e2e8f0;
}

.dropdown-info-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.dropdown-user-name {
  font-size: 16px;
  font-weight: 800;
  color: #1d4ed8; /* Azul real cósmico */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0284c7; /* Azul idéntico a la captura */
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 3px 0;
  transition: color 0.15s;
}

.dropdown-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

.dropdown-link .link-icon {
  font-size: 14px;
}

.dropdown-extra-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}

.btn-dropdown-subaction {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-dropdown-subaction:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* PESTAÑAS DEL MODAL DE PERFIL */
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}

.profile-tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.profile-tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
}

.avatar-grid-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.avatar-choice-card {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  background: #ffffff;
}

.avatar-choice-card:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.avatar-choice-card.selected {
  border-color: #65a30d;
  background: #f7fee7;
  box-shadow: 0 0 0 2px rgba(101, 163, 13, 0.25);
}

.avatar-choice-card .avatar-icon-preview {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.avatar-choice-card span {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.btn-toggle-role {
  background-color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle-role:hover {
  background-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* VISTAS DE PANTALLA */
.view-container {
  flex: 1;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}

.view-container.active {
  display: flex;
}

/* ============================================================
   BANNER DE BIENVENIDA (IDÉNTICO A LA CAPTURA 1)
/* ============================================================
   HERO DASHBOARD BANNER CÓSMICO MODERNO (REDISEÑO STEAM)
   ============================================================ */
.welcome-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #0b132b 100%);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.35);
  gap: 24px;
}

.banner-glow-orb {
  position: absolute;
  top: -60px;
  right: 25%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(25px);
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1.2;
  position: relative;
  z-index: 2;
}

.banner-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.banner-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  border: 3px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transition: transform 0.25s ease;
}

.banner-avatar:hover {
  transform: scale(1.06) rotate(4deg);
}

.banner-status-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: #10b981;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

.banner-welcome-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-badge-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.8px;
  width: fit-content;
  text-transform: uppercase;
}

.banner-greeting {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  margin: 2px 0 0 0;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.banner-greeting .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.banner-subtitle {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.banner-subtitle strong {
  color: #cbd5e1;
}

/* CENTRO: TARJETA DE MISIÓN & PROGRESO */
.banner-center {
  flex: 1.1;
  position: relative;
  z-index: 2;
}

.mission-status-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.mission-status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #818cf8, transparent);
  border-radius: 14px 14px 0 0;
}

.mission-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mission-tag-pill {
  font-size: 10.5px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.banner-achievements {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fef08a;
  cursor: pointer;
  transition: background 0.15s;
}

.banner-achievements:hover {
  background: rgba(250, 204, 21, 0.25);
}

.banner-active-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.banner-progress-track {
  flex: 1;
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #06b6d4 50%, #10b981 100%);
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: width 0.4s ease;
}

.banner-progress-percent {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  min-width: 36px;
  text-align: right;
}

/* DERECHA: BOTONES DE ACCIÓN PRINCIPALES */
.banner-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.btn-banner-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-banner-resume {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-banner-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.6);
  filter: brightness(1.08);
}

.btn-banner-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.btn-banner-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* MODO CLARO AULA PROYECTOR */
body.theme-classroom-light .welcome-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #f1f5f9 100%);
  border-bottom: 2px solid #bae6fd;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.1);
}

body.theme-classroom-light .banner-greeting {
  color: #0f172a;
}

body.theme-classroom-light .banner-subtitle {
  color: #475569;
}

body.theme-classroom-light .mission-status-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.theme-classroom-light .banner-active-title {
  color: #0f172a;
}

body.theme-classroom-light .banner-progress-track {
  background: #e2e8f0;
}

body.theme-classroom-light .btn-banner-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* ============================================================
   BARRA DE FILTROS (CAPTURA 1 Y 2)
   ============================================================ */
.filter-bar-container {
  background-color: #ffffff;
  padding: 14px 32px;
  margin: 20px 32px 0 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.filter-tab {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding-bottom: 4px;
}

.filter-tab.active {
  color: #2563eb;
  border-bottom: 3px solid #2563eb;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
}

.filter-group select,
.filter-group input {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #1e293b;
  background-color: #ffffff;
  outline: none;
}

.btn-update-filters {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-update-filters:hover {
  text-decoration: underline;
}

.search-box-filter {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 260px;
}

.search-box-filter input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-box-filter input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.search-box-filter .search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

/* PÍLDORAS DE CATEGORÍA RÁPIDAS */
.category-pills-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0 16px 0;
  margin-bottom: 24px;
}

.pill-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.pill-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.pill-btn.active {
  background: #0f172a;
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.pill-btn .pill-count {
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.pill-btn.active .pill-count {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

/* ============================================================
   GRID DE CURSOS (CAPTURAS 4 Y 5)
   ============================================================ */
.courses-section {
  padding: 24px 32px 48px 32px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border-bottom: 2px solid #38bdf8;
  padding-bottom: 6px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.course-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

.card-top-bar.badge-blue { background-color: #38bdf8; }
.card-top-bar.badge-green { background-color: #4ade80; color: #064e3b; }
.card-top-bar.badge-amber { background-color: #f59e0b; }
.card-top-bar.badge-purple { background-color: #8b5cf6; }
.card-top-bar.badge-pink { background-color: #ec4899; }
.card-top-bar.badge-indigo { background-color: #4f46e5; }
.card-top-bar.badge-teal { background-color: #0d9488; }
.card-top-bar.badge-orange { background-color: #ea580c; }

.card-art-box {
  height: 136px;
  background-color: #0b1329;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #1e293b;
}

.card-art-box svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.35s ease;
}

.course-card:hover .card-art-box svg {
  transform: scale(1.03);
}

.card-art-box .art-icon {
  font-size: 54px;
}

.card-art-box .lock-overlay {
  position: absolute;
  background: rgba(0,0,0,0.35);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.card-bottom-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-bottom-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.card-bottom-info p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}

.card-footer-action {
  padding: 10px 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-card-play {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.btn-card-play:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.38);
  filter: brightness(1.05);
}

.btn-card-play:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

/* ============================================================
   VISTA: MIS AULAS (CAPTURA 3)
   ============================================================ */
.classrooms-view-content {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.classrooms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.classrooms-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #334155;
}

.classrooms-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: white;
  padding: 9px 22px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.classrooms-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.search-input-box {
  flex: 1;
  position: relative;
}

.search-input-box input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.search-input-box .search-icon {
  position: absolute;
  left: 10px;
  top: 9px;
  color: #94a3b8;
}

/* TABLA DE AULAS (IDÉNTICA A CAPTURA 3) */
.classrooms-table-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.classrooms-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.classrooms-table th {
  background-color: #f8fafc;
  padding: 12px 16px;
  color: #475569;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}

.classrooms-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.classrooms-table tr:hover {
  background-color: #f8fafc;
}

.class-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.class-code-badge:hover {
  background-color: #bae6fd;
}

/* MODALES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  padding: 0 !important;
  width: 92%;
  max-width: 540px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  overflow: hidden;
  border: none;
}

.modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #0f172a;
  transform: scale(1.08);
}

.modal-body {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.form-group input,
.form-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
  margin-top: 0;
}

/* TOAST NOTIFICACIÓN */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
  font-size: 13px;
  font-weight: 600;
  display: none;
  z-index: 2000;
}

.toast-msg.show {
  display: block;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   MAPA DE MISIONES Y RUTA DE NIVELES (INTERACTIVO)
   ============================================================ */
.mission-path-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 2px solid #bae6fd;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mission-path-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0f2fe;
  padding-bottom: 12px;
}

.mission-path-scroller {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 4px 16px 4px;
}

.mission-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 85px;
  cursor: pointer;
  transition: transform 0.2s;
  user-select: none;
}

.mission-node:hover {
  transform: translateY(-4px);
}

.mission-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  border: 3px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
  position: relative;
  transition: all 0.2s;
}

.mission-node.completed .mission-circle {
  background: #10b981;
  border-color: #6ee7b7;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.mission-node.locked .mission-circle {
  background: #94a3b8;
  border-color: #cbd5e1;
  box-shadow: none;
}

.mission-stars {
  font-size: 11px;
  color: #f59e0b;
}

.mission-label {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-align: center;
  max-width: 85px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mission-connector {
  width: 24px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: -18px;
}

.mission-connector.active {
  background: #38bdf8;
}

/* ============================================================
   MAPA DE CAMINO SINUOSO CON CANDADOS (ESTILO CODEMONKEY)
   ============================================================ */
.quest-map-card-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 2px solid #bae6fd;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quest-map-svg-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 3.5px solid #1e293b;
  background: #64b5f6;
  position: relative;
  user-select: none;
}

.quest-map-svg-container svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Animaciones del mapa */
@keyframes qmPulse {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.12); opacity: 0.35; }
  100% { transform: scale(1); opacity: 0.9; }
}

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

@keyframes qmShakeLock {
  0%, 100% { transform: rotate(0deg); }
  20%, 60% { transform: rotate(-9deg); }
  40%, 80% { transform: rotate(9deg); }
}

.qm-node-group {
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.qm-node-group:hover {
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35));
}

.qm-node-current {
  animation: qmBobbing 2.2s ease-in-out infinite;
}

.qm-node-pulse {
  transform-origin: center;
  animation: qmPulse 2s infinite ease-in-out;
}

.qm-shake-animation {
  animation: qmShakeLock 0.45s ease-in-out;
}

/* Modal Mapa de Camino Sinuoso */
#modal-mission-map .modal-dialog {
  max-width: 1060px !important;
  width: 95vw !important;
  border-radius: 20px !important;
  border: 4px solid #1e293b !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6) !important;
  overflow: hidden !important;
  background: #64b5f6 !important;
}

/* ========================================================
   MODAL DE SESIONES Y PLAN CURRICULAR (AMPLIADO PARA LECTURA CÓMODA)
   ======================================================== */
#modal-course-sessions .modal-dialog {
  padding: 0 !important;
  max-width: 1260px !important;
  width: 95% !important;
  max-height: 94vh !important;
  height: 92vh !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  gap: 0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  flex-direction: column !important;
}

#modal-course-sessions .modal-header {
  padding: 18px 28px;
}

/* ========================================================
   MODAL DE SOLUCIONARIO OFICIAL PARA DOCENTES (AMPLIADO)
   ======================================================== */
#modal-solutions {
  z-index: 1200 !important;
}

#modal-solutions .modal-dialog {
  padding: 0 !important;
  max-width: 1260px !important;
  width: 95% !important;
  max-height: 94vh !important;
  height: 92vh !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  z-index: 1201 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ========================================================
   MODAL DE MALLA CURRICULAR Y RÚBRICAS LOMLOE REGIÓN DE MURCIA (AMPLIADO)
   ======================================================== */
#modal-syllabus {
  z-index: 1200 !important;
}

#modal-syllabus .modal-dialog {
  padding: 0 !important;
  max-width: 1260px !important;
  width: 95% !important;
  max-height: 94vh !important;
  height: 92vh !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: 0 25px 60px -15px rgba(2, 132, 199, 0.35), 0 15px 30px -10px rgba(0, 0, 0, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
}

#modal-syllabus .modal-header {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  padding: 20px 28px !important;
  border-bottom: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0 !important;
}

#modal-syllabus .modal-close {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 9999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

#modal-syllabus .modal-close:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.08) !important;
}

#modal-syllabus .modal-body {
  padding: 24px 28px !important;
  overflow-y: auto !important;
  flex: 1 !important;
  scrollbar-width: thin !important;
  scrollbar-color: #cbd5e1 #f8fafc !important;
}

#modal-syllabus .modal-body::-webkit-scrollbar {
  width: 8px !important;
}

#modal-syllabus .modal-body::-webkit-scrollbar-track {
  background: #f8fafc !important;
}

#modal-syllabus .modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 4px !important;
}

#modal-syllabus .modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

.syllabus-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 18px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.syllabus-tab-btn,
.course-guide-tab {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  transition: all 0.2s ease;
}

.syllabus-tab-btn:hover,
.course-guide-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.syllabus-tab-btn.active,
.course-guide-tab.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28) !important;
}

.syllabus-tab-pane {
  display: none;
}

.syllabus-tab-pane.active {
  display: block;
}

#modal-syllabus .modal-footer {
  padding: 14px 28px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0 !important;
}

/* OTROS MODALES DE RECURSOS DOCENTES (UNPLUGGED, PÓSTERS, CERTIFICADOS, MUNDOS ESPECIALES) */
#modal-unplugged .modal-dialog,
#modal-posters .modal-dialog,
#modal-special-worlds .modal-dialog {
  max-width: 1240px !important;
  width: 95% !important;
  max-height: 94vh !important;
  height: 92vh !important;
  padding: 0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

#modal-certificates .modal-dialog {
  max-width: 780px !important;
  width: 94% !important;
  padding: 0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

#modal-teacher-pin .modal-dialog {
  padding: 0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

#modal-unplugged .modal-header,
#modal-posters .modal-header,
#modal-certificates .modal-header,
#modal-teacher-pin .modal-header {
  padding: 18px 24px !important;
  border-bottom: none !important;
}

#modal-unplugged .modal-close,
#modal-posters .modal-close,
#modal-certificates .modal-close,
#modal-teacher-pin .modal-close {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 9999px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#modal-unplugged .modal-close:hover,
#modal-posters .modal-close:hover,
#modal-certificates .modal-close:hover,
#modal-teacher-pin .modal-close:hover {
  background: rgba(255, 255, 255, 0.35) !important;
  transform: scale(1.08) !important;
}

.session-card-item {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.session-card-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.btn-card-sessions {
  transition: all 0.2s ease;
}

.btn-card-sessions:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.btn-play-level-direct {
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-play-level-direct:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.badge-3d {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  animation: pulse-3d 2.5s infinite ease-in-out;
}

@keyframes pulse-3d {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.75; }
}

/* ========================================================
   TARJETAS DOCENTES DE CURSOS EN RECURSOS PARA MAESTROS
   ======================================================== */
.teacher-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.btn-teacher-action {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-teacher-program {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn-teacher-program:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.btn-teacher-guide {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.btn-teacher-guide:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.btn-teacher-solutions {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.btn-teacher-solutions:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.btn-teacher-sessions {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #7c3aed;
}
.btn-teacher-sessions:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

/* ========================================================
   ESTILOS DE IMPRESIÓN OFICIAL (DIPLOMAS & PÓSTERS)
   ======================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* Ocultar toda la interfaz circundante, barras, modales, formularios */
  .sidebar,
  .top-navbar,
  .filter-bar,
  .courses-section,
  .view-container,
  .modal-overlay:not(#modal-certificates),
  #modal-certificates .modal-header,
  #modal-certificates .modal-footer,
  #modal-certificates .form-group,
  #modal-certificates .modal-close {
    display: none !important;
  }

  /* Solo mostrar el recuadro del diploma limpio sin elementos de configuración */
  #modal-certificates.active {
    position: static !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
  }
  #modal-certificates .modal-dialog {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #modal-certificates .modal-body {
    padding: 0 !important;
  }
  #certificate-preview-box {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 960px !important;
    box-shadow: none !important;
    border: 10px double #b45309 !important;
    background: #fffdf5 !important;
    padding: 40px !important;
    page-break-inside: avoid !important;
  }
}


