/* ===================================================================
   ELESIS UI · TEMA "AURORA"  (premium / glass / violeta)
   -------------------------------------------------------------------
   Capa de TEMA con ALCANCE por clase: solo actúa cuando el <body>
   tiene la clase .elesis-aurora. Las páginas que NO la tengan quedan
   EXACTAMENTE igual que hoy. Se carga DESPUÉS de elesis-ui.css.
   Solo CSS — no toca lógica, datos, formularios ni endpoints.
   =================================================================== */

/* -------- Fondo general aurora -------- */
.elesis-aurora {
    background:
        radial-gradient(1200px 520px at 85% -12%, rgba(124,58,237,.10), transparent 60%),
        radial-gradient(900px 520px at -5% 0%,  rgba(56,189,248,.10), transparent 55%),
        #f6f7fb !important;
}

/* ============================================================
   SIDEBAR  ·  de oscuro → claro tipo Aurora (con chips de icono)
   ============================================================ */
.elesis-aurora aside#sidebar {
    background: rgba(255,255,255,.78) !important;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-right: 1px solid rgba(15,23,42,.06) !important;
}
.elesis-aurora aside .border-slate-800 { border-color: rgba(15,23,42,.07) !important; }

/* Texto del sidebar → tonos oscuros legibles sobre claro */
.elesis-aurora aside .text-white      { color: #0f172a !important; }
.elesis-aurora aside .text-slate-300  { color: #475569 !important; }
.elesis-aurora aside .text-slate-400  { color: #94a3b8 !important; }
.elesis-aurora aside .text-slate-500  { color: #94a3b8 !important; }
.elesis-aurora aside .text-blue-500   { color: #7c3aed !important; }  /* "ADMIN" */

/* Logo */
.elesis-aurora aside .bg-blue-600.w-8.h-8 {
    background: linear-gradient(135deg,#6366f1,#7c3aed) !important;
    box-shadow: 0 8px 20px -6px rgba(124,58,237,.6) !important;
}

/* Buscador (Ctrl+K) */
.elesis-aurora aside #elesis-search-trigger {
    background: rgba(15,23,42,.04) !important;
    border-color: rgba(15,23,42,.08) !important;
    color: #475569 !important;
}
.elesis-aurora aside #elesis-search-trigger:hover { background: rgba(15,23,42,.07) !important; }
.elesis-aurora aside #elesis-search-trigger .bg-slate-900\/80 {
    background: #ffffff !important; border-color: #e2e8f0 !important; color: #64748b !important;
}

/* Enlaces de navegación */
.elesis-aurora aside nav a { color: #475569 !important; border-radius: 0.9rem !important; }
.elesis-aurora aside nav a:hover { background: rgba(124,58,237,.07) !important; color: #5b21b6 !important; }
.elesis-aurora aside nav a:hover::before { display: none !important; }

/* Icono de cada enlace → "chip" redondeado (firma de Aurora) */
.elesis-aurora aside nav a i {
    width: 30px; height: 30px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(99,102,241,.12); color: #6366f1 !important;
    font-size: 13px; transition: all .18s cubic-bezier(.4,0,.2,1);
}
.elesis-aurora aside nav a:hover i { transform: translateY(-1px); }

/* Estado activo (bg-blue-600) → píldora violeta translúcida */
.elesis-aurora aside nav a.bg-blue-600 {
    background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(124,58,237,.14)) !important;
    color: #5b21b6 !important;
    box-shadow: none !important;
}
.elesis-aurora aside nav a.bg-blue-600::before { display: none !important; }  /* quita la barra azul de elesis-ui */
.elesis-aurora aside nav a.bg-blue-600 i {
    background: linear-gradient(135deg,#6366f1,#7c3aed) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px -4px rgba(124,58,237,.55);
}

/* Sección V2 (púrpura) */
.elesis-aurora aside .text-purple-500 { color: #9333ea !important; }
.elesis-aurora aside .text-purple-300 { color: #7c3aed !important; }
.elesis-aurora aside nav a i.text-purple-400 { background: rgba(147,51,234,.12); color: #9333ea !important; }

/* Footer (perfil + logout) */
.elesis-aurora aside .bg-slate-800\/50 {
    background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(124,58,237,.10)) !important;
    border: 1px solid rgba(124,58,237,.12) !important;
}
.elesis-aurora aside .bg-slate-700 {
    background: linear-gradient(135deg,#6366f1,#7c3aed) !important; color: #fff !important;
}
.elesis-aurora aside .hover\:text-red-400:hover { color: #f43f5e !important; }

/* ============================================================
   CONTENIDO  ·  tarjetas glass, inputs, botones, tabla
   ============================================================ */

/* Tarjetas blancas SÓLIDAS (sin glass: evita transparencias y problemas de apilamiento) */
.elesis-aurora main .bg-white {
    background: #ffffff !important;
    border-color: #e9edf5 !important;
    border-radius: 1.25rem !important;
}

/* Resultados de búsqueda (typeahead): SÓLIDOS y SIEMPRE por encima de todo */
#res_students, #res_softwares, #res_courses,
#live_results, #live_results_course {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 9999 !important;
    box-shadow: 0 16px 40px -8px rgba(15,23,42,.22), 0 0 0 1px rgba(15,23,42,.05) !important;
}

/* Radios más generosos (estética Aurora) */
.elesis-aurora main .rounded-lg { border-radius: 0.9rem !important; }
.elesis-aurora main .rounded-xl { border-radius: 1.15rem !important; }

/* Inputs / selects / textareas */
.elesis-aurora main input,
.elesis-aurora main select,
.elesis-aurora main textarea { border-radius: 0.9rem !important; }
.elesis-aurora main input:focus,
.elesis-aurora main select:focus,
.elesis-aurora main textarea:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 4px rgba(124,58,237,.14) !important;
}

/* Botón primario azul (Nuevo Alumno / Guardar) → degradado violeta */
.elesis-aurora main .bg-blue-600 {
    background: linear-gradient(135deg,#6366f1,#7c3aed) !important;
    box-shadow: 0 10px 24px -8px rgba(124,58,237,.5), inset 0 1px 0 rgba(255,255,255,.25) !important;
}
.elesis-aurora main .bg-blue-600:hover,
.elesis-aurora main .hover\:bg-blue-700:hover {
    background: linear-gradient(135deg,#4f46e5,#6d28d9) !important;
    box-shadow: 0 16px 30px -10px rgba(124,58,237,.6) !important;
    transform: translateY(-2px);
}

/* Acentos azules de la UI → violeta (insignia de conteo, enlaces, etc.) */
.elesis-aurora main .bg-blue-100 { background: #ede9fe !important; }
.elesis-aurora main .text-blue-700 { color: #6d28d9 !important; }
.elesis-aurora main .border-blue-200 { border-color: #ddd6fe !important; }
.elesis-aurora main .text-blue-500 { color: #7c3aed !important; }
.elesis-aurora main .text-blue-200 { color: #c4b5fd !important; }

/* Tabla con sabor Aurora */
.elesis-aurora main table thead th {
    background: rgba(124,58,237,.05) !important;
    color: #6d28d9 !important;
}
.elesis-aurora main table tbody tr:hover { background: rgba(124,58,237,.045) !important; }

/* Insignias tipo píldora */
.elesis-aurora main .rounded-full { border-radius: 9999px !important; }

/* ============================================================
   CABECERA HERO (la pone people.php con la clase .aurora-hero)
   ============================================================ */
.elesis-aurora .aurora-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: 1.75rem;
    color: #fff;
    background: linear-gradient(120deg,#4f46e5 0%, #7c3aed 55%, #a21caf 100%);
    box-shadow: 0 20px 40px -16px rgba(124,58,237,.5);
}
.elesis-aurora .aurora-hero::after {
    content: ''; position: absolute; right: -3rem; top: -5rem;
    width: 18rem; height: 18rem; border-radius: 9999px;
    background: rgba(255,255,255,.12); filter: blur(8px); pointer-events: none;
}
.elesis-aurora .aurora-hero h1,
.elesis-aurora .aurora-hero p { color: #fff !important; }
.elesis-aurora .aurora-hero .hero-chip {
    background: rgba(255,255,255,.20) !important;
    color: #fff !important; border: 1px solid rgba(255,255,255,.25) !important;
    backdrop-filter: blur(6px);
}
/* Botones translúcidos dentro del hero */
.elesis-aurora .aurora-hero .hero-btn {
    background: rgba(255,255,255,.16) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    backdrop-filter: blur(6px);
    box-shadow: none !important;
}
.elesis-aurora .aurora-hero .hero-btn:hover {
    background: rgba(255,255,255,.28) !important;
    transform: translateY(-2px);
}
/* Botón primario (blanco) dentro del hero */
.elesis-aurora .aurora-hero .hero-btn-primary {
    background: #ffffff !important;
    color: #6d28d9 !important;
    border: none !important;
    box-shadow: 0 10px 24px -8px rgba(0,0,0,.25) !important;
}
.elesis-aurora .aurora-hero .hero-btn-primary:hover {
    background: #f5f3ff !important;
    transform: translateY(-2px);
}

/* Modales <dialog> con cabecera/acentos violeta bajo Aurora */
.elesis-aurora dialog .text-blue-700 { color: #6d28d9 !important; }

/* ============================================================
   INTERRUPTOR DE TEMA (día / noche) — botón flotante global
   Lo inyecta libs/elesis-theme.js en todas las páginas.
   ============================================================ */
#elesis-theme-toggle {
    position: fixed; right: 18px; bottom: 18px; z-index: 9999;
    width: 46px; height: 46px; border-radius: 9999px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    background: linear-gradient(135deg,#6366f1,#7c3aed); color: #fff;
    box-shadow: 0 10px 26px -8px rgba(124,58,237,.6);
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s;
}
#elesis-theme-toggle:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 30px -8px rgba(124,58,237,.7); }
#elesis-theme-toggle:active { transform: translateY(0) scale(1); }

/* ============================================================
   INTERRUPTOR DE TEMA EN EL SIDEBAR (estado DÍA)
   El estado NOCHE (mover el thumb) lo define elesis-night.css.
   ============================================================ */
.elesis-theme-switch {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; padding: 9px 12px; border-radius: 12px; cursor: pointer; user-select: none;
    background: rgba(99,102,241,.08); transition: background .18s;
}
.elesis-theme-switch:hover { background: rgba(99,102,241,.15); }
.elesis-theme-switch .ets-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #475569; }
.elesis-theme-switch .ets-track {
    position: relative; width: 54px; height: 28px; border-radius: 999px; background: #cbd5e1; flex: 0 0 auto;
    transition: background .22s ease; box-shadow: inset 0 1px 3px rgba(0,0,0,.18);
}
.elesis-theme-switch .ets-knob {
    position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px;
    background: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,.3); transition: transform .24s cubic-bezier(.4,0,.2,1);
}
.elesis-theme-switch .ets-knob i { position: absolute; font-size: 11px; transition: opacity .2s ease; }
.elesis-theme-switch .ets-i-sun { color: #f59e0b; opacity: 1; }
.elesis-theme-switch .ets-i-moon { color: #0ea5e9; opacity: 0; }

/* ============================================================
   MODAL DE EXPORTACIÓN (elesisExport.openModal) — PDF/Excel/CSV
   ============================================================ */
.elesis-export-ov {
    position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: elFadeIn .2s ease;
}
.elesis-export-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 1.25rem; overflow: hidden;
    box-shadow: 0 24px 48px -12px rgba(15,23,42,.4); animation: elDialogIn .28s cubic-bezier(.16,1,.3,1);
}
.elesis-export-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eef2f7; font-weight: 800; color: #0f172a; font-size: 1.05rem; }
.elesis-export-head span { display: flex; align-items: center; gap: 8px; }
.elesis-export-x { width: 32px; height: 32px; border: none; background: transparent; color: #94a3b8; border-radius: 8px; cursor: pointer; }
.elesis-export-x:hover { background: #f1f5f9; color: #475569; }
.elesis-export-sub { padding: 14px 20px 4px; color: #64748b; font-size: .85rem; }
.elesis-export-opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 8px 20px 22px; }
.elesis-export-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 1px solid #e6eaf1; border-radius: 1rem; background: #f8fafc; cursor: pointer; transition: all .18s cubic-bezier(.4,0,.2,1); font-weight: 700; color: #334155; }
.elesis-export-opt i { font-size: 24px; }
.elesis-export-opt span { font-size: .85rem; }
.elesis-export-opt small { font-size: .65rem; color: #94a3b8; font-weight: 600; }
.elesis-export-opt:hover { border-color: #7c3aed; background: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(124,58,237,.3); }

/* ============================================================
   BARRA DE BÚSQUEDA — altura/relleno uniformes (inputs con icono)
   Solo afecta inputs con padding-izquierdo (los de búsqueda con lupa),
   para no alterar inputs pequeños de formularios.
   ============================================================ */
.elesis-aurora main input.pl-10,
.elesis-aurora main input.pl-11 { min-height: 46px; }
