/* ============================================================
   SIAD Estudiantes · Sistema de Avances y Diana Formativa
   Estilos visuales modernos: Naranja Metalizado, Oro y Azul Noche
   ============================================================ */

:root {
  --fondo: #090e1a;
  --fondo-tarjeta: rgba(15, 23, 42, 0.75);
  --borde-tarjeta: rgba(255, 255, 255, 0.08);
  --texto: #f8fafc;
  --texto-mutado: #94a3b8;
  --naranja-metal: #ff7b00;
  --oro: #fbbf24;
  --oro-glow: rgba(251, 191, 36, 0.4);
  --azul-cian: #38bdf8;
  --verde-exito: #4ade80;
  --rojo-alerta: #e11d48;
  --radio-lg: 20px;
  --radio-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--fondo);
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 123, 0, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.12) 0px, transparent 50%);
  color: var(--texto);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 50px;
}

/* Header */
.app-header {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--borde-tarjeta);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 10px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--oro-glow);
  flex-shrink: 0;
}

.brand-title {
  min-width: 0;
}

.brand-title h1 {
  font-size: 1.05rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-title p {
  font-size: 0.72rem;
  color: var(--texto-mutado);
  white-space: nowrap;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borde-tarjeta);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--naranja-metal), var(--oro));
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.75rem;
  color: #000;
}

/* Botón Salir Rojo Sólido y Destacado */
.btn-salir {
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1px solid #fda4af;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-salir:hover, .btn-salir:active {
  background: #f43f5e;
  transform: scale(1.03);
}

.btn-salir-lg {
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1px solid #fda4af;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.4);
  transition: all 0.2s;
}

.btn-salir-lg:active {
  transform: scale(0.97);
}

/* Layout */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px;
}

/* Selector de Perfil Rápido / Demo */
.selector-perfil-bar {
  background: rgba(255, 123, 0, 0.08);
  border: 1px solid rgba(255, 123, 0, 0.25);
  border-radius: var(--radio-md);
  padding: 10px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
}

.selector-perfil-bar select {
  background: #1e293b;
  color: #fff;
  border: 1px solid var(--borde-tarjeta);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  max-width: 100%;
}

/* Tarjeta de Estudiante */
.card-estudiante {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  padding: 20px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.est-info-principal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.est-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7b00, #f59e0b);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 123, 0, 0.3);
}

.est-nombres h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.est-meta-line {
  font-size: 0.84rem;
  color: var(--texto-mutado);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 3px;
}

.est-kpis {
  display: flex;
  gap: 14px;
}

.kpi-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--borde-tarjeta);
  border-radius: 14px;
  padding: 10px 16px;
  text-align: center;
}

.kpi-val {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--oro);
  line-height: 1.1;
}

.kpi-lbl {
  font-size: 0.72rem;
  color: var(--texto-mutado);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

/* Pestañas de Navegación */
.tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--borde-tarjeta);
  padding-bottom: 8px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--texto-mutado);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.activa {
  color: #000;
  background: linear-gradient(135deg, var(--oro), #ff7b00);
  box-shadow: 0 4px 15px rgba(255, 123, 0, 0.3);
}

/* Sección de la Diana */
.grid-diana {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

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

.card-diana {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.diana-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.diana-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.diana-svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.diana-leyenda {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--texto-mutado);
}

.ley-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ley-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.ley-dot.yo { background: var(--oro); box-shadow: 0 0 6px var(--oro); }
.ley-dot.grupo { background: var(--azul-cian); }

/* Tarjeta del Mentor IA */
.card-ia-mentor {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.8));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radio-lg);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.1);
  position: relative;
  overflow: hidden;
}

.card-ia-mentor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff7b00, #fbbf24, #38bdf8);
}

.ia-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ia-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #ff7b00);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.ia-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.ia-seccion {
  margin-bottom: 16px;
}

.ia-seccion h4 {
  font-size: 0.88rem;
  color: var(--oro);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ia-seccion p, .ia-seccion li {
  font-size: 0.92rem;
  color: #e2e8f0;
}

.ia-seccion ul {
  padding-left: 20px;
}

.ia-seccion li {
  margin-bottom: 6px;
}

.ia-frase-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--oro);
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-top: 14px;
}

/* Chat Interactivo con Mentor */
.chat-mentor-box {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-md);
  padding: 14px;
}

.chat-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chat-btn-prompt {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borde-tarjeta);
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-btn-prompt:hover {
  background: var(--oro);
  color: #000;
  border-color: var(--oro);
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  background: #1e293b;
  border: 1px solid var(--borde-tarjeta);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  outline: none;
}

.chat-input-row button {
  background: var(--naranja-metal);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.chat-response-area {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.8);
  border-left: 3px solid var(--azul-cian);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #f1f5f9;
  display: none;
  white-space: pre-line;
}

/* Pestaña Valoraciones / Actividades */
.actividades-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dim-card-box {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  padding: 18px 20px;
}

.dim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--borde-tarjeta);
  padding-bottom: 8px;
}

.dim-card-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabla-actividades {
  width: 100%;
  border-collapse: collapse;
}

.tabla-actividades th, .tabla-actividades td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.tabla-actividades th {
  color: var(--texto-mutado);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.badge-nota {
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 0.85rem;
  display: inline-block;
}

.badge-nota.sup { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid #fbbf24; }
.badge-nota.alto { background: rgba(74, 222, 128, 0.2); color: #4ade80; border: 1px solid #4ade80; }
.badge-nota.bas { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-nota.bajo { background: rgba(244, 63, 94, 0.2); color: #f43f5e; border: 1px solid #f43f5e; }

/* Pódiums */
.podium-top3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 650px) {
  .podium-top3 {
    grid-template-columns: 1fr;
  }
}

.tarjeta-podium {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  transition: transform 0.2s;
}

.tarjeta-podium:hover {
  transform: translateY(-4px);
}

.tarjeta-podium.oro { border-color: rgba(251, 191, 36, 0.6); box-shadow: 0 10px 25px rgba(251, 191, 36, 0.15); }
.tarjeta-podium.plata { border-color: rgba(148, 163, 184, 0.6); }
.tarjeta-podium.bronce { border-color: rgba(217, 119, 6, 0.6); }
.tarjeta-podium.es-yo { background: rgba(255, 123, 0, 0.12); border-width: 2px; }

.medalla-ico {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #334155;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin: 0 auto 10px;
}

.podium-nombre {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}

.podium-prom {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--oro);
}

.podium-prom small {
  display: block;
  font-size: 0.72rem;
  color: var(--texto-mutado);
  font-weight: 600;
}

.badge-yo {
  background: var(--naranja-metal);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 900;
}

.menciones-especiales {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .menciones-especiales {
    grid-template-columns: 1fr;
  }
}

.mencion-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
}

.mencion-ico {
  font-size: 1.6rem;
}

/* Inter-Cursos */
.inter-header {
  text-align: center;
  margin-bottom: 20px;
}

.inter-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.inter-header p {
  font-size: 0.88rem;
  color: var(--texto-mutado);
}

.cursos-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tarjeta-curso {
  background: var(--fondo-tarjeta);
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.tarjeta-curso.mi-curso {
  border-color: var(--oro);
  background: rgba(251, 191, 36, 0.08);
}

.curso-puesto {
  font-size: 2.2rem;
}

.curso-info h4 {
  font-size: 1.15rem;
  font-weight: 800;
}

.curso-meta-badge {
  font-size: 0.78rem;
  color: var(--oro);
  background: rgba(251, 191, 36, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 4px;
  font-weight: 700;
}

.badge-mi-aula {
  background: var(--naranja-metal);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}

.curso-metricas {
  display: flex;
  gap: 16px;
}

.metrica-box {
  text-align: center;
}

.m-val {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.m-lbl {
  font-size: 0.7rem;
  color: var(--texto-mutado);
  text-transform: uppercase;
}

/* Pantalla Login */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.login-card {
  background: #0f172a;
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 24px;
  max-width: 440px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 123, 0, 0.15);
}

.login-logo {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px var(--oro-glow);
}

.login-card h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.login-card p {
  font-size: 0.85rem;
  color: var(--texto-mutado);
  margin-bottom: 22px;
}

.login-form-group {
  margin-bottom: 14px;
  text-align: left;
}

.login-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.login-form-group input, .login-form-group select {
  width: 100%;
  background: #1e293b;
  border: 1.5px solid var(--borde-tarjeta);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-form-group input:focus, .login-form-group select:focus {
  border-color: var(--oro);
  background: #0f172a;
}

.login-form-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--oro), var(--naranja-metal));
  color: #000;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 6px 20px rgba(255, 123, 0, 0.35);
  transition: transform 0.15s;
}

.btn-login-submit:active {
  transform: scale(0.98);
}

.btn-demo-quick {
  background: transparent;
  border: 1px dashed var(--borde-tarjeta);
  color: var(--texto-mutado);
  padding: 10px;
  border-radius: 12px;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.btn-demo-quick:hover {
  color: var(--oro);
  border-color: var(--oro);
}

/* Modal Detalle & Modales Generales */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 500;
  padding: 16px;
}

.modal-content {
  background: #0f172a;
  border: 1px solid var(--borde-tarjeta);
  border-radius: var(--radio-lg);
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.btn-close {
  background: none;
  border: none;
  color: var(--texto-mutado);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================
   Botones de Acción en Tarjeta: PDF y WhatsApp (Diseño Premium)
   ============================================================ */
.est-acciones-reporte {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  width: 100%;
  padding-top: 16px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-accion-reporte {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 12px 18px !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-align: left !important;
  outline: none !important;
  user-select: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

.btn-ico-wrap {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.btn-accion-reporte .btn-textos {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.btn-accion-reporte .btn-textos strong {
  font-size: 0.96rem !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  letter-spacing: 0.2px;
}

.btn-accion-reporte .btn-textos small {
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
  margin-top: 3px !important;
  line-height: 1.2;
}

/* Estilo Botón PDF Oficial (Rojo Adobe) */
.btn-accion-reporte.btn-pdf {
  background: linear-gradient(135deg, #1e1124 0%, #2b111e 50%, #3f101f 100%) !important;
  border: 1.5px solid rgba(244, 63, 94, 0.5) !important;
}

.btn-accion-reporte.btn-pdf:hover {
  background: linear-gradient(135deg, #2b1120 0%, #4c1126 50%, #63122c 100%) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.35) !important;
  transform: translateY(-2px);
}

.btn-accion-reporte.btn-pdf:hover .btn-ico-wrap {
  transform: scale(1.1);
}

.btn-accion-reporte.btn-pdf .btn-textos strong {
  color: #ffe4e6 !important;
}

/* Estilo Botón WhatsApp Oficial (Verde WhatsApp) */
.btn-accion-reporte.btn-wa {
  background: linear-gradient(135deg, #092019 0%, #0d2f23 50%, #114232 100%) !important;
  border: 1.5px solid rgba(37, 211, 102, 0.5) !important;
}

.btn-accion-reporte.btn-wa:hover {
  background: linear-gradient(135deg, #0d2f23 0%, #134e3a 50%, #1a654c 100%) !important;
  border-color: #25d366 !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35) !important;
  transform: translateY(-2px);
}

.btn-accion-reporte.btn-wa:hover .btn-ico-wrap {
  transform: scale(1.1);
}

.btn-accion-reporte.btn-wa .btn-textos strong {
  color: #dcfce7 !important;
}

.btn-accion-reporte:active {
  transform: scale(0.97) !important;
}

/* ============================================================
   Modal WhatsApp · Interfaz de Chat Oficial
   ============================================================ */
.modal-content-wa {
  max-width: 580px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1.5px solid rgba(37, 211, 102, 0.4) !important;
  background: #0b141a !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(37, 211, 102, 0.2) !important;
}

.wa-chat-header {
  background: #1f2c34;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wa-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-avatar-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wa-chat-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #e9edef;
  line-height: 1.2;
}

.wa-chat-subtitle {
  font-size: 0.74rem;
  color: #8696a0;
  display: block;
  margin-top: 2px;
}

.modal-wa-body {
  padding: 16px 18px 20px 18px;
}

.wa-preview-box {
  background: #0b141a;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 0),
    radial-gradient(rgba(37, 211, 102, 0.03) 1px, transparent 0);
  background-size: 20px 20px, 40px 40px;
  border-radius: 14px;
  padding: 14px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: #2a3942 #0b141a;
}

.wa-bubble-container {
  background: #005c4b;
  border-radius: 12px 12px 2px 12px;
  padding: 14px 16px 8px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  position: relative;
}

.wa-bubble {
  color: #e9edef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

.wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.68rem;
  color: #8696a0;
  margin-top: 6px;
}

.wa-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-wa-send {
  flex: 1.4 1 220px;
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 20px !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.btn-wa-send:hover {
  background: linear-gradient(135deg, #28e06f, #159d8d) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6) !important;
}

.btn-wa-send:active {
  transform: scale(0.98) !important;
}

.btn-wa-copy {
  flex: 1 1 160px;
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-align: center !important;
}

.btn-wa-copy:hover {
  background: #334155 !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px) !important;
}

.wa-copy-feedback {
  margin-top: 12px;
  background: rgba(37, 211, 102, 0.15);
  color: #4ade80;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(37, 211, 102, 0.4);
  animation: fadeIn 0.3s ease;
}

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

/* ============================================================
   Contenedor de Impresión y PDF Oficial SIAD
   ============================================================ */
.reporte-print-container {
  display: none;
}

@media print {
  @page {
    size: letter portrait;
    margin: 10mm 12mm 12mm 12mm;
  }

  /* Ocultar elementos de la interfaz web durante la impresión */
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 10.5pt !important;
    line-height: 1.35 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#reporteImpresionOficial) {
    display: none !important;
  }

  #reporteImpresionOficial {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }

  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2.5px solid #1e3a8a;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .print-logo {
    width: 52px;
    height: 52px;
    border-radius: 8px;
  }

  .print-titles h1 {
    font-size: 13pt;
    font-weight: 900;
    color: #1e3a8a;
    margin: 0;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .print-titles h2 {
    font-size: 10pt;
    font-weight: 800;
    color: #b45309;
    margin: 2px 0 0 0;
  }

  .print-titles p {
    font-size: 8pt;
    color: #64748b;
    margin: 1px 0 0 0;
  }

  .print-period-badge {
    background: #1e3a8a !important;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: right;
    font-size: 8.5pt;
    font-weight: 800;
  }

  /* Ficha de datos del Estudiante en Print */
  .print-student-card {
    background: #f8fafc !important;
    border: 1.2px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .print-std-name {
    font-size: 12pt;
    font-weight: 900;
    color: #0f172a;
  }

  .print-std-meta {
    font-size: 8.5pt;
    color: #475569;
    margin-top: 2px;
  }

  .print-kpis {
    display: flex;
    gap: 10px;
  }

  .print-kpi-item {
    background: #ffffff !important;
    border: 1px solid #94a3b8;
    border-radius: 6px;
    padding: 4px 10px;
    text-align: center;
    min-width: 65px;
  }

  .print-kpi-val {
    font-size: 11pt;
    font-weight: 900;
    color: #1e3a8a;
    display: block;
    line-height: 1.1;
  }

  .print-kpi-lbl {
    font-size: 6.5pt;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
  }

  /* Grid Diana & Resumen en Print */
  .print-diana-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
    page-break-inside: avoid;
  }

  .print-diana-box {
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    background: #ffffff;
  }

  .print-diana-box svg {
    max-width: 220px;
    max-height: 220px;
    display: block;
    margin: 0 auto;
  }

  .print-diana-title {
    font-size: 8.5pt;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 4px;
  }

  /* Tabla de Calificaciones en Print */
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8pt;
    margin-bottom: 6px;
  }

  .print-table th {
    background: #1e3a8a !important;
    color: #ffffff !important;
    text-align: left;
    padding: 4px 8px;
    font-weight: 800;
    border: 1px solid #1e3a8a;
  }

  .print-table td {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    color: #1e293b;
  }

  .print-table tr:nth-child(even) td {
    background: #f8fafc !important;
  }

  .print-nota-badge {
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e2e8f0 !important;
    color: #0f172a !important;
    display: inline-block;
  }

  /* Sección Mentor IA en Print */
  .print-ia-box {
    border: 1.5px solid #d97706;
    border-radius: 8px;
    background: #fffbeb !important;
    padding: 10px 12px;
    margin-bottom: 14px;
    page-break-inside: avoid;
  }

  .print-ia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #fde68a;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  .print-ia-header h3 {
    font-size: 9.5pt;
    font-weight: 900;
    color: #92400e;
    margin: 0;
  }

  .print-ia-badge {
    background: #d97706 !important;
    color: #ffffff !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 7.5pt;
    font-weight: 900;
  }

  .print-ia-seccion {
    margin-bottom: 6px;
  }

  .print-ia-seccion strong {
    font-size: 8pt;
    color: #78350f;
    display: block;
    margin-bottom: 2px;
  }

  .print-ia-seccion ul {
    margin: 0;
    padding-left: 16px;
    font-size: 7.8pt;
    color: #1e293b;
  }

  .print-ia-seccion p {
    margin: 0;
    font-size: 7.8pt;
    color: #1e293b;
  }

  .print-ia-frase {
    font-style: italic;
    font-size: 7.5pt;
    color: #92400e;
    border-left: 3px solid #d97706;
    padding-left: 8px;
    margin-top: 6px;
  }

  /* Pie de Firma Institucional */
  .print-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px dashed #94a3b8;
    page-break-inside: avoid;
  }

  .print-firma {
    text-align: center;
    width: 220px;
  }

  .print-firma-linea {
    border-top: 1.2px solid #0f172a;
    margin-bottom: 4px;
  }

  .print-firma-nombre {
    font-size: 8.5pt;
    font-weight: 900;
    color: #0f172a;
  }

  .print-firma-cargo {
    font-size: 7pt;
    color: #64748b;
  }

  .print-fecha-emision {
    font-size: 7pt;
    color: #64748b;
    text-align: right;
  }
}
