/* ===== ANIMACION DE FONDO - BURBUJAS FLOTANTES ===== */
.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0f0ff 0%, #f0f8ff 30%, #e8f4fd 60%, #dceefb 100%);
    overflow: hidden;
    z-index: 0;
}

.login-bg .bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(135, 206, 250, 0.15);
    animation: floatBubble linear infinite;
}

.login-bg .bubble:nth-child(1) {
    width: 80px; height: 80px;
    left: 10%; bottom: -100px;
    animation-duration: 18s;
    animation-delay: 0s;
}
.login-bg .bubble:nth-child(2) {
    width: 50px; height: 50px;
    left: 25%; bottom: -100px;
    animation-duration: 14s;
    animation-delay: 2s;
}
.login-bg .bubble:nth-child(3) {
    width: 120px; height: 120px;
    left: 45%; bottom: -150px;
    animation-duration: 22s;
    animation-delay: 4s;
    background: rgba(100, 180, 255, 0.08);
}
.login-bg .bubble:nth-child(4) {
    width: 40px; height: 40px;
    left: 65%; bottom: -100px;
    animation-duration: 16s;
    animation-delay: 1s;
}
.login-bg .bubble:nth-child(5) {
    width: 90px; height: 90px;
    left: 80%; bottom: -120px;
    animation-duration: 20s;
    animation-delay: 3s;
}
.login-bg .bubble:nth-child(6) {
    width: 60px; height: 60px;
    left: 35%; bottom: -100px;
    animation-duration: 15s;
    animation-delay: 5s;
    background: rgba(70, 160, 240, 0.1);
}
.login-bg .bubble:nth-child(7) {
    width: 100px; height: 100px;
    left: 55%; bottom: -130px;
    animation-duration: 24s;
    animation-delay: 7s;
    background: rgba(135, 206, 250, 0.06);
}
.login-bg .bubble:nth-child(8) {
    width: 35px; height: 35px;
    left: 90%; bottom: -80px;
    animation-duration: 12s;
    animation-delay: 6s;
}

@keyframes floatBubble {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) scale(1.15);
        opacity: 0;
    }
}

/* ===== ONDAS SUAVES EN LA PARTE INFERIOR ===== */
.login-bg .wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 120px;
    background: rgba(135, 206, 250, 0.08);
    border-radius: 50% 50% 0 0;
    animation: waveMove 8s ease-in-out infinite alternate;
}

.login-bg .wave:nth-child(9) {
    height: 80px;
    background: rgba(100, 180, 255, 0.06);
    animation-duration: 6s;
    animation-delay: 1s;
}

.login-bg .wave:nth-child(10) {
    height: 60px;
    background: rgba(70, 160, 240, 0.04);
    animation-duration: 10s;
    animation-delay: 2s;
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== CONTENEDOR PRINCIPAL DEL LOGIN ===== */
.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(100, 160, 220, 0.15),
                0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== LOGO / ENCABEZADO ===== */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.login-logo .icon-circle svg {
    width: 36px;
    height: 36px;
    fill: white;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.login-logo p {
    font-size: 14px;
    color: #6b8299;
    margin: 0;
}

/* ===== SEPARADOR ===== */
.login-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    gap: 12px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c8ddf0, transparent);
}

.login-divider span {
    font-size: 12px;
    color: #8ea8c0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ===== BOTON MICROSOFT ===== */
.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    border: 1.5px solid #e0e8f0;
    border-radius: 12px;
    background: white;
    color: #2b3a4e;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-microsoft:hover {
    border-color: #4facfe;
    background: #f5faff;
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.15);
    transform: translateY(-1px);
    color: #1a3a5c;
    text-decoration: none;
}

.btn-microsoft:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btn-microsoft .ms-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== FORMULARIO ===== */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3a5a7c;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.login-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #dce6f0;
    border-radius: 10px;
    font-size: 14px;
    color: #2b3a4e;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
    outline: none;
    box-sizing: border-box;
}

.login-form .form-control:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.12);
    background: white;
}

.login-form .form-control::placeholder {
    color: #a0b8cc;
}

.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4facfe 0%, #00c6fb 100%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.4);
    background: linear-gradient(135deg, #3d9bf0 0%, #00b8ec 100%);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.25);
}

.btn-login-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

/* ===== ALERTA DE ERROR ===== */
.login-alert {
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff0f0;
    border: 1px solid #ffd4d4;
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== FOOTER DEL CARD ===== */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #8ea8c0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
        border-radius: 18px;
        margin: 10px;
    }

    .login-logo .icon-circle {
        width: 60px;
        height: 60px;
    }

    .login-logo h1 {
        font-size: 20px;
    }
}
