:root {
    --bg: hsl(230, 35%, 7%);
    --card: hsla(230, 30%, 16%, 0.55);
    --borde: hsla(230, 60%, 80%, 0.12);
    --texto: hsl(230, 25%, 92%);
    --suave: hsl(230, 15%, 65%);
    --acento: hsl(262, 85%, 66%);
    --acento2: hsl(195, 90%, 55%);
    --ok: hsl(152, 65%, 48%);
    --ko: hsl(352, 85%, 62%);
    --aviso: hsl(38, 95%, 58%);
    --radio: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--texto);
    line-height: 1.5;
}

.fondo {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(40vw 40vw at 15% 10%, hsla(262, 85%, 60%, 0.28), transparent 70%),
        radial-gradient(35vw 35vw at 85% 30%, hsla(195, 90%, 50%, 0.22), transparent 70%),
        radial-gradient(45vw 45vw at 50% 110%, hsla(320, 80%, 55%, 0.18), transparent 70%);
    animation: flotar 18s ease-in-out infinite alternate;
}

@keyframes flotar {
    to {
        transform: scale(1.08) translateY(-2%);
        filter: hue-rotate(20deg);
    }
}

.contenedor {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 22px;
}

.cabecera {
    text-align: center;
    margin-bottom: 40px;
    animation: entrar .6s ease both;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    background: hsla(262, 85%, 66%, .15);
    border: 1px solid hsla(262, 85%, 66%, .4);
    color: hsl(262, 90%, 82%);
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    margin: 14px 0 6px;
    background: linear-gradient(90deg, #fff, hsl(262, 90%, 82%), var(--acento2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitulo {
    color: var(--suave);
    margin: 0;
}

.rejilla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.tarjeta {
    background: var(--card);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    padding: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
    animation: entrar .6s ease both;
}

.tarjeta:nth-child(2) {
    animation-delay: .12s;
}

@keyframes entrar {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    margin: 0 0 22px;
}

.campo {
    display: block;
    margin-bottom: 18px;
}

.campo>span {
    display: block;
    font-size: 13px;
    color: var(--suave);
    margin-bottom: 6px;
}

.campo input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid var(--borde);
    background: hsla(230, 35%, 6%, .55);
    color: var(--texto);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.campo input:focus {
    outline: none;
    border-color: var(--acento);
    box-shadow: 0 0 0 4px hsla(262, 85%, 66%, .2);
}

.campo-pass {
    position: relative;
}

.campo-pass input {
    padding-right: 46px;
}

.btn-ojo {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--suave);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.btn-ojo:hover,
.btn-ojo.activo {
    color: var(--texto);
    background: hsla(0, 0%, 100%, .06);
}

.btn {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 12px;
    font: 600 15px 'Outfit', sans-serif;
    letter-spacing: .02em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--acento), var(--acento2));
    background-size: 160% 160%;
    transition: transform .15s, box-shadow .25s, background-position .4s;
    box-shadow: 0 10px 25px -10px hsla(262, 85%, 60%, .7);
}

.btn:hover {
    background-position: 100% 0;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px hsla(262, 85%, 60%, .9);
}

.btn:active {
    transform: translateY(1px);
}

.btn.cargando {
    opacity: .7;
    pointer-events: none;
}

.resultado {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-top: 22px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid;
    animation: entrar .4s ease both;
}

.resultado small {
    display: block;
    color: var(--suave);
    margin-top: 2px;
}

.resultado-icono {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0b0d17;
}

.resultado.ok {
    border-color: hsla(152, 65%, 48%, .45);
    background: hsla(152, 65%, 48%, .1);
}

.resultado.ok .resultado-icono {
    background: var(--ok);
    box-shadow: 0 0 20px hsla(152, 65%, 48%, .6);
}

.resultado.ko {
    border-color: hsla(352, 85%, 62%, .45);
    background: hsla(352, 85%, 62%, .1);
}

.resultado.ko .resultado-icono {
    background: var(--ko);
    box-shadow: 0 0 20px hsla(352, 85%, 62%, .6);
}

.resultado.aviso {
    border-color: hsla(38, 95%, 58%, .45);
    background: hsla(38, 95%, 58%, .1);
}

.resultado.aviso .resultado-icono {
    background: var(--aviso);
}

.diag {
    list-style: none;
    margin: 0;
    padding: 0;
}

.diag li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--borde);
    font-size: 14px;
}

.diag li:last-child {
    border-bottom: 0;
}

.diag code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: hsl(195, 90%, 75%);
    text-align: right;
}

.diag i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 12px;
}

.diag li.si i {
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
}

.diag li.no i {
    background: var(--ko);
    box-shadow: 0 0 10px var(--ko);
}

.diag li.medio code {
    color: var(--aviso);
}

.diag li.si code {
    color: var(--ok);
}

.nota {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

.nota.no {
    background: hsla(352, 85%, 62%, .1);
    border: 1px solid hsla(352, 85%, 62%, .35);
    color: hsl(352, 90%, 85%);
}

pre.nota {
    font-family: 'JetBrains Mono', monospace;
    max-height: 240px;
    overflow: auto;
}
