/* Estilos mejorados para login API externa - Software Makers */

#laesm-login-form {
    max-width: 420px;
    margin: 50px auto;
    padding: 40px 35px;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#laesm-login-form:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.12),
        0 12px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Efecto glassmorphism sutil */
#laesm-login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 16px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 0;
}

#laesm-login-form:hover::before {
    opacity: 0.8;
}

/* Contenedor de campos de entrada */
.input-container {
    position: relative;
    margin-bottom: 24px;
}

#laesm-login-form input[type="text"],
#laesm-login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    box-sizing: border-box;
}



/* Estados de validación visual */
#laesm-login-form input.valid {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

#laesm-login-form input.invalid {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Placeholder mejorado */
#laesm-login-form input::placeholder {
    font-weight: 300;
    transition: all 0.3s ease;
}

#laesm-login-form input:focus::placeholder {
    color: #bdc3c7;
    transform: translateY(-2px);
}

/* Botón de envío (mantiene el estilo del template) */
#laesm-login-form button[type="submit"] {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
       width: 100% !important;
}

#laesm-login-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
     
}

#laesm-login-form button[type="submit"]:active {
    transform: translateY(0);
}

/* Mensaje de estado mejorado */
#laesm-login-message {
    margin-top: 24px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #e74c3c;
    min-height: 20px;
    border-radius: 8px;
    background: rgba(231, 76, 60, 0.05);
    border-left: 4px solid #e74c3c;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
    position: relative;
    z-index: 1;
}

#laesm-login-message:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

#laesm-login-message.show {
    opacity: 1;
    transform: translateY(0);
}

#laesm-login-message.success {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
    border-left-color: #27ae60;
}

#laesm-login-message.warning {
    color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
    border-left-color: #f39c12;
}

/* Spinner mejorado */
.spinner {
    display: inline-block;
   width: 18px;
    height: 18px;
   border: 2px solid #999;
   border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    vertical-align: middle;
    margin-right: 10px;
    position: relative;
    margin-top: 1rem;
}

.spinner::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid rgba(0, 102, 204, 0.4);
    animation: spin 1.2s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Microinteracciones adicionales */
#laesm-login-form input:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 1);
}

/* Efecto de escritura */
#laesm-login-form input:focus {
    animation: typing 0.1s ease-in-out;
}

@keyframes typing {
    0% { transform: scale(1); }
    50% { transform: scale(1.002); }
    100% { transform: scale(1); }
}

/* Loading state para el formulario */
#laesm-login-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

#laesm-login-form.loading input {
    background: rgba(255, 255, 255, 0.5);
}

.loading-text {
    display: inline-block;
    vertical-align: middle;
    font-weight: 500;
    color: #2c3e50;
    margin-left: 8px;
    animation: none;
}

.laesm-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
}

.laesm-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.laesm-modal-close {
    background: transparent;
    color: #000;
    border: none;
    cursor: pointer;
}

.laesm-modal input[type="email"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.laesm-modal button#laesm-send-reset {
    margin-top: 16px;
    padding: 12px 18px;
    font-size: 16px;
    border: none;
    background-color: #000;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.laesm-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}


.links-login{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-rec-pass{
        background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 40vw;
    width: 90%;
    margin: auto;
    position: absolute;
    left: 30%;
    top: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cls-btn{
    position: absolute;
    top: 10px;
    right: 10px;
    width: 0rem !important;
    min-width: 1rem !important;
    font-size: 1rem;
}

.send-btn{
    margin-top: 2rem;
    width: 100%;
}





















/* Responsive mejorado */
@media (max-width: 768px) {
    #laesm-login-form {
        margin: 30px 20px;
        padding: 30px 25px;
        border-radius: 12px;
    }

    #laesm-login-form input {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 14px 18px;
    }

}

@media (max-width: 480px) {
    
    .modal-rec-pass{
    left: 5%;
    top: 30%;
    max-width: 90vw;
    }
    .send-btn{
        margin-top: 1rem;
        width: 100%;
    }
    
    .cls-btn {
    top: 1.5rem;
    right: 1rem;
        
    }
    
    #laesm-login-form {
        margin: 20px 15px;
          padding: 16px;
        background: #fff !important;
        border-radius: 10px;
    }

    #laesm-login-form input {
           font-size: 15px;
        padding: 12px 16px;
    }


    .input-container {
        margin-bottom: 20px;
    }
    
        #laesm-modal-content {
        padding: 18px;
        border-radius: 10px;
    }

    #laesm-modal h2 {
            font-size: 1.9rem !important;
        margin: 0;
    }
}

/* Soporte para contenedores sin clase input-container */
#laesm-login-form > input[type="text"],
#laesm-login-form > input[type="password"] {
    margin-bottom: 24px;
}