body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(rgba(46, 157, 227, .03), rgba(255, 206, 45, .03)),
        url("../img/fondo_inicio_pixel.png") center center / cover no-repeat fixed;
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, .95fr) minmax(500px, 1.05fr);
    gap: clamp(30px, 6vw, 88px);
    align-items: center;
    padding: clamp(28px, 4vw, 64px) clamp(28px, 7vw, 96px);
}

.auth-intro {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-logo-wrap {
    width: min(390px, 90%);
    margin-bottom: 24px;
}

.auth-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 7px 0 rgba(255,255,255,.88)) drop-shadow(0 11px 10px rgba(4,44,88,.16));
}

.auth-welcome {
    margin: 0 0 12px;
    padding: 10px 26px;
    color: white;
    background: var(--ua-blue);
    border: 3px solid var(--ua-blue-deep);
    border-left: 8px solid var(--ua-yellow);
    border-right: 8px solid var(--ua-yellow);
    border-radius: 8px;
    box-shadow: 0 5px 0 var(--ua-blue-deep);
    font-size: clamp(17px, 2vw, 24px);
    font-weight: 900;
}

.auth-tagline {
    margin: 10px 0 0;
    color: #0b315f;
    font-size: clamp(16px, 1.65vw, 21px);
    font-weight: 800;
    text-shadow: 0 2px 0 rgba(255,255,255,.85);
}

.auth-card-wrap {
    width: min(100%, 650px);
    justify-self: center;
}

.auth-card {
    padding: 54px clamp(28px, 5vw, 52px) 34px;
}

.auth-card.auth-card-tall {
    padding-top: 52px;
}

.auth-title-tab {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    min-width: min(78%, 420px);
    white-space: nowrap;
}

.auth-title-tab::before {
    content: "🎮";
    margin-right: 10px;
    font-size: 18px;
}

.auth-card-header {
    margin: 8px 0 26px;
    text-align: center;
}

.auth-card-header p {
    margin: 0;
    color: var(--ua-muted);
    font-size: 15px;
    line-height: 1.5;
}

.auth-step {
    display: table;
    margin: 0 auto 15px;
    padding: 6px 11px;
    border: 2px solid #d8e6f4;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--ua-blue);
    font-size: 12px;
    font-weight: 900;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    margin: 0 0 8px;
    color: var(--ua-text);
    font-size: 15px;
    font-weight: 800;
}

.auth-form-group input[type="email"],
.auth-form-group input[type="password"],
.auth-form-group input[type="text"] {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 2px solid var(--ua-border);
    border-radius: 10px;
    background: white;
    color: var(--ua-text);
    font-size: 15px;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--ua-blue);
    box-shadow: 0 0 0 4px rgba(11,79,148,.12);
}

.auth-form-group .codigo-input {
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .35em;
}

.auth-actions-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 24px;
}

.auth-link {
    color: #075fc1;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    margin-top: 2px;
}

.auth-divider {
    height: 1px;
    margin: 26px 0 20px;
    background: #dce5ef;
}

.auth-register,
.auth-bottom-link {
    text-align: center;
    color: #50657d;
    font-size: 15px;
}

.auth-register a,
.auth-bottom-link a {
    color: #075fc1;
    font-weight: 900;
    text-decoration: none;
}

.auth-register a:hover,
.auth-bottom-link a:hover {
    text-decoration: underline;
}

.auth-help {
    margin-top: -5px;
    color: var(--ua-muted);
    font-size: 13px;
    line-height: 1.45;
}

.auth-secondary-actions {
    margin-top: 22px;
    text-align: center;
}

.auth-secondary-actions form {
    margin: 0;
}

.auth-link-button {
    width: auto;
    margin: 0;
    padding: 4px 6px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #075fc1;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.auth-link-button:hover:not(:disabled) {
    text-decoration: underline;
}

.auth-link-button:disabled {
    color: #8a9aac;
    cursor: not-allowed;
}

.auth-countdown {
    display: block;
    margin-top: 4px;
    color: #6b7d91;
    font-size: 13px;
}

.auth-mini-separator {
    width: 44px;
    height: 1px;
    margin: 14px auto 12px;
    background: #d7e1ec;
}

.auth-success-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border: 3px solid var(--ua-blue-deep);
    border-radius: 12px;
    background: var(--ua-yellow);
    box-shadow: 0 5px 0 var(--ua-yellow-dark);
    font-size: 28px;
}

/* Compatibilidad con mensajes existentes */
.error,
.exito,
.mensaje,
.info {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.error,
.mensaje.error {
    background: var(--ua-error-bg);
    color: var(--ua-error-text);
    border: 1px solid #f5c6c9;
}

.exito,
.mensaje.exito {
    background: var(--ua-success-bg);
    color: var(--ua-success-text);
    border: 1px solid #bde8cb;
}

.info,
.mensaje.info {
    background: #eef6ff;
    color: #24537f;
    border: 1px solid #cfe1f4;
}

@media (max-width: 940px) {
    body {
        background-position: center;
        background-attachment: scroll;
    }

    .auth-screen {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 34px 18px 56px;
    }

    .auth-intro {
        padding-top: 6px;
    }

    .auth-logo-wrap {
        width: min(310px, 82vw);
        margin-bottom: 18px;
    }

    .auth-welcome {
        font-size: 18px;
    }

    .auth-tagline {
        max-width: 420px;
        font-size: 16px;
    }

    .auth-card-wrap {
        width: min(100%, 560px);
    }

    .auth-card {
        padding: 48px 22px 28px;
    }

    .auth-title-tab {
        top: -30px;
        min-width: min(86%, 360px);
        min-height: 48px;
        padding: 9px 20px;
        font-size: 18px;
    }
}

@media (max-width: 520px) {
    .auth-screen {
        padding-inline: 12px;
    }

    .auth-logo-wrap {
        width: min(270px, 86vw);
    }

    .auth-welcome {
        width: 100%;
        max-width: 350px;
        padding-inline: 14px;
        font-size: 16px;
    }

    .auth-card {
        border-width: 3px;
        border-radius: 14px;
        box-shadow: 0 7px 0 var(--ua-shadow), 0 16px 30px rgba(4,34,67,.16);
    }

    .auth-title-tab {
        width: 86%;
        min-width: 0;
        font-size: 17px;
    }

    .auth-form-group .codigo-input {
        font-size: 21px;
        letter-spacing: .24em;
    }
    
    /* =========================================
   MOSTRAR / OCULTAR CONTRASEÑA
========================================= */

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    width: 40px !important;
    height: 40px;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    border-radius: 8px !important;

    background: transparent !important;
    box-shadow: none !important;

    color: #0b4d91 !important;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.password-toggle:hover {
    background: rgba(11, 77, 145, 0.08) !important;
}

.password-toggle:focus-visible {
    outline: 2px solid #0b4d91;
    outline-offset: 2px;
}
    
}
