/*
 * DocentIA · FEFyDE · UAS
 * Hoja de estilos Premium v2.0
 * Estética: Institucional de lujo — azul marino profundo + dorado académico
 * Tipografía: Playfair Display (display) + DM Sans (cuerpo)
 */

/* ==========================================================================
   FUENTES DE GOOGLE
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,700;9..40,800;9..40,900&display=swap');

/* ==========================================================================
   VARIABLES GLOBALES (Design Tokens)
   ========================================================================== */
:root {
  /* Paleta principal */
  --azul-1:  #0a1628;   /* Fondo más oscuro */
  --azul-2:  #0d2042;   /* Fondo oscuro */
  --azul-3:  #0f2d5e;   /* Azul marino */
  --azul-4:  #004a99;   /* Azul primario */
  --azul-5:  #1a6ec4;   /* Azul claro */
  --azul-6:  #dce8f5;   /* Azul muy claro (bordes) */
  --azul-7:  #f0f6ff;   /* Fondo azulado */
  --azul-8:  #f8fbff;   /* Fondo casi blanco */

  /* Dorado institucional */
  --oro-1:   #8b6508;
  --oro-2:   #b8860b;
  --oro-3:   #d4a017;
  --oro-4:   #f0c040;
  --oro-claro: #fffbeb;
  --oro-borde: #f2d58a;

  /* Texto */
  --texto-1: #0f172a;
  --texto-2: #1e293b;
  --texto-3: #334155;
  --texto-4: #64748b;
  --texto-5: #94a3b8;

  /* Semáforo */
  --verde-bg: #dcfce7;  --verde-txt: #166534;  --verde-borde: #86efac;
  --rojo-bg:  #fee2e2;  --rojo-txt:  #991b1b;  --rojo-borde:  #fca5a5;
  --amarillo-bg: #fef9c3; --amarillo-txt: #854d0e; --amarillo-borde: #fde047;

  /* Espaciado */
  --radio-sm:  12px;
  --radio-md:  18px;
  --radio-lg:  26px;
  --radio-xl:  36px;

  /* Sombras */
  --sombra-sm:  0 4px 14px rgba(10,22,40,.08);
  --sombra-md:  0 12px 36px rgba(10,22,40,.12);
  --sombra-lg:  0 24px 64px rgba(10,22,40,.18);
  --sombra-xl:  0 36px 100px rgba(10,22,40,.24);

  /* Transiciones */
  --trans: .22s cubic-bezier(.4,0,.2,1);
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--texto-2);
  background: #f4f7fb;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--azul-4); text-decoration: none; }
a:hover { color: var(--azul-5); }

/* ==========================================================================
   LAYOUT GENERAL
   ========================================================================== */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 22px 60px;
}

/* ==========================================================================
   TOPBAR DEL PANEL ADMIN
   ========================================================================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-sm);
}

.simple-topbar { padding: 16px 22px; }
.panel-topbar  { padding: 18px 22px; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--azul-3);
  line-height: 1.15;
}

.brand p {
  font-size: .85rem;
  color: var(--texto-4);
  font-weight: 600;
  margin-top: 2px;
}

.brand-vertical {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.brand-vertical img { height: 64px; }

.panel-topbar-actions { display: flex; align-items: center; gap: 10px; }
.panel-main-actions   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions-inline       { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   HERO PANEL (Panel principal del admin)
   ========================================================================== */
.hero-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--azul-2) 0%, var(--azul-3) 100%);
  border-radius: var(--radio-xl);
  box-shadow: var(--sombra-lg);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(212,160,23,.08);
  pointer-events: none;
}

.hero-panel::after {
  content: '';
  position: absolute;
  left: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.hero-panel__info {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-logo-wrap img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 0 0 transparent);
  opacity: 1;
  border-radius: 10px;
}
.eyebrow {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--oro-4);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-panel h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.hero-panel p {
  color: rgba(255,255,255,.72);
  font-size: .94rem;
  margin-top: 6px;
  max-width: 520px;
}

.hero-panel__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.hero-main-actions, .hero-sub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-sub-actions { gap: 12px; }

.link-soft {
  color: rgba(255,255,255,.65);
  font-size: .88rem;
  font-weight: 700;
  transition: color var(--trans);
}
.link-soft:hover { color: var(--oro-4); }

.logout-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: background var(--trans), transform var(--trans);
}
.logout-fab:hover {
  background: rgba(239,68,68,.3);
  color: #fff;
  transform: rotate(45deg);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: var(--radio-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: .88rem;
  line-height: 1;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: transform var(--trans), box-shadow var(--trans), background var(--trans);
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-principal {
  background: linear-gradient(135deg, var(--azul-4), var(--azul-3));
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,74,153,.30);
}
.btn-principal:hover { box-shadow: 0 14px 32px rgba(0,74,153,.40); color: #fff; }

.btn-secundario {
  background: #fff;
  color: var(--azul-4);
  border: 1.5px solid var(--azul-6);
  box-shadow: var(--sombra-sm);
}
.btn-secundario:hover { border-color: var(--azul-4); color: var(--azul-4); }

.btn-dorado {
  background: linear-gradient(135deg, var(--oro-2), var(--oro-1));
  color: #fff;
  box-shadow: 0 8px 22px rgba(184,134,11,.30);
}
.btn-dorado:hover { box-shadow: 0 14px 32px rgba(184,134,11,.40); color: #fff; }

.btn-verde {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 8px 22px rgba(22,163,74,.28);
}
.btn-verde:hover { color: #fff; box-shadow: 0 14px 28px rgba(22,163,74,.36); }

.btn-rojo {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 8px 22px rgba(220,38,38,.28);
}
.btn-rojo:hover { color: #fff; box-shadow: 0 14px 28px rgba(220,38,38,.36); }

.btn-light {
  background: #f1f5f9;
  color: var(--texto-3);
  border: 1px solid #e2e8f0;
}
.btn-light:hover { background: #e2e8f0; color: var(--texto-2); }

.btn-compact { padding: 8px 11px; font-size: .80rem; border-radius: 10px; }
.btn-full    { width: 100%; justify-content: center; }

.btn-publicar {
  background: linear-gradient(135deg, var(--azul-5), var(--azul-4));
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,74,153,.25);
}
.btn-publicar:hover { color: #fff; box-shadow: 0 12px 28px rgba(0,74,153,.35); }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--azul-6);
  background: #fff;
  color: var(--texto-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
}
.icon-btn:hover { background: var(--azul-7); color: var(--azul-4); }
.icon-btn.danger:hover { background: var(--rojo-bg); color: var(--rojo-txt); border-color: var(--rojo-borde); }

/* ==========================================================================
   TARJETAS Y CONTENEDORES
   ========================================================================== */
.tarjeta {
  background: #fff;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-lg);
  padding: 24px;
  box-shadow: var(--sombra-sm);
  margin-bottom: 18px;
}

.titulo-bloque {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azul-3);
  margin-bottom: 16px;
}

/* ==========================================================================
   ESTADÍSTICAS / MÉTRICAS
   ========================================================================== */
.grid-estadisticas {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.grid-estadisticas-2 { grid-template-columns: repeat(2, 1fr); }
.grid-estadisticas-4 { grid-template-columns: repeat(4, 1fr); }

.stat {
  background: #fff;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  padding: 20px;
  box-shadow: var(--sombra-sm);
  transition: transform var(--trans), box-shadow var(--trans);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--sombra-md); }

.stat .label {
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-4);
  margin-bottom: 6px;
}

.stat .valor {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--azul-3);
  line-height: 1;
}

.stat .sub {
  font-size: .78rem;
  color: var(--texto-5);
  font-weight: 600;
  margin-top: 5px;
}

/* ==========================================================================
   TABLA
   ========================================================================== */
.tabla-responsive { overflow-x: auto; border-radius: var(--radio-md); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

thead tr {
  background: var(--azul-8);
  border-bottom: 2px solid var(--azul-6);
}

th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--texto-4);
  white-space: nowrap;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--azul-6);
  color: var(--texto-2);
  vertical-align: top;
}

tbody tr { transition: background var(--trans); }
tbody tr:hover { background: var(--azul-8); }
tbody tr:last-child td { border-bottom: 0; }

.title-strong {
  font-weight: 900;
  color: var(--azul-3);
  font-size: .94rem;
}

.muted { color: var(--texto-5); font-size: .82rem; }
.small  { font-size: .80rem; }

/* ==========================================================================
   BADGES Y PILLS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .03em;
}

.badge-ok      { background: var(--verde-bg);    color: var(--verde-txt);    border: 1px solid var(--verde-borde); }
.badge-warn    { background: var(--amarillo-bg); color: var(--amarillo-txt); border: 1px solid var(--amarillo-borde); }
.badge-expired { background: var(--rojo-bg);     color: var(--rojo-txt);     border: 1px solid var(--rojo-borde); }
.badge-soft    { background: var(--azul-7);      color: var(--azul-4);       border: 1px solid var(--azul-6); }
.badge-info    { background: var(--azul-7);      color: var(--azul-4);       border: 1px solid var(--azul-6); }

.mini-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--azul-7);
  color: var(--azul-4);
  font-size: .78rem;
  font-weight: 800;
  border: 1px solid var(--azul-6);
}

.mini-pill-dorado { background: var(--oro-claro); color: var(--oro-1); border-color: var(--oro-borde); }
.mini-pill-verde  { background: var(--verde-bg);  color: var(--verde-txt); border-color: var(--verde-borde); }

/* ==========================================================================
   ACCIONES EN TABLA
   ========================================================================== */
.acciones-tabla {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.acciones-tabla.compacta .btn { padding: 7px 10px; font-size: .78rem; border-radius: 9px; }

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campo label {
  font-weight: 800;
  font-size: .85rem;
  color: var(--texto-3);
}

.campo small {
  font-size: .78rem;
  color: var(--texto-4);
  line-height: 1.4;
}

.campo input,
.campo select,
.campo textarea {
  border: 1.5px solid #d1dce8;
  border-radius: var(--radio-sm);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  color: var(--texto-1);
  background: #fff;
  width: 100%;
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--azul-4);
  box-shadow: 0 0 0 3px rgba(0,74,153,.12);
}

.campo textarea { min-height: 200px; resize: vertical; line-height: 1.5; }

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

.campo.full { grid-column: 1 / -1; }

/* ==========================================================================
   BUSCADOR
   ========================================================================== */
.form-buscador {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 6px;
}

.form-buscador input {
  flex: 1;
  min-width: 200px;
  border: 1.5px solid var(--azul-6);
  border-radius: var(--radio-sm);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--texto-1);
  transition: border-color var(--trans), box-shadow var(--trans);
  outline: none;
}

.form-buscador input:focus {
  border-color: var(--azul-4);
  box-shadow: 0 0 0 3px rgba(0,74,153,.10);
}

/* ==========================================================================
   ALERTAS
   ========================================================================== */
.alerta {
  padding: 14px 18px;
  border-radius: var(--radio-md);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 16px;
  line-height: 1.45;
  animation: alerta-entrada .3s ease;
}

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

.alerta.ok    { background: var(--verde-bg);    color: var(--verde-txt);    border: 1px solid var(--verde-borde); }
.alerta.error { background: var(--rojo-bg);     color: var(--rojo-txt);     border: 1px solid var(--rojo-borde); }

/* ==========================================================================
   NOTA INFORMATIVA
   ========================================================================== */
.nota {
  font-size: .85rem;
  color: var(--texto-4);
  line-height: 1.55;
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-sm);
  padding: 11px 14px;
}

/* ==========================================================================
   BIBLIOTECA (grid de cards de presentaciones)
   ========================================================================== */
.biblioteca-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.card-presentacion {
  background: #fff;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  padding: 20px;
  box-shadow: var(--sombra-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans);
}

.card-presentacion:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-md);
  border-color: var(--azul-5);
}

.card-presentacion h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--azul-3);
  line-height: 1.3;
}

.card-presentacion p {
  font-size: .84rem;
  color: var(--texto-4);
  line-height: 1.5;
  flex: 1;
}

.meta {
  font-size: .8rem;
  color: var(--texto-5);
  font-weight: 600;
}

.meta-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-wrap span {
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: 999px;
  padding: 3px 9px;
}

/* ==========================================================================
   FORMULARIO DE PUBLICACIÓN
   ========================================================================== */
.form-publicacion { max-width: 780px; }

.publish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.publish-card {
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  padding: 20px;
}

.publish-label {
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--texto-4);
  margin-bottom: 12px;
}

.publish-card input[type="text"] {
  width: 100%;
  border: 1.5px solid #d1dce8;
  border-radius: var(--radio-sm);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: .92rem;
  background: #fff;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.publish-card input:focus { border-color: var(--azul-4); box-shadow: 0 0 0 3px rgba(0,74,153,.10); }

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border: 1.5px solid var(--azul-6);
  border-radius: var(--radio-sm);
  cursor: pointer;
  margin-top: 10px;
  background: #fff;
  transition: border-color var(--trans), background var(--trans);
}

.radio-card:hover   { border-color: var(--azul-4); }
.radio-card.activo  { border-color: var(--azul-4); background: var(--azul-7); }

.radio-card input[type="radio"] { margin-top: 3px; accent-color: var(--azul-4); }

.radio-card strong { display: block; font-size: .9rem; color: var(--texto-2); }
.radio-card small  { font-size: .8rem; color: var(--texto-4); margin-top: 2px; display: block; }

.publish-summary {
  margin-top: 18px;
  padding: 14px;
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-sm);
  font-size: .87rem;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ==========================================================================
   PORTAL DEL ALUMNO — Pantalla de código de acceso
   ========================================================================== */
.student-portal {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0,74,153,.14) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(184,134,11,.10) 0%, transparent 50%),
    linear-gradient(160deg, #f0f6ff 0%, #fff 55%, #fffbeb 100%);
  padding: 24px;
}

.student-single-shell {
  width: 100%;
  max-width: 500px;
}

.student-single-card {
  background: #fff;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-xl);
  padding: 38px 36px;
  box-shadow: var(--sombra-xl);
  position: relative;
  overflow: hidden;
}

.student-single-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--azul-4), var(--oro-3), var(--azul-4));
}

.student-header-compact {
  text-align: center;
  margin-bottom: 26px;
}

.student-logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}

.student-logo-chip img {
  height: 54px;
  width: auto;
  object-fit: contain;
  display: block;
}

.student-header-compact h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--azul-3);
  margin-bottom: 4px;
}

.student-profesor {
  font-size: .9rem;
  font-weight: 800;
  color: var(--texto-3);
  margin-bottom: 2px !important;
}

.student-facultad {
  font-size: .82rem;
  color: var(--texto-5);
}

.student-form-card { padding: 0; box-shadow: none; border: 0; }

.student-form-card--single .campo input {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; }

.student-help-box {
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-sm);
  font-size: .82rem;
  color: var(--texto-4);
  line-height: 1.55;
}

.student-help-box--single { margin-top: 14px; }

/* ==========================================================================
   PANTALLA DE LOGIN DEL ADMIN
   ========================================================================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--azul-1) 0%, var(--azul-2) 50%, #0f2d5e 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-wrap::before {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(212,160,23,.06);
  pointer-events: none;
}

.auth-wrap::after {
  content: '';
  position: absolute;
  left: -100px;
  bottom: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0,74,153,.10);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radio-xl);
  padding: 42px 38px;
  box-shadow: var(--sombra-xl);
  backdrop-filter: blur(22px);
  position: relative;
  z-index: 1;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-5), var(--oro-3), var(--azul-5));
  border-radius: var(--radio-xl) var(--radio-xl) 0 0;
}

.auth-card .brand-vertical h1 {
  color: #fff;
  font-size: 1.6rem;
}
.auth-card .brand-vertical p {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  margin-top: 3px;
}

.auth-card .campo label { color: rgba(255,255,255,.75); }
.auth-card .campo input {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  color: #fff;
}
.auth-card .campo input::placeholder { color: rgba(255,255,255,.35); }
.auth-card .campo input:focus {
  border-color: var(--oro-3);
  box-shadow: 0 0 0 3px rgba(212,160,23,.18);
}

/* ==========================================================================
   GRID DE DOS PANELES (respuestas lado a lado)
   ========================================================================== */
.grid-dos-paneles {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 18px;
  align-items: start;
}

.detalle-evaluacion { position: sticky; top: 18px; }

.bloque-respuesta { margin-bottom: 18px; }
.bloque-respuesta h4 { color: var(--azul-4); font-size: .95rem; margin-bottom: 8px; }
.respuesta-caja {
  background: var(--azul-8);
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-sm);
  padding: 12px 14px;
  font-size: .88rem;
  margin-bottom: 6px;
  line-height: 1.5;
}

/* ==========================================================================
   IFRAME PREVIEW
   ========================================================================== */
.preview-frame {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  background: #fff;
  margin-top: 14px;
}

/* ==========================================================================
   FILA CLICKEABLE EN TABLAS
   ========================================================================== */
.fila-click { cursor: pointer; }
.fila-activa td { background: var(--azul-7); }

/* ==========================================================================
   SECCIONES DE FORMULARIO (dentro de tarjeta)
   ========================================================================== */
.seccion-formulario {
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  padding: 22px;
  background: var(--azul-8);
  margin-bottom: 18px;
}

.seccion-formulario h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--azul-3);
  margin-bottom: 4px;
}

.seccion-formulario p {
  font-size: .85rem;
  color: var(--texto-4);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ==========================================================================
   STEP NUMBERS (pasos en formularios)
   ========================================================================== */
.form-step {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  background: var(--azul-8);
}

.form-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--azul-3);
  font-size: 1rem;
  font-weight: 800;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul-4), var(--azul-3));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .88rem;
  flex-shrink: 0;
}

/* ==========================================================================
   DETAILS / ACCORDION
   ========================================================================== */
.details-clean {
  border: 1px solid var(--azul-6);
  border-radius: var(--radio-md);
  background: #fff;
  overflow: hidden;
  margin-top: 16px;
}

.details-clean summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  color: var(--azul-4);
  font-weight: 900;
  font-size: .92rem;
  transition: background var(--trans);
}
.details-clean summary::-webkit-details-marker { display: none; }
.details-clean summary::after { content: ' +'; color: var(--oro-2); }
.details-clean[open] summary::after { content: ' −'; }
.details-clean summary:hover { background: var(--azul-8); }

.details-clean-content { padding: 0 20px 20px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .grid-estadisticas-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .layout { padding: 14px 14px 40px; }
  .hero-panel { padding: 22px; }
  .hero-panel__info { gap: 12px; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .panel-topbar-actions { width: 100%; justify-content: flex-end; }
  .publish-grid { grid-template-columns: 1fr; }
  .grid-dos-paneles { grid-template-columns: 1fr; }
  .detalle-evaluacion { position: static; }
}

@media (max-width: 600px) {
  .grid-estadisticas-2,
  .grid-estadisticas-4 { grid-template-columns: 1fr; }
  .student-single-card { padding: 28px 20px; }
  .auth-card { padding: 30px 22px; }
  .biblioteca-grid { grid-template-columns: 1fr; }
  .grupo-form { grid-template-columns: 1fr; }
  .acciones-tabla { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA
   ========================================================================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.layout > * {
  animation: fade-up .35s ease both;
}

.layout > *:nth-child(2) { animation-delay: .05s; }
.layout > *:nth-child(3) { animation-delay: .10s; }
.layout > *:nth-child(4) { animation-delay: .15s; }
.layout > *:nth-child(5) { animation-delay: .20s; }

/* ==========================================================================
   ESTADO VACÍO
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--texto-4);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h3    { font-size: 1.1rem; font-weight: 700; color: var(--texto-3); margin-bottom: 6px; }
.empty-state p     { font-size: .88rem; max-width: 360px; margin: 0 auto; }

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.text-center { text-align: center; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.w-full { width: 100%; }
