/* auth-login-4 — fondo full-screen + tarjeta glassmorphism centrada.
   Hermana de auth-login-3 (misma info, distinta presentación). */

html:has(.auth-login-4-page),
html:has(.auth-login-4-page) body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.auth-login-4-page {
    --accent: #4c8a1f;
    --card-bg: rgba(255, 255, 255, 0.14);
    --card-border: rgba(255, 255, 255, 0.55);
    --field-border: rgba(255, 255, 255, 0.5);
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.82);
    --placeholder: rgba(255, 255, 255, 0.72);

    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-login-4-page *,
.auth-login-4-page *::before,
.auth-login-4-page *::after {
    box-sizing: border-box;
}

/* Los labels existen para el lector de pantalla (el placeholder no es un label),
   pero no se dibujan. Se define aquí y no se hereda de Bootstrap: el layout
   `blank` no garantiza sus utilidades. */
.auth-login-4-page .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Fondo a pantalla completa */
.auth-login-4-page .login-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Velo tenue: sin él, un fondo claro deja el texto blanco ilegible. */
.auth-login-4-page .login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
}

/* ── Tarjeta de cristal ─────────────────────────────────────────────── */
.auth-login-4-page .glass-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 44px 38px 38px;
    border-radius: 28px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    color: var(--text-light);
}

/* Safari/Firefox sin backdrop-filter: el blur no existe y la tarjeta quedaría
   casi invisible sobre el fondo. Se compensa con opacidad. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-login-4-page .glass-card {
        background: rgba(20, 30, 15, 0.72);
    }
}

.auth-login-4-page h1 {
    margin: 0 0 6px;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.auth-login-4-page .glass-sub {
    margin: 0 0 30px;
    font-size: 1rem;
    color: var(--text-muted);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.auth-login-4-page .brand-logo {
    display: block;
    max-height: 56px;
    margin: 0 auto 20px;
}

/* ── Mensajes de error ──────────────────────────────────────────────── */
.auth-login-4-page .alert-login {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 120, 120, 0.65);
    background: rgba(180, 30, 30, 0.35);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ── Campos ─────────────────────────────────────────────────────────── */
.auth-login-4-page .field {
    position: relative;
    margin-bottom: 16px;
}

.auth-login-4-page .field input[type='text'],
.auth-login-4-page .field input[type='password'] {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 20px;
    border-radius: 14px;
    border: 1px solid var(--field-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.auth-login-4-page .field input::placeholder {
    color: var(--placeholder);
}

.auth-login-4-page .field input:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

/* Autofill de Chrome: pinta fondo blanco sólido y rompe el cristal. */
.auth-login-4-page .field input:-webkit-autofill,
.auth-login-4-page .field input:-webkit-autofill:hover,
.auth-login-4-page .field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-light);
    caret-color: var(--text-light);
    transition: background-color 9999s ease-in-out 0s;
}

.auth-login-4-page .field-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    font-size: 1.35rem;
    color: var(--text-muted);
    pointer-events: none;
}

.auth-login-4-page button.field-icon {
    pointer-events: auto;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 1;
}

.auth-login-4-page button.field-icon:hover {
    color: var(--text-light);
}

/* ── Recordar + olvidé contraseña ───────────────────────────────────── */
.auth-login-4-page .row-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 28px;
}

.auth-login-4-page .remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

.auth-login-4-page .remember input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-login-4-page .row-options a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}

.auth-login-4-page .row-options a:hover {
    color: var(--text-light);
    text-decoration: underline;
}

/* ── Botón ──────────────────────────────────────────────────────────── */
.auth-login-4-page .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 58px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--accent) 55%, transparent) 0%,
        var(--accent) 100%
    );
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.12s ease;
}

/* color-mix es reciente; sin él el gradiente se cae a un color plano. */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
    .auth-login-4-page .login-btn {
        background: var(--accent);
    }
}

.auth-login-4-page .login-btn:hover {
    filter: brightness(1.08);
}

.auth-login-4-page .login-btn:active {
    transform: translateY(1px);
}

.auth-login-4-page .login-foot {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Móvil ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-login-4-page {
        padding: 16px;
    }

    .auth-login-4-page .glass-card {
        padding: 32px 22px 28px;
        border-radius: 22px;
    }

    .auth-login-4-page h1 {
        font-size: 2.1rem;
    }

    /* A 375px «Recordar usuario» y «¿Olvidaste tu contraseña?» caben por los
       pelos en una línea; con el texto un poco más largo se encimarían. */
    .auth-login-4-page .row-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* Pantallas bajas (laptop 13" con barra): el card scrollea en vez de cortarse. */
@media (max-height: 700px) {
    .auth-login-4-page .glass-card {
        padding-top: 30px;
        padding-bottom: 26px;
    }

    .auth-login-4-page .glass-sub {
        margin-bottom: 20px;
    }
}
