* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    /* anulamos el padding/min-height que la plantilla atlantis.min.css
       aplica al body y que provocaba el scroll */
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100dvh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../img/images/login.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* El layout usa .container > .row > .col para centrar la tarjeta;
   ocupa exactamente la altura del body, sin sumar otro 100vh */
body > .container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin: 0;
    overflow: hidden;
}

body > .container > .row {
    width: 100%;
    margin: 0;
    justify-content: center !important;
}

/* aseguramos el centrado horizontal de la tarjeta dentro de su columna */
.login-container {
    margin-left: auto !important;
    margin-right: auto !important;
}

.login-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(135, 36, 31, 0.37);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    background: linear-gradient(135deg, #ff4e50 0%, #c31432 100%);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: rotate(0deg) scale(1.05);
    cursor: pointer;
}

.system-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.system-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    padding: 0.75rem 1rem 0.75rem 3rem;
    height: auto;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.15);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    z-index: 5;
}

/* el input de contraseña deja hueco a la derecha para el ojito */
#password {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    cursor: pointer;
    z-index: 5;
    transition: color 0.25s ease, background 0.25s ease, transform 0.15s ease;
}

.password-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.18);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.9);
}

.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-top: 0.2rem;
}

.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 300;
}

.btn-login {
    background: linear-gradient(135deg, #ff4e50 0%, #c31432 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 78, 80, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 78, 80, 0.6);
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

.support-link {
    text-align: center;
    margin-top: 2rem;
}

.support-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    transition: color 0.3s ease;
}

.support-link a:hover {
    color: white;
    text-decoration: underline;
}

.alert {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 576px) {
    .login-container {
        margin: 0;
        padding: 2rem 1.5rem;
    }

    .system-title {
        font-size: 1.3rem;
    }

    .logo {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

/* Pantallas de poca altura (móviles en horizontal, ventanas pequeñas):
   compactamos para que entre completo sin scroll */
@media (max-height: 700px) {
    .login-container {
        padding: 1.5rem 2rem;
        animation: none;
    }

    .logo-container {
        margin-bottom: 1rem;
    }

    .logo {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-check {
        margin-bottom: 1rem;
    }
}
