

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--gray-100);
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-card {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    min-height: 100dvh;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-hero {
    position: relative;
    flex: 0 0 auto;
    padding: 3rem 1.75rem 2.5rem;
    text-align: center;
    color: white;
    background:
        radial-gradient(38rem 26rem at 15% -10%, rgba(240, 189, 63, 0.25), transparent 60%),
        linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-700) 100%);
    border-bottom: 3px solid var(--gold-400);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

    .brand-mark svg {
        width: 30px;
        height: 30px;
        color: var(--gold-400);
    }

.login-brand-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.login-tagline {
    margin: 0.4rem 0 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
}

.login-body {
    flex: 1 1 auto;
    padding: 2rem 1.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--red-50);
    border: 1px solid #f3c9c2;
    color: var(--red-600);
    border-radius: 0.6rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}

    .login-alert svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

    .login-alert ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

.login-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.form-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-with-icon svg {
        position: absolute;
        left: 1rem;
        width: 20px;
        height: 20px;
        color: var(--gray-400);
        pointer-events: none;
    }

    .input-with-icon input {
        width: 100%;
        /* padding vertical grande + font-size 16px: objetivo táctil cómodo y evita
           que iOS haga zoom automático al enfocar el campo */
        padding: 0.95rem 1rem 0.95rem 2.9rem;
        border: 1.5px solid var(--gray-200);
        background: var(--gray-50);
        border-radius: 0.75rem;
        font-size: 16px;
        color: var(--gray-800);
        transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    }

        .input-with-icon input::placeholder {
            color: var(--gray-400);
        }

        .input-with-icon input:focus {
            outline: none;
            background: white;
            border-color: var(--gold-500);
            box-shadow: 0 0 0 4px rgba(217, 158, 29, 0.16);
        }

.curp-input {
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    /* Botón alto: objetivo táctil de ~52px, cómodo para pulgar en celular */
    min-height: 52px;
    margin-top: 0.35rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    color: white;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(14, 28, 71, 0.4);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
}

    .login-submit svg {
        width: 18px;
        height: 18px;
        transition: transform 0.15s ease-out;
    }

    .login-submit:hover {
        filter: brightness(1.15);
        box-shadow: 0 14px 28px -8px rgba(14, 28, 71, 0.5);
    }

    .login-submit:hover svg {
        transform: translateX(3px);
    }

    .login-submit:active {
        transform: scale(0.98);
    }

    .login-submit:focus-visible,
    .input-with-icon input:focus-visible {
        outline: 3px solid var(--blue-500);
        outline-offset: 2px;
    }

.login-footnote {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* A partir de aquí hay espacio de sobra: la tarjeta deja de ocupar toda la
   pantalla y se centra con esquinas redondeadas y sombra, como una tarjeta
   flotante sobre el fondo gris. El contenido y el layout son los mismos que
   en celular, solo cambia el contenedor. */
@media (min-width: 480px) {
    .login-page {
        padding: 2rem 1.25rem;
    }

    .login-card {
        min-height: 0;
        border-radius: 1.25rem;
        box-shadow: var(--shadow-lg);
    }

    .login-hero {
        padding: 2.75rem 2rem 2.25rem;
    }

    .login-body {
        padding: 2rem 2rem 2.25rem;
    }
}
