:root {
    --fondo-auth: #0b1120;
    --fondo-auth-medio: #0f172a;
    --fondo-caja: #111827;
    --cyan-auth: #22d3ee;
    --cyan-auth-hover: #06b6d4;
    --texto-auth: #e2e8f0;
    --texto-auth-gris: #a8b9cc;
    --texto-auth-label: #cbd5e1;
    --borde-auth: #1f2937;
    --sombra-auth: 0 25px 60px rgba(0, 0, 0, 0.6);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom, var(--fondo-auth), var(--fondo-auth-medio));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* la caja oscura donde va todo el formulario */
.caja-autenticacion {
    width: 90%;
    max-width: 350px;
    padding: 45px;
    border-radius: 18px;
    background: var(--fondo-caja);
    border: 1px solid var(--borde-auth);
    box-shadow: var(--sombra-auth);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* para centrar el logo arriba */
.logotipo-centro {
    text-align: center;
    margin-bottom: 25px;
}

/* la imagen redonda del logo */
.logotipo-centro img {
    width: 90px;
    border-radius: 50%;
    border: 2px solid var(--cyan-auth);
}

/* encabezado dentro de la caja */
.caja-autenticacion h2 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--texto-auth);
    font-weight: 600;
    font-size: 22px;
}

/* texto debajo del titulo */
.caja-autenticacion p {
    text-align: center;
    margin-bottom: 30px;
    color: var(--texto-auth-gris);
    font-size: 14px;
}

.caja-autenticacion form {
    width: 100%;
}

/* el fieldset que agrupa los campos */
.caja-autenticacion fieldset {
    border: 1px solid var(--borde-auth);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

/* titulo del grupo de campos */
.caja-autenticacion legend {
    color: var(--cyan-auth);
    font-weight: 600;
    font-size: 14px;
    padding: 0 6px;
}

/* nombre del campo */
label {
    color: var(--texto-auth-label);
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

/* todos los inputs de texto, mail, password */
input[type=text],
input[type=password],
input[type=email] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 8px;
    border: 1px solid var(--borde-auth);
    background: var(--fondo-auth-medio);
    color: var(--texto-auth);
    transition: 0.3s ease;
    box-sizing: border-box;
    font-size: 15px;
}

/* efecto cuando seleccionas un campo */
input:focus {
    border-color: var(--cyan-auth);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

/* boton principal de enviar */
.btn-accion {
    background: var(--cyan-auth);
    color: var(--fondo-auth);
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: 0.3s ease;
    font-size: 16px;
    margin-bottom: 10px;
}

.btn-accion:hover {
    background: var(--cyan-auth-hover);
    transform: translateY(-1px);
}

/* los botones grises de abajo, secundarios */
.btn-alternativo {
    background: transparent;
    color: var(--texto-auth-gris);
    border: 2px solid var(--borde-auth);
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: 0.3s ease;
    font-size: 16px;
    margin-bottom: 10px;
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-alternativo:hover {
    background: var(--borde-auth);
    color: #fff;
}

/* aviso rojo cuando falla algo */
.alerta-roja {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* aviso verde de exito */
.alerta-verde {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* que se note el borde cuando usan Tab */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cyan-auth);
    outline-offset: 3px;
}

/* === telefonos chiquitos === */
@media screen and (max-width: 480px) {
    .caja-autenticacion {
        width: 100%;
        padding: 30px;
    }

    .logotipo-centro img {
        width: 70px;
    }

    .caja-autenticacion fieldset {
        padding: 15px;
    }
}

/* === tablet === */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .caja-autenticacion {
        width: 90%;
        padding: 40px;
    }

    .logotipo-centro img {
        width: 80px;
    }
}

/* === laptops y monitores === */
@media screen and (min-width: 769px) {
    .caja-autenticacion {
        max-width: 420px;
    }

    .logotipo-centro img {
        width: 90px;
    }
}

/* === pantallas bien grandotas === */
@media screen and (min-width: 1200px) {
    .caja-autenticacion {
        max-width: 450px;
        padding: 50px;
    }
}

/* cuando el telefono esta horizontal */
@media screen and (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 10px;
    }

    .caja-autenticacion {
        padding: 25px;
    }

    .logotipo-centro {
        margin-bottom: 10px;
    }

    .logotipo-centro img {
        width: 50px;
    }
}