/* ===== Login Tyson (mobile-first, 100% responsive) ===== */

@keyframes rotate {
    100% {
        background-position: 15% 50%;
    }
}

:root {
    --color-primary: #E2EAF4;
}

/* Fondo y layout base (móvil) */
html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background-color: var(--color-primary);
    background-image: url('/images/background.svg'); /* tu SVG */
    background-size: cover;
    background-repeat: no-repeat;
    animation: rotate 6s infinite alternate linear;
    font-family: 'Open Sans', Arial, sans-serif;
}

    /* velo para contraste del formulario */
    body::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgb(0 0 0 / 35%);
    }

/* Tarjeta */
.login-card {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 360px; /* << límite móvil */
    margin: 0 auto;
    padding: 32px 20px;
    border-radius: 20px;
    background: rgb(255 255 255 / 56%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: center;
    box-shadow: 0 16px 40px rgb(0 0 0 / 18%);
}

/* Logo */
.logo-img {
    max-width: 100%;
    height: auto;
}

/* Formulario */
.login-form {
    width: 100%;
    display: grid;
    gap: 16px;
    margin: 0;
}

    .login-form .form-control {
        height: 48px;
        border-radius: 10px;
        border: 0;
        background: #ffffff;
        color: #222;
        font-size: 16px;
        text-align: center;
        box-shadow: 0 6px 14px rgb(0 0 0 / 10%);
    }

        .login-form .form-control::placeholder {
            color: #777;
        }

    .login-form > button {
        cursor: pointer;
        height: 48px;
        border-radius: 10px;
        border: 0;
        background: #1B1B1B;
        color: #fff;
        font-size: 17px;
        transition: .25s;
        box-shadow: 0 8px 18px rgb(0 0 0 / 20%);
    }

        .login-form > button:hover {
            filter: brightness(.95);
        }

    .login-form a {
        color: #1B1B1B;
        text-decoration: none;
        font-size: 15px;
    }

/* Checkbox “Recordar” */
.checkbox .form-check-input {
    margin-right: 8px;
}

/* >= 576px: un poco más ancho */
@media (min-width:576px) {
    .login-card {
        max-width: 420px;
        padding: 44px 28px;
    }
}

/* >= 992px: vista “split” tipo panel derecho */
@media (min-width:992px) {
    body {
        grid-template-columns: 1fr min(520px, 45vw); /* fondo a la izq, card a la der */
        place-items: stretch;
    }

    .login-card {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 0 44px;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: none;
    }
}

/* Accesibilidad: foco visible */
.login-form .form-control:focus,
.login-form > button:focus {
    outline: 3px solid #C8A24F;
    outline-offset: 2px;
}


/* Desktop: sin split; tarjeta centrada como en móvil pero más grande */
@media (min-width: 992px) {
    body {
        grid-template-columns: 1fr !important; /* sin columna derecha fija */
        place-items: center !important;
    }

    .login-card {
        max-width: 520px; /* tarjeta centrada */
        border-radius: 20px;
        padding: 44px 32px;
        box-shadow: 0 16px 40px rgb(0 0 0 / 18%);
    }

    .logo-img {
        width: clamp(160px, 50%, 240px);
        max-height: 170px;
        height: auto;
        margin: 0 auto 16px;
    }
}

/* ===== Modal Privacidad (vanilla) ===== */
.modal-overlay {
    position: fixed; 
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    padding: 16px;
}

    .modal-overlay[aria-hidden="false"] {
        display: flex;
    }

    .modal-overlay.show {
        display: flex;
    }

.modal-window {
    position: relative;
    background: #fff;
    color: #1b1b1b;
    width: min(92vw, 920px);
    max-height: 86vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    overflow: hidden;
}

.modal-body {
    padding: 22px;
    overflow: auto;
    max-height: 86vh;
    flex: 1; /* ocupa el alto disponible */
    overflow: auto; /* aquí vive el scroll */
    padding: 24px 24px 0;
    overscroll-behavior: contain; /* evita “rebotar” el scroll */
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

    .modal-close:hover {
        color: #000;
    }

.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-ghost {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

    .btn-ghost:hover {
        background: #f6f6f6;
    }
