/* Estilos específicos para la página de login con diseño consistente al dashboard */

/* Contenido principal */
.main-container {
    display: flex;
    flex: 1;
    position: relative;
    z-index: 1;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px); /* Asegurar altura mínima */
}

.content {
    background-color: transparent;
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilos del formulario de login */
.login-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    position: relative;
    margin: auto;
}

.login-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-top: -4.5rem;
}

.login-logo {
    background: linear-gradient(135deg, #8bc8e9, #135624);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 5px solid white;
}

.login-logo i {
    color: white;
    font-size: 3rem;
}

.login-container h1 {
    text-align: center;
    color: var(--color-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--color-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.login-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-dark);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
}

.input-with-icon input {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 45px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9f9f9;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(56, 121, 96, 0.2);
    background-color: white;
}

.input-with-icon input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Toggle de contraseña */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--color-accent);
}

.toggle-password:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Captcha */
.captcha-container {
    margin-bottom: 1.5rem;
}

.captcha-box {
    display: flex;
    margin-bottom: 1rem;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    height: 60px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--color-dark);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.captcha-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(56, 121, 96, 0.05),
        rgba(56, 121, 96, 0.05) 4px,
        transparent 4px,
        transparent 8px
    );
}

.refresh-captcha {
    background: var(--color-light);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.refresh-captcha:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: rotate(180deg);
}

.refresh-captcha:hover i {
    color: white;
}

.refresh-captcha:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    transform: none;
}

.refresh-captcha i {
    color: var(--color-gray);
    font-size: 1.2rem;
    transition: var(--transition);
}

/* Remember y forgot password */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 8px;
    accent-color: var(--color-accent);
}

.remember-me label {
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.forgot-password a {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password a:hover {
    color: #196b2d;
    text-decoration: underline;
}

/* Botón de login */
.login-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--color-accent), #196b2d);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
}

.login-button i {
    margin-right: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 121, 96, 0.4);
    background: linear-gradient(135deg, #196b2d, var(--color-accent));
}

.login-button:disabled {
    background: linear-gradient(135deg, #ccc, #999);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Footer del formulario */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray);
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
}

.login-footer p {
    margin-bottom: 0.5rem;
}

.login-footer strong {
    color: var(--color-accent);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-danger {
    background-color: rgba(217, 4, 41, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(217, 4, 41, 0.2);
}

.alert-success {
    background-color: rgba(56, 176, 0, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(56, 176, 0, 0.2);
}

/* Modal de recuperación de contraseña */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.modal-header h2 {
    color: var(--color-dark);
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: var(--color-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.25rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: #196b2d;
    box-shadow: 0 5px 15px rgba(56, 121, 96, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--color-dark);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        min-height: calc(100vh - 180px);
    }
    
    .login-container {
        padding: 2rem 1.5rem;
        margin-top: 1rem;
    }
    
    .login-logo-container {
        margin-top: -3rem;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
    }
    
    .login-logo i {
        font-size: 2.5rem;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container h1 {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    .captcha-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .refresh-captcha {
        width: 100%;
        height: 45px;
    }
    
    .captcha-image {
        width: 100%;
    }
    
    .input-with-icon input {
        padding: 0.8rem 0.8rem 0.8rem 40px;
    }
    
    .login-button {
        padding: 0.9rem;
        font-size: 1rem;
    }
}

/* Mejoras visuales adicionales */
.login-container {
    border: 1px solid rgba(56, 121, 96, 0.1);
    backdrop-filter: blur(10px);
}

.form-group:last-of-type {
    margin-bottom: 0;
}

/* Animaciones suaves */
.login-container {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de focus mejorados */
.input-with-icon input:focus + .toggle-password {
    color: var(--color-accent);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(56, 121, 96, 0.2);
}

/* Hover effects */
.captcha-image:hover {
    border-color: var(--color-accent);
    transform: scale(1.02);
}

.remember-me:hover label {
    color: var(--color-accent);
}