:root {
    --fondo: #06090d;
    --fondo-profundo: #020406;
    --panel: #07121d;
    --texto: #ffffff;
    --secundario: #b9c3ce;
    --acento: #28a9e0;
    --acento-suave: rgba(40, 169, 224, 0.16);
    --borde: rgba(255, 255, 255, 0.14);
    --error: #ff8f8f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--fondo-profundo);
}

body {
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% 44%, rgba(23, 107, 141, 0.38), transparent 31%),
        linear-gradient(115deg, #020406 0%, #04090e 46%, #071d29 100%);
    color: var(--texto);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.visualmente-oculto {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.acceso {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 0.92fr);
}

.acceso-identidad {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(34px, 5vw, 76px) clamp(32px, 6.5vw, 112px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-right: 1px solid rgba(40, 169, 224, 0.14);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.17)),
        radial-gradient(circle at 95% 42%, #176b8d 0%, #07121d 42%, #020406 76%);
}

.acceso-identidad::after {
    content: "";
    position: absolute;
    right: -22%;
    bottom: -36%;
    width: min(54vw, 780px);
    aspect-ratio: 1;
    border: 1px solid rgba(40, 169, 224, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 48px rgba(40, 169, 224, 0.025),
        0 0 0 100px rgba(40, 169, 224, 0.018);
    pointer-events: none;
}

.acceso-identidad__marca {
    position: relative;
    z-index: 1;
    width: clamp(190px, 18vw, 280px);
    height: auto;
}

.acceso-identidad__contenido {
    position: relative;
    z-index: 1;
    align-self: center;
    max-width: 720px;
    padding-block: 52px;
}

.acceso-etiqueta,
.formulario-acceso__etiqueta {
    color: var(--acento);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.17rem;
    text-transform: uppercase;
}

.acceso-identidad h1 {
    margin: 20px 0 28px;
    font-size: clamp(3.8rem, 7.1vw, 7.4rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 0.82;
    text-transform: uppercase;
}

.acceso-identidad h1 span {
    display: block;
    margin-bottom: 0.16em;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.47em;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.acceso-identidad__descripcion {
    max-width: 630px;
    padding-left: 18px;
    border-left: 2px solid var(--acento);
}

.acceso-identidad__unidad {
    color: rgba(225, 233, 239, 0.92);
    font-size: clamp(0.96rem, 1.35vw, 1.08rem);
    font-weight: 600;
    line-height: 1.4;
}

.acceso-identidad__ubicacion {
    margin-top: 3px;
    color: rgba(185, 195, 206, 0.7);
    font-size: clamp(0.76rem, 0.9vw, 0.88rem);
    letter-spacing: 0.035em;
    line-height: 1.4;
}

.acceso-panel {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-areas: "centro";
    place-items: center;
    overflow: hidden;
    padding: clamp(28px, 5vw, 72px);
    isolation: isolate;
}

.acceso-panel::before {
    content: "";
    position: absolute;
    inset: 7%;
    z-index: -2;
    border: 1px solid rgba(255, 255, 255, 0.055);
    background:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle, #000 20%, transparent 72%);
}

.acceso-panel__halo {
    position: absolute;
    z-index: -1;
    width: min(58vw, 650px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(40, 169, 224, 0.18), transparent 67%);
    filter: blur(2px);
    opacity: 0.66;
    transition: opacity 500ms ease, transform 700ms ease;
}

.activador-acceso {
    grid-area: centro;
    z-index: 2;
    display: none;
    width: min(100%, 390px);
    align-items: center;
    flex-direction: column;
    text-align: center;
    transition: opacity 260ms ease, transform 420ms ease, visibility 260ms ease;
}

.js .activador-acceso {
    display: flex;
}

.activador-acceso__boton {
    position: relative;
    width: clamp(118px, 12vw, 154px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid rgba(130, 205, 238, 0.48);
    border-radius: 50%;
    background: rgba(2, 8, 13, 0.82);
    box-shadow:
        0 0 0 13px rgba(40, 169, 224, 0.045),
        0 22px 70px rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 300ms ease;
}

.activador-acceso__boton::before,
.activador-acceso__boton::after {
    content: "";
    position: absolute;
    inset: -22px;
    border: 1px solid rgba(40, 169, 224, 0.24);
    border-radius: 50%;
}

.activador-acceso__boton::after {
    inset: -43px;
    border-color: rgba(40, 169, 224, 0.1);
}

.activador-acceso__boton:hover,
.activador-acceso__boton:focus-visible {
    transform: translateY(-4px) scale(1.025);
    border-color: #7fd6fa;
    box-shadow:
        0 0 0 13px rgba(40, 169, 224, 0.08),
        0 0 48px rgba(40, 169, 224, 0.34),
        0 22px 70px rgba(0, 0, 0, 0.52);
    outline: none;
}

.activador-acceso__boton img {
    display: block;
    width: 72%;
    height: auto;
    border-radius: 50%;
}

.activador-acceso__pulso {
    position: absolute;
    inset: -2px;
    border: 1px solid rgba(114, 210, 249, 0.5);
    border-radius: 50%;
    animation: pulso-acceso 2.8s ease-out infinite;
}

@keyframes pulso-acceso {
    0% {
        transform: scale(1);
        opacity: 0.62;
    }
    70%,
    100% {
        transform: scale(1.44);
        opacity: 0;
    }
}

.formulario-acceso {
    grid-area: centro;
    z-index: 1;
    width: min(100%, 470px);
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(145deg, rgba(8, 18, 27, 0.95), rgba(3, 10, 16, 0.97));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
}

.js .formulario-acceso {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.975);
    pointer-events: none;
    transition: opacity 320ms ease 110ms, transform 430ms ease 90ms, visibility 320ms ease;
}

.pagina-acceso.acceso-iniciado .activador-acceso {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.93);
    pointer-events: none;
}

.pagina-acceso.acceso-iniciado .acceso-panel__halo {
    transform: scale(1.12);
    opacity: 1;
}

.js .pagina-acceso.acceso-iniciado .formulario-acceso {
    z-index: 3;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.formulario-acceso__encabezado h2 {
    margin: 9px 0 11px;
    color: #ffffff;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    line-height: 1.05;
}

.formulario-acceso__encabezado > p:last-child {
    color: rgba(185, 195, 206, 0.76);
    font-size: 0.88rem;
    line-height: 1.55;
}

.mensaje-error {
    margin-top: 22px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-left: 2px solid var(--error);
    background: rgba(255, 91, 91, 0.09);
    color: #ffd5d5;
    font-size: 0.82rem;
    line-height: 1.45;
}

.mensaje-error span {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
}

.formulario-acceso form {
    margin-top: 25px;
}

.campo-acceso + .campo-acceso {
    margin-top: 18px;
}

.campo-acceso label {
    display: block;
    margin-bottom: 8px;
    color: rgba(238, 244, 248, 0.88);
    font-size: 0.78rem;
    font-weight: 650;
}

.campo-acceso input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.28);
    color: #ffffff;
    caret-color: var(--acento);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.campo-acceso input:focus {
    border-color: rgba(77, 194, 242, 0.88);
    background: rgba(4, 14, 21, 0.86);
    box-shadow: 0 0 0 3px rgba(40, 169, 224, 0.12);
}

.campo-acceso__contrasena {
    position: relative;
}

.campo-acceso__contrasena input {
    padding-right: 84px;
}

.campo-acceso__mostrar {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: rgba(145, 210, 238, 0.82);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.campo-acceso__mostrar:hover,
.campo-acceso__mostrar:focus-visible {
    color: #ffffff;
    outline: none;
}

.recordar-sesion {
    margin: 18px 0 23px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(185, 195, 206, 0.8);
    cursor: pointer;
    font-size: 0.78rem;
}

.recordar-sesion input {
    width: 16px;
    height: 16px;
    accent-color: var(--acento);
}

.boton-ingresar {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(91, 204, 250, 0.82);
    border-radius: 0;
    background: var(--acento);
    color: #02070a;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.025rem;
    text-transform: uppercase;
    transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.boton-ingresar:hover,
.boton-ingresar:focus-visible {
    background: #ffffff;
    color: #05090d;
    box-shadow: 0 0 32px rgba(40, 169, 224, 0.28);
    outline: none;
}

.boton-ingresar span {
    font-size: 1.15rem;
}

.formulario-acceso__soporte {
    margin-top: 22px;
    color: rgba(185, 195, 206, 0.55);
    font-size: 0.7rem;
    line-height: 1.5;
    text-align: center;
}

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

    .acceso-identidad {
        min-height: 42vh;
        padding: 30px clamp(24px, 8vw, 70px) 46px;
        border-right: 0;
        border-bottom: 1px solid rgba(40, 169, 224, 0.14);
    }

    .acceso-identidad__contenido {
        padding: 60px 0 18px;
    }

    .acceso-identidad h1 {
        font-size: clamp(3.4rem, 13vw, 6rem);
    }

    .acceso-panel {
        min-height: 58vh;
        padding: 70px 24px;
    }

    .acceso-panel__halo {
        width: min(92vw, 620px);
    }
}

@media (max-width: 560px) {
    .acceso-identidad {
        min-height: auto;
        padding: 24px 22px 38px;
    }

    .acceso-identidad__marca {
        width: 180px;
    }

    .acceso-identidad__contenido {
        padding: 52px 0 0;
    }

    .acceso-identidad h1 {
        margin-block: 15px 22px;
        font-size: clamp(3.35rem, 20vw, 4.75rem);
    }

    .acceso-identidad__unidad {
        font-size: 0.94rem;
    }

    .acceso-identidad__ubicacion {
        font-size: 0.76rem;
    }

    .acceso-panel {
        min-height: 520px;
        padding: 48px 16px;
    }

    .formulario-acceso {
        padding: 25px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
