/* ═══════════════════════════════════════════════════════════════════════════
   Web de VICTUS (registro, login y panel) — misma identidad que la página de
   presentación: negro carbono, verde neón, Orbitron + Inter, textura y anillos.
   Pensada primero para lectores de pantalla y teclado: texto grande, alto
   contraste, foco siempre visible y nada que dependa solo del color.
   Las tipografías vienen de /css/fuentes.css y la textura de /img/ (los sirve
   la página de presentación).
   Índice: 1 Base · 2 Fondo · 3 Barra superior · 4 Estructura · 5 Tarjetas
           6 Formularios · 7 Botones · 8 Mensajes · 9 Listas y tablas
           10 Resumen · 11 Login y registro · 12 Utilidades · 13 Movimiento
   ═══════════════════════════════════════════════════════════════════════════ */

/* ---------- 1. Base ---------- */
:root {
    --neon: #39ff14;
    --neon-suave: rgba(57, 255, 20, 0.14);
    --cian: #00f3ff;
    --negro: #050607;
    --vidrio: rgba(10, 18, 11, 0.72);
    --linea: rgba(255, 255, 255, 0.1);
    --borde-neon: rgba(57, 255, 20, 0.22);
    --texto: #e8eee9;
    --texto-2: #a9b4ac;
    --error: #ff6b6b;
    --titulos: "Orbitron", "Segoe UI", Verdana, sans-serif;
    --cuerpo: "Inter", "Segoe UI", Arial, sans-serif;
    --radio: 22px;
    --suave: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 18px; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--negro);
    color: var(--texto);
    font-family: var(--cuerpo);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--titulos); line-height: 1.2; margin: 0 0 0.6rem; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: 0.03em; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; }
p { margin: 0 0 0.8rem; }

a { color: var(--neon); text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible {
    outline: 3px solid var(--cian);
    outline-offset: 3px;
    border-radius: 8px;
}

code {
    font-size: 0.92em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--linea);
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
}

/* ---------- 2. Fondo: textura de la marca y anillos del HUD ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(1100px 620px at 50% -12%, rgba(57, 255, 20, 0.11), transparent 62%),
        linear-gradient(rgba(5, 6, 7, 0.84), rgba(5, 6, 7, 0.94)),
        url("/img/fondo-textura.webp") center / cover no-repeat;
}

.fondo-anillos {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.55;
}
.anillo {
    position: absolute;
    left: 50%;
    top: 46%;
    width: var(--d);
    height: var(--d);
    margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
    border-radius: 50%;
    border: 1px solid rgba(57, 255, 20, 0.1);
}
.anillo--1 { --d: min(70vw, 640px); border-top: 2px solid rgba(57, 255, 20, 0.7); animation: girar 30s linear infinite; }
.anillo--2 { --d: min(96vw, 940px); border-bottom: 2px solid rgba(0, 243, 255, 0.55); border-left: 1px dashed rgba(0, 243, 255, 0.3); animation: girar 50s linear infinite reverse; }
.anillo--3 { --d: min(130vw, 1280px); border: 1px dashed rgba(255, 255, 255, 0.07); animation: girar 90s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- 3. Barra superior ---------- */
.enlace-saltar {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 2000;
    background: var(--neon);
    color: #031003;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: top 0.2s;
}
.enlace-saltar:focus { top: 16px; }

.barra-superior {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 6, 7, 0.74);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    border-bottom: 1px solid var(--linea);
}
.barra-superior__fila {
    width: min(100% - 32px, 1180px);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding: 12px 0;
}
.marca {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--titulos);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.22em;
    color: #fff;
    text-decoration: none;
}
.marca img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.45)); }
.marca:hover { color: var(--neon); }

.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.menu a, .menu .boton-enlace {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font-family: var(--cuerpo);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto-2);
    text-decoration: none;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.menu a:hover, .menu .boton-enlace:hover { color: var(--neon); }
.menu a[aria-current="page"] {
    color: var(--neon);
    border-color: var(--borde-neon);
    background: var(--neon-suave);
    font-weight: 600;
}
.menu .boton-enlace { color: var(--texto); border-color: rgba(255, 255, 255, 0.28); margin-left: 6px; }
.menu .boton-enlace:hover { border-color: var(--neon); color: var(--neon); transform: none; box-shadow: none; }

/* ---------- 4. Estructura ---------- */
main {
    flex: 1;
    width: min(100% - 32px, 920px);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) 0 48px;
}

.etiqueta {
    display: inline-block;
    font-family: var(--titulos);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--neon);
    border: 1px solid rgba(57, 255, 20, 0.4);
    background: rgba(57, 255, 20, 0.06);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.encabezado { margin-bottom: 28px; }
.encabezado p { color: var(--texto-2); max-width: 62ch; }

.pie {
    border-top: 1px solid var(--linea);
    background: rgba(0, 0, 0, 0.55);
    color: var(--texto-2);
    font-size: 0.85rem;
    text-align: center;
    padding: 22px 16px;
}
.pie p { margin: 0; }

/* ---------- 5. Tarjetas ---------- */
.tarjeta {
    position: relative;
    background: var(--vidrio);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--borde-neon);
    border-radius: var(--radio);
    padding: clamp(22px, 4vw, 36px);
    margin-bottom: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.tarjeta > h1:first-child, .tarjeta > h2:first-child { margin-top: 0; }

.ayuda { color: var(--texto-2); font-size: 0.88rem; margin: 6px 0 0; }

/* ---------- 6. Formularios ---------- */
form:not(.form-enlinea) { margin-top: 8px; }

label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 20px 0 8px;
    color: #fff;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], select {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    font-family: var(--cuerpo);
    font-size: 1rem;
    color: #fff;
    background: rgba(3, 6, 4, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:hover, select:hover { border-color: rgba(57, 255, 20, 0.45); }
input:focus, select:focus {
    outline: 3px solid var(--cian);
    outline-offset: 2px;
    border-color: var(--neon);
    box-shadow: 0 0 0 4px rgba(57, 255, 20, 0.12);
}
select {
    appearance: none;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--neon) 50%), linear-gradient(135deg, var(--neon) 50%, transparent 50%);
    background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
select option { background: #0c0f0d; color: #fff; }

/* ---------- 7. Botones ---------- */
button, .boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    margin-top: 26px;
    padding: 0 28px;
    font-family: var(--cuerpo);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    color: #031003;
    background: var(--neon);
    border: 1.5px solid var(--neon);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.3s var(--suave), box-shadow 0.3s var(--suave), background 0.2s, color 0.2s, border-color 0.2s;
}
button:hover, .boton:hover {
    color: #031003;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(57, 255, 20, 0.4);
}

.boton--linea {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.4);
}
.boton--linea:hover { color: var(--neon); border-color: var(--neon); box-shadow: none; }

.boton-peligro {
    color: var(--error);
    background: rgba(255, 107, 107, 0.06);
    border-color: rgba(255, 107, 107, 0.55);
}
.boton-peligro:hover { color: #1a0000; background: var(--error); border-color: var(--error); box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3); }

.boton--chico { min-height: 44px; padding: 0 18px; font-size: 0.9rem; }

/* ---------- 8. Mensajes ---------- */
.mensajes { margin-bottom: 22px; display: grid; gap: 10px; }
.mensaje {
    margin: 0;
    padding: 14px 18px 14px 48px;
    border-radius: 14px;
    font-weight: 600;
    position: relative;
    background: var(--vidrio);
}
.mensaje::before {
    position: absolute;
    left: 18px;
    top: 13px;
    font-weight: 800;
}
.mensaje-exito { border: 1px solid var(--neon); color: var(--neon); }
.mensaje-exito::before { content: "✓"; }
.mensaje-error { border: 1px solid var(--error); color: var(--error); }
.mensaje-error::before { content: "!"; }

/* ---------- 9. Listas y tablas ---------- */
.lista-tarjetas { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.lista-tarjetas li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--linea);
    border-radius: 16px;
    transition: border-color 0.2s, background 0.2s;
}
.lista-tarjetas li:hover { border-color: var(--borde-neon); background: rgba(57, 255, 20, 0.04); }
.lista-tarjetas strong { color: #fff; }
.lista-tarjetas .detalle { display: block; color: var(--texto-2); font-size: 0.9rem; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acciones .boton, .acciones button, .lista-tarjetas .boton { margin-top: 0; }

.tabla { overflow-x: auto; border: 1px solid var(--linea); border-radius: 16px; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
caption { text-align: left; padding: 12px 16px 0; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--linea); vertical-align: top; }
th { font-family: var(--titulos); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--neon); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(57, 255, 20, 0.04); }

.estado-completada, .estado-exitoso, .estado-enviado { color: var(--neon); font-weight: 700; }
.estado-fallida, .estado-fallido, .estado-cancelada { color: var(--error); font-weight: 700; }

/* ---------- 10. Resumen del panel ---------- */
.rejilla-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.rejilla-resumen .tarjeta { margin: 0; padding: 22px; text-align: left; }
.rejilla-resumen .numero {
    font-family: var(--titulos);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--neon);
    text-shadow: 0 0 22px rgba(57, 255, 20, 0.5);
}
.rejilla-resumen p { margin: 6px 0 0; color: var(--texto-2); font-size: 0.92rem; }

/* ---------- 11. Login y registro ---------- */
.pagina-auth main { width: min(100% - 32px, 560px); }
.pagina-auth .fondo-anillos { opacity: 0.8; }
.auth-marca { text-align: center; margin-bottom: 18px; }
.auth-marca img {
    width: 84px;
    height: 84px;
    margin: 0 auto 10px;
    display: block;
    filter: drop-shadow(0 0 28px rgba(57, 255, 20, 0.5));
}
.pagina-auth h1 { text-align: center; }
.pagina-auth .tarjeta > .ayuda:first-of-type { text-align: center; }
.pagina-auth button[type="submit"] { width: 100%; }
.enlaces-auth { margin: 22px 0 0; text-align: center; color: var(--texto-2); }

/* Casilla «Acepto los términos» (22/10): el cuadro grande, fácil de marcar, con el texto al lado */
.casilla { display: flex; gap: 12px; align-items: flex-start; margin: 24px 0 0; }
.casilla input[type="checkbox"] { width: 24px; height: 24px; flex: none; margin: 2px 0 0; accent-color: var(--neon); }
.casilla input[type="checkbox"]:focus { outline: 3px solid var(--cian); outline-offset: 2px; }
.casilla label { margin: 0; font-weight: 400; }

/* Campo trampa del antirobots (22/10): fuera de la pantalla, sin foco y oculto al lector de pantalla */
.trampa { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Páginas de texto largo (términos y condiciones) */
.pagina-auth .tarjeta--texto h1 { text-align: left; }
.tarjeta--texto h2 { margin: 26px 0 8px; }
.tarjeta--texto ul { padding-left: 1.2em; }
.tarjeta--texto li { margin: 6px 0; }

/* Contraseña con su botón «Mostrar» al lado; presionado se ve relleno como los botones principales */
.campo-contrasena { display: flex; gap: 10px; align-items: center; }
.campo-contrasena input { flex: 1; min-width: 0; }
.campo-contrasena .boton-ver-contrasena { flex: none; margin-top: 0; }
.boton-ver-contrasena[hidden] { display: none; }
.boton-ver-contrasena[aria-pressed="true"] { color: #031003; background: var(--neon); border-color: var(--neon); }

/* Errores: resumen arriba del formulario (vacío no ocupa espacio) y mensaje debajo de cada campo */
.resumen-errores:empty { display: none; }
.mensaje p { margin: 0; }
.mensaje ul { margin: 6px 0 0; padding-left: 1.2em; }
.mensaje-error a, .error-campo a { color: inherit; }
.error-campo { color: var(--error); font-size: 0.88rem; font-weight: 600; margin: 6px 0 0; }
input[aria-invalid="true"] { border-color: var(--error); }
.reglas-contrasena p { margin: 0; }
.reglas-contrasena ul { margin: 2px 0 0; padding-left: 1.2em; }

/* ---------- 12. Utilidades ---------- */
.form-enlinea { display: inline; margin: 0; }
.form-enlinea button { margin-top: 0; }
.boton-enlace { margin: 0; }
.oculto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 720px) {
    html { font-size: 17px; }
    .barra-superior { position: static; }
    .barra-superior__fila { justify-content: center; }
    .rejilla-resumen .tarjeta { padding: 18px; }
    .rejilla-resumen .numero { font-size: 1.8rem; }
    .menu { justify-content: center; }
    .menu a, .menu .boton-enlace { min-height: 40px; padding: 0 12px; font-size: 0.85rem; }
    .lista-tarjetas li { flex-direction: column; align-items: flex-start; }
}

/* ---------- 13. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    .anillo { animation: none; }
    button, .boton, input, select { transition: none; }
    button:hover, .boton:hover { transform: none; }
}
