/* ============================================================
   Aula Pip – Estilos personalizados
   Base: Bootstrap 5 + IBM Plex Sans (legibilidad educativa)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* --- Reset tipográfico --- */
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #1e293b;
  background-color: #f1f5f9 !important;
}

/* --- Avatar circular (inicial del nombre) --- */
.avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- Icono badge (dentro de tarjetas del dashboard) --- */
.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Tarjetas con hover suave --- */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

/* --- Temporizador del examen --- */
.timer-badge {
  font-size: 1.4rem !important;
  letter-spacing: 2px;
  min-width: 90px;
  transition: background-color 0.5s;
}

/* --- Número de pregunta (examen) --- */
.badge-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* --- Número de pregunta (resultados, más pequeño) --- */
.badge-numero-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #64748b;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* --- Opciones de respuesta (examen) --- */
.opcion-label {
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  border-color: #e2e8f0 !important;
  background: #ffffff;
}

.opcion-label:hover {
  background-color: #eff6ff;
  border-color: #93c5fd !important;
}

.opcion-seleccionada {
  background-color: #dbeafe !important;
  border-color: #2563eb !important;
  font-weight: 500;
}

/* --- Opciones de revisión (resultados) --- */
.opcion-revision {
  background: #f8fafc;
}

.opcion-correcta {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0;
}

.opcion-incorrecta {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3;
}

/* --- Cuadro de retroalimentación IA --- */
.ia-feedback-box {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 0.75rem;
}

/* --- Puntaje circular (resultados) --- */
.puntaje-circulo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- Pill de estadística --- */
.stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Transición suave en barra de progreso --- */
.transition-all {
  transition: width 0.3s ease;
}

/* --- Cursor pointer helper --- */
.cursor-pointer { cursor: pointer; }

/* --- Tarjeta de resultado con borde izquierdo --- */
.resultado-card {
  border-left-width: 4px !important;
}

/* --- Navbar link activo --- */
.navbar-dark .nav-link:hover {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* --- Ajuste de cards en móvil --- */
@media (max-width: 576px) {
  .puntaje-circulo { width: 96px; height: 96px; }
  .timer-badge { font-size: 1.1rem !important; }
}

/* ============================================================
   Panel de Administración
   ============================================================ */

/* --- Sidebar --- */
.admin-sidebar {
  width: 250px;
  min-height: 100vh;
  background: #0f172a;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.admin-brand {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.admin-brand .bi {
  font-size: 1.75rem;
  color: #60a5fa;
}

.admin-brand-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #f1f5f9;
  line-height: 1.1;
}

.admin-brand-sub {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.admin-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  padding: 0.5rem 0.75rem 0.2rem;
  margin: 0;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.admin-nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
}

.admin-nav-link.active {
  background: rgba(59,130,246,0.18);
  color: #60a5fa;
}

.admin-nav-link .bi { font-size: 1rem; }

.admin-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* --- Topbar --- */
.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Stat cards --- */
.admin-stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.admin-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* --- Rol select en tabla --- */
.admin-rol-select {
  border-radius: 6px;
  font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    min-height: auto;
    height: auto;
    position: relative;
  }
  .d-flex:has(.admin-sidebar) {
    flex-direction: column !important;
  }
}
